0

I'm trying to develop a skill for amazon alexa whereby the application leads the user into a new state.

"User input" -> "Speak" -> "Ask Question" -> "User input" .... etc

Is the most obvious way of going about this, however, this means I have to rather bluntly mash together "speak" and "ask question".

Is there another way to chain events for amazon alexa. Say, for example, emit some speach then go to another handler ? (I know that I can emit("handlerName") and switch to another handler, but I can't do that AND make alexa speak before the switch happens)

George
  • 3,521
  • 4
  • 30
  • 75

1 Answers1

0

The best way to "chain events" is to maintain state is by using the session object in the Alexa API's request and response structures (see here). Store a variable in the attributes indicating the current step in your flow.

Scott Daniel
  • 1,087
  • 12
  • 18