Reputation: 2075
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": {}
}
Upvotes: 1
Views: 1078
Reputation: 5297
Lex slots are always strings, so you will have to come up with a more sophisticated solution. I would suggest:
Goofy, I know, but Lex has very limited options for slots right now!
Upvotes: 1