This is a pretty simple question, but I can't find any evidence for an answer. I want to configure a slot type to me a list -- meaning that Lex will have to continue asking more elements in that list.
For example, here is what a back-and-forth should look like:
Lex: What flowers would you like to order?
Me: roses
Lex: Any other types?
Me: yes, I also want lillies
Lex: Anything else?
Me: that is all
An example payload that gets sent to a Lambda looks like this:
{
"currentIntent": {
"slots": {
"PickupDate": "2030-11-08",
"PickupTime": "10:00",
"FlowerType": "lilies"
},
"name": "OrderFlowers",
"confirmationStatus": "None"
},
"bot": {
"alias": "$LATEST",
"version": "$LATEST",
"name": "OrderFlowers"
},
"userId": "John",
"invocationSource": "DialogCodeHook",
"outputDialogMode": "Text",
"messageVersion": "1.0",
"sessionAttributes": {}
}
That ^^^ was taken directly from the examples Test Configurations in AWS Lambda console.
I want it to look like this:
{
"currentIntent": {
"slots": {
"PickupDate": "2030-11-08",
"PickupTime": "10:00",
"FlowerTypes": [
"roses",
"lilies"
]
},
"name": "OrderFlowers",
"confirmationStatus": "None"
},
"bot": {
"alias": "$LATEST",
"version": "$LATEST",
"name": "OrderFlowers"
},
"userId": "John",
"invocationSource": "DialogCodeHook",
"outputDialogMode": "Text",
"messageVersion": "1.0",
"sessionAttributes": {}
}
slot
is always a string. Could you accomplish what you are trying to accomplish by adding additional slots? e.g. FlowerType01, FlowerType02, ... FlowerType99? – Justin HeathsessionAttribute
. This is messy and you are probably better off using multiple slots as mentioned above. – Milk