Here it is my use case: somewhere in my fulfillment, while handling the Intent A, I want to call Intent B using setFollowupEvent. Something like:
function intentA_Handler(){
....
agent.add('This is the response when calling Intent A');
agent.setFollowupEvent('call_intent_B_event');
}
function intentB_Handler(){
agent.add('I am in intent B now.');
....
}
What I'm expecting:
- The assistant Shows & Speaks out the string This is the response when calling Intent A
- Then calling
agent.setFollowupEvent('call_intent_B_event');and Showing & Speaking out the string I am in intent B now.
What happens:
The assistant immediately shows & speaks out to me the string I am in intent B now and omits the first string This is the response when calling Intent A
Already tried:
function intentA_Handler(){
....
new Promise((resolve, reject) => {
agent.add('This is the response when calling Intent A');
resolve();
});
agent.setFollowupEvent('call_intent_B_event');
}
But still the same result. Any idea how to achieve my goal?