Learn

In this lesson we learned how to check the dialog state in our Lambda function and delegate control back to Alexa:

  • If dialogState is not 'COMPLETED', delegate to Alexa using this.emit(':delegate').
  • Else run the main functionality of the intent already provided in the code.
  • 'COMPLETED' means that all required slots/intents have been filled/confirmed.

For more complex or custom conversations, this method of static prompts and responses set in the Developer Console may not be flexible enough. Sometimes we need to programmatically take control of Dialog Management in our Lambda function. That’s exactly what we’ll be doing in the lesson Control Dialog in Lambda.

Instructions

Congrats on finishing this lesson! Feel free to review before moving on.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?