I'm developing my first Alexa skill and I want to try to improve its dialog management.
My skill has several intents: one to get the temperature indoor, one to get the humidity and so on.
Every intent has one slot that represents the floor/room of my house so the typical question to Alexa is "What's the temperature on the first floor?"
Every time intent is executed it stores the slot in a session attribute so I can handle a conversation like this:
me: "Alexa what's the temperature on the first floor?"
Alexa: "The temperature on the first floor is 24 degrees"
me: "and the humidity?"
Alexa: "The humidity on the first floor is 50%"
The next step that I'm trying to implement is this type of dialog:
me: "Alexa what's the temperature on the first floor?"
Alexa: "The temperature on the first floor is 24 degrees"
me: "and on the second floor?"
Alexa: "The temperature on the second floor is 26 degrees"
In practice, I need to launch the last executed intent without saying its utterances.
I was thinking of creating a new generic intent that receives only the slot and then dispatches the request to the last executed intent.
I can keep track of the last intent executed saving its ID in a session attribute.
Is there a better way to do this?
Every suggestion is welcome because I am developing Alexa skills since last Monday! :-)
Thanks a lot.