Hi, our primary reason for Jovo is to support Alexa, Google Assistant & web chatbot using the same app.
I developed a sample app to test Alexa & Web chatbot but seeing different behaviors. Jovo debugger is behaving as expected, but Web is not which is repeating the same prompt again and again.
Request/response trace for both channels: https://www.diffchecker.com/RKAncI47, which are almost identical.
Below is the screenshot of the conversation.
Test component:
import { Component, BaseComponent, Intents } from '@jovotech/framework';
@Component()
export class GetSlots extends BaseComponent {
START() {
if (!this.$session.data.ccyFrom) {
this.$send({message: 'Which currency you would like to convert from?', quickReplies: ['from USD']});
} else if (!this.$session.data.ccyTo) {
this.$send({message: 'To which currency you would like to convert?', quickReplies: ['to INR']});
}
return;
}
@Intents(['GetFromCcy'])
GetFromCcy() {
const ccyFrom = this.$entities.ccy?.value;
this.$resolve('ccyFrom', ccyFrom);
}
@Intents(['GetToCcy'])
GetToCcy() {
const ccyTo = this.$entities.ccy?.value;
this.$resolve('ccyTo', ccyTo);
}
}
@Component({
components: [GetSlots]
})
export class TestForexComponent extends BaseComponent {
START() {
return this.$send({message: 'What would you like to do? Ex: forex', quickReplies: ['forex']});
}
@Intents(['GetForexRate'])
GetForexRate() {
return this.$delegate(GetSlots, {
resolve: {
ccyFrom: this.onCcyFrom,
ccyTo: this.onCcyTo
}
});
}
onCcyFrom(ccyFrom: string) {
this.$session.data.ccyFrom = ccyFrom;
this.GetForexRate();
}
onCcyTo(ccyTo: string) {
this.$session.data.ccyTo = ccyTo;
const ccyFrom = this.$session.data.ccyFrom;
this.$send(`1 ${ccyFrom} is equal to 76 ${ccyTo}`);
}
UNHANDLED() {
return this.START();
}
}
What could be the issue? Thanks