Search code examples
node.jslambdaalexa-skills-kit

How to redirect to different intent handler in ASK-SDK v2 Node.JS?


How can one redirect to a different intent handler in the Alexa Skills Kit SDK v2?

Hope this helps. It took too long for me to figure out.

In the first SDK, one could do this.emit("IntentName") or this.emitWithState("IntentName").

This is no longer and option in the new SDK.


Solution

  • In the SDK v2, use:

    return fooHandler.handle(handlerInput)
    

    You pass the handlerInput and session attributes to chosen handler.