question

bavant avatar image
bavant asked ·

Conditionally prompting user for input

Hello Dev Community,


I have a customer requirement that necessitates a conditionally prompt from Alexa. Basically, the user will `ask {intent} {utterance}`, the back-end will check their account to see if they have more than one item in a list; if so, it will ask "which one item 1 or item 2". They will need to respond with 1 or 2.


If there is only one item in their list, it will default to that item and not require input from the user.


My understanding of how multi-turn dialogs works is that I must create a dialog model with at least one required slot. As you can see in my example, there isn't always a required slot.


Is this possible? If so, can you outline (at a high-level of course) what steps I should take?


Note: Unfortunately, one of the requirements is that the endpoints be handled in Azure; therefore, I must utilize Alexa.NET instead of the typical SDKs. Not sure if that changes anything.


Thanks in advance!

alexa skills kitintentsutterancesc#azure
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Pan@Amazon avatar image
Pan@Amazon answered ·

It doesn't seem like you need dialog management for this. I would recommend moving the logic to your backend especially if you are using the Alexa.NET which isn't officially supported.

2 comments
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank You @Pan@Amazon for the reply,


Assuming that I move the logic to the backend, how would I elicit input from the user? What mechanism (outside of multi-turn dialogs) would allow me to prompt the user after they have performed an utterance. I guess I'm not yet familiar enough with the ASK to know which functionality would prompt and fill a slot without the dialog management.

0 Likes 0 ·

What I am suggesting is checking conditionals in the backend, so not a feature.

For example, the skill can prompt the user directly through the speech output and if certain slot values are not present (null) then based on the missing slot values the skill can continue prompting the user for them.

let slot1 = getSlotValue(requestEnvelop, 'slot1'),
     slot2 = getSlotValue(requestEnvelop, 'slot2'),
     speechOutput = ""
if(!(slot1 && slot2)) {
   speechOutput = "To proceed I will need to know"
}if(!slot1) {
   speechOutput += slot1Name
}
// Other logic
....
0 Likes 0 ·