I have a workflow that asks different Yes/No questions. Using the Amazon built in Yes and No intents, how can I use them for multiple questions.
Here is an example of the flowchart.

I create a state called "Injury" in order have different handlers for this flow. When the use says "No" to the first question, the AMAZON.NoIntent emits the BurnIntent question. At this point if the user says "No", it loops back to the BurnIntent. How can I determine inside the Yes and No intents which intent to move on to? Is there a way to track which question I'm on to determine which intent to emit?
One of the ways would be to keep the state or a question in the
self.attributes. That is some kind of session variables which is shared between intents and wiped out once the user ends using a skill.For example, you can store there the last question you have asked the user by
self.attrbiutes["lastQuestionID"] = questionIdor a current "level". Then, once your "Yes/No" intent has been triggered you can use that value and decide what to do next.My assumption is that you are using Node.js SDK. But I'm pretty sure there is something similar for other languages.
You can also read a little bit more about state management in the Tips on State Management at Three Different Levels article.