Directives are the way to instruct the Alexa devices how to behave in some situation, for example in a multi-turn dialog.
The most used directives are:
Types of directive
Name | Description |
---|---|
endSession | Terminate the dialog with just a simple confirmation sound |
Dialog.Delegate | Let Alexa decide the next step in a multi-turn dialog (depends on the bot Model) |
Dialog.ElicitSlot | Instruct Alexa to ask the user for a required slot of the intent, need to be chained with a Alexa Speech node |
Dialog.ConfirmSlot | Instruct Alexa to ask the user to confirm a previuosly selected slot of the intent, need to be chained with a Alexa Speech node |
Dialog.ConfirmIntent | Instruct Alexa to ask the user to confirm a intent, need to be chained with a Alexa Speech node |
In order to create a directive programmatically in a upstream Function node:
msg.payload = {
directiveType: 'Dialog.ConfirmSlot',
slot: 'my-slot'
};
return msg;
Available parameters for the msg.payload
Name | Type | Description |
---|---|---|
directiveType | string | Type of directive. One of endSession, Dialog.Delegate, Dialog.ElicitSlot, Dialog.ConfirmSlot, Dialog.ConfirmIntent |
slot | string | The slot to confirm or elicit |