Of course Jan, sorry if I’m not explaining myself well.
Imagine that Intent1 is used to make a hotel reservation and Intent2 to confirm if you want to do anything else after the reservation.
Then, when we launch the application, the user says:
“I want to make a reservation tomorrow” and the assistant answers: “Okay. Do you need anything else?” (Intent1).
The user answers: “Nothing else, thank you” and the assistant answers: “Have a good day!” (Intent2).
For that reason, I need both Intents to be executed because if I do that execution I get the following error:
Could not find the route “INTENT_2_STATE” in your handler function.
if I can only execute one intent like this:
return this.toStateIntent(‘INTENT_1_STATE’, ‘Intent1’);
I will have the error. That is why I had introduced the two intents in the app.setHandler().
If I have all the intents in the app.js file it doesn’t give me any error, but I wanted to refactor the code so that the app.js file wouldn’t be so big and so unreadable.
I hope you can understand me.