Hand off Dialog Management to ACDL
• GA:
en-US
, en-AU
, en-CA
, en-IN
, en-GB
, de-DE
, ja-JP
, es-ES
, es-US
• Beta:
it-IT
, fr-CA
, fr-FR
, pt-BR
, es-MX
, ar-SA
, hi-IN
Alexa Conversations Description Language (ACDL) can handle all or part of the dialog management for a skill that uses intent-based dialog management. To hand off dialog management, send a Dialog.DelegateRequest
directive in response to a request from Alexa. The details of this directive depend on whether you want to switch from the intent-based dialog manager to ACDL, or vice versa. Either way, you can save session attributes, such as the dialog state, in the same response.
Hand off dialog management from your skill to ACDL
To hand off dialog management from your skill to ACDL, send a Dialog.DelegateRequest
to Alexa from an intent handler. Specify the utterance set to which ACDL must map the intent, and pass the slots to ACDL.
Dialog.DelegateRequest
must include the Invoke APIs dialog act. Dialog.DelegateRequest
has the following format.
{
"version": "1.0",
"sessionAttributes": {},
"response": {
"directives":[
{
"type": "Dialog.DelegateRequest",
"target": "AMAZON.Conversations",
"period": {
"until": "EXPLICIT_RETURN"
},
"updatedRequest": {
"type": "Dialog.InputRequest",
"input": {
"name": "<namespace>.<utteranceSetName>", // Utterance set must use the Invoke APIs dialog act
"slots": {
"<slotName1>": {
"name": "<slotName1>",
"value": "<slotValue1>"
},
"<slotName2>": {
"name": "<slotName2>",
"value": "<slotValue2>"
},
...
}
}
}
}
]
}
}
Examples of dialog management hand-off from your skill to ACDL
The following examples show how to switch the dialog manager to ACDL with slots or without slots.
IntentRequest
slot values is also acceptable for slot values used in the Dialog.InputRequest
type of updatedRequest
.Example with slots
The following example delegates dialog management and passes slots to ACDL.
{
"version": "1.0",
"sessionAttributes": {},
"response": {
"directives": [
{
"type": "Dialog.DelegateRequest",
"target": "AMAZON.Conversations",
"period": {
"until": "EXPLICIT_RETURN"
},
"updatedRequest": {
"type": "Dialog.InputRequest",
"input": {
"name": "com.food.utterances.SetAllFavoriteFoodsUtteranceSet",
"slots": {
"breakfast": {
"name": "breakfast",
"value": "waffles"
},
"lunch": {
"name": "lunch",
"slotValue": {
"type": "Simple",
"value": "p. b. and j."
}
},
"dinners": {
"name": "dinners",
"slotValue": {
"type": "List",
"values": [
{
"type": "Simple",
"value": "stuffed peppers"
},
{
"type": "Simple",
"value": "pizza"
},
{
"type": "Simple",
"value": "chicken cacciatore"
}
]
}
}
}
}
}
}
]
}
}
Example without slots
The following example delegates dialog management to ACDL but passes no slots.
{
"version": "1.0",
"sessionAttributes": {},
"response": {
"directives":[
{
"type": "Dialog.DelegateRequest",
"target": "AMAZON.Conversations",
"period": {
"until": "EXPLICIT_RETURN"
},
"updatedRequest": {
"type": "Dialog.InputRequest",
"input": {
"name": "<namespace>.<utteranceSetName>"
}
}
}
]
}
}
Related topics
- Alexa Conversations Description Language Reference
- Dialogs in the Alexa Conversations Description Language
- Develop Skills with the Alexa Conversations Description Language
Last updated: Nov 27, 2023