0

I have created couple of Alexa state handler and one default handler.

All of these are registered using alexa.registerHandlers(State1Handlers, State2Handlers,defaultHandler);

I am using some built-in Intents like "repeat" which will behave same in all my different states. Hence I added it to the Default handler. However when I invoke that intent, the app fails saying it cannot find that intent.

I thought I could add intents with default behaviors in default handler and other state handler could use it ( something similar to using inheritance) but it does not look like it. Any ideas ?

Amit
  • 1,111
  • 1
  • 8
  • 14

1 Answers1

1

The way alexa-skills-kit work it creates a handlermap based on states by appending state to the intent name, which means that although you have same intent behaving same in every state you have to duplicate in each state handler so that sdk can find repeatstate1 when in state1 , repeatstate2 when in state2 and repeat in default. For more detail you can follow this discussion. handle intents with states

  • Thank you for the information. Good to know that they have added a backlog item for intent-inheritance kind of thing. – Amit Mar 16 '18 at 17:45