2

I have implemented a multi-turn dialog for Alexa. The Help-Intent provides different Help-Texts depending on the state of the dialog. After the User has triggered the HelpIntent and was presented the Help-Text, I want to elicit a specific slot with the ElicitSlotDirective

Now this seems to be not supported, since you can only elicit slots of the current intent, and the HelpIntent does not have slots.

https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/issues/162

My question now is: How can I return to my multi-turn dialog and elicit a specific slot after the user triggered the HelpIntent?

Tobias Gassmann
  • 11,399
  • 15
  • 58
  • 92

3 Answers3

3

You can now use intent chaining to elicit a slot from a different Intent. For example:

.addDirective({
    type: 'Dialog.ElicitSlot',
    slotToElicit: 'drink',
    updatedIntent: {
        name: 'OrderIntent',
        confirmationStatus: 'NONE'
    }
})

See this blog post.

German
  • 10,263
  • 4
  • 40
  • 56
1

The documentation states that:

Implementing the built-in intents is recommended, but optional.

I recommend that you define your own HelpIntent with overlapping utterances to the AMAZON.HelpIntent, but with your needed Slot types.

In this case, your service receives an IntentRequest for MyHelpIntent, even though these phrases overlap with the built-in AMAZON.HelpIntent.

The documentation also states, that this practice is not recommended, because the built-in intent may have a better coverage of sample utterances. It states that it is better practice to extend the built-in Intents. But (stupid enough from Amazon), the HelpIntent does not support Slots. So the only way would be a custom Help Intent.

I don't see a way to use Dialog Directives with the built-in Intents.

Nightflash
  • 118
  • 4
0

Here's a convoluted workaround that might work (there's no straight forward way right now, Nov 2018):

  1. On every loop of the multi-turn dialog save your dialog based intent in the session attributes (the whole intent object, you can use the intent.name as key)
  2. On every triggered intent (even HelpIntent) save the intent name in a lastIntent session attribute (to keep track of the previous intent name)
  3. User triggers help and you're now in the HelpIntent. After you provide your help message append a question in the end that will cause the user to say something that will trigger your dialog based intent again

Do the following steps when you are in the dialog based intent and only if the lastIntent was HelpIntent (the one in the previous step):

  1. Load the most recent intent data from the session attributes and, in it, delete the slot value and resolutions of the slot you want to elicitate (alternatively if you want to start from scratch you can delete the remaining slot values too, up to you)
  2. Replace the current intent with the modified intent of the previous step
  3. Emit a DialogDelegate with the current intent (your model needs to flag the slot you want to elicitate with elicitationRequired set to true)
German
  • 10,263
  • 4
  • 40
  • 56