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:
confirmationStatusis 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:
:elicitSlotdirective is used to prompt the user for the value of a slot
:confirmSlotdirective is used to confirm the slot value the user has provided
:confirmIntentdirective is used to confirm the intent the user has provided
- Use directives with this general form:this.emit(directive, [slotName,] speechOutput, reprompt, updatedIntent);
slotNameis not included when using
updatedIntentis the last parameter in calls to
- We can use this parameter to overwrite values or set default values for the intent
- Capture the original intent using:
make changes to its values, then pass it as the last argument toconst updatedIntent = this.event.request.intent;
More Alexa Resources
Good work finishing this lesson! Feel free to review before moving on.