Learn
Control Dialog in Lambda
Review

Congrats on finishing Dialog Management! You’ve come a long way and learned a lot.

Dialog management is a great way to elicit and confirm the set of required slots and the intent needed to perform a task, since it greatly reduces the necessary coding in the Lambda function.

You can write prompts and user utterances in the Developer Console. If you’d like to customize the prompts or perform complex logic, you can use properties in the JSON request and directives in your Lambda function.

This specific lesson focused on the properties and directives in your Lambda function:

Confirmation Status

  • confirmationStatus is the confirmation status of slots:
    this.event.request.intent.slots.YOUR_SLOT_NAME.confirmationStatus
  • and intents:
    this.event.request.intent.confirmationStatus
  • It can take one of three values: 'COMPLETED', 'DENIED', or 'NONE'

Directives

  • The :elicitSlot directive is used to prompt the user for the value of a slot
  • The :confirmSlot directive is used to confirm the slot value the user has provided
  • The :confirmIntent directive is used to confirm the intent the user has provided
  • Use directives with this general form:
    this.emit(directive, [slotName,] speechOutput, reprompt, updatedIntent);
  • slotName is not included when using :confirmIntent

Updated Intent

  • updatedIntent is the last parameter in calls to this.emit
  • We can use this parameter to overwrite values or set default values for the intent
  • Capture the original intent using:
    const updatedIntent = this.event.request.intent;
    make changes to its values, then pass it as the last argument to this.emit

More Alexa Resources

Instructions

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

Folder Icon

Take this course for free

Already have an account?