Introduction
In this article, I am going to demonstrate how to define slots and how to define prompts for intent confirmation and confirming all slot values of an intent using user utterances such as yes or no, which are one of the components required to create a dialog model for an Alexa skill. Dialog models are created to simplify Alexa skills code to collect and confirm slot values. The dialog model identifies the prompts and utterances to collect, validate, and confirm the slot values and intents.
Components of a Dialog Model
There are four components to the dialog model.
Required slots and prompts
A required slot represents information that your skill must have in order to fulfill the user's request. For instance, the RegisterBirthday intent requires, at a minimum, the day (day), month (month), and year (year) to save birthday details for the future. You can control the order in which Alexa asks for the slot values.
Slot confirmation prompts
You can optionally designate a required slot as requiring confirmation. This means that the user must also confirm the slot value with a yes/no response before proceeding.
Intent confirmation prompts
You can specify that the entire intent requires confirmation. This is common for skills that order products or make reservations. A confirmation prompt typically repeats back to the user all the information previously provided for the user to confirm.
Slot validation rules and prompts
You can configure a set of validation rules that the slot value provided by the user must pass to be considered valid. If the value fails validation, Alexa can use your prompts to ask for a corrected value. You can use slot validation rules with both required and non-required slots.
Creating a Custom Alexa Skill
A custom Alexa skill named birthday time has been created. The skill contains an intent name RegisterBirthday intent having a day, month, and year as different types of slot values.
Different slot types of RegisterBirthday intent
Enable confirmation for an intent
If the entire intent requires confirmation, your skill needs to ask the user to confirm the action the intent will take with "yes" or "no". Define a set of prompts to get this confirmation from the user.
| Section | Description | Examples |
| Alexa Speech Prompt |
Questions that Alexa speaks to ask the user to confirm the entire intent.
The prompts should be specific to confirming the entire intent. The prompt should include all the slot values mentioned in that intent.
The prompts should be worded such that the user can respond with "yes" or "no".
If you provide more than one prompt, Alexa chooses one at random. This gives Alexa a more conversational, human style.
Include all the required slots in the prompt in curly brackets ({ }). When speaking the prompt, Alexa replaces these tokens with the slot values the user previously provided.
|
For RegisterBirthday Intent, you could have confirmation prompts like this:
That's {month} {day} {year}, did I get that right?
Are you sure you want to register {month} {day} {year}?
I'm saving your Birthday as {month} {day} {year}, Is that OK?
Please confirm that you want to register your birthday as {month} {day} {year}.
|
The above examples would support a conversation like this for the RegisterBirthday intent.
User: remember my birthday
Birthday time: which day is your birthday?
User: 16 April 1993
Birthday time: I'm saving your Birthday as {month} {day} {year}, Is that OK? (Confirmation prompt for the intent)
User: Yes
To enable confirmation for an intent:
- Click an intent from the left-hand navigation to open the detail page for the intent.
- Under Intent confirmation, enable Does this intent require confirmation?.
- Fill in the Alexa Speech Prompt for the intent.


Join the conversation! Your thoughts help the community grow.