Using a validation hook for AWS lex. If i try to elicit slot, lex fails with:
An error has occurred: Invalid Lambda Response: Lambda response elicited for an invalid slot name
Below is my lex event and response from my lambda function. I have 2 slots, topping and crust. Topping was the first slot already given by client. Crust was the missing slot.
I have reviewed most of AWS documentation, stackoverflow and other tutorials but I can't seem to break past this..anyone have any idea?
LexEvent:
{
"messageVersion": "1.0",
"invocationSource": "DialogCodeHook",
"userId": "cbzn2ql6dl59dro",
"sessionAttributes": {},
"outputDialogMode": "Text",
"currentIntent": {
"name": "Pizza",
"slots": {
"topping": "Chicken"
},
"confirmationStatus": "None"
},
"bot": {
"name": "PizzaMaker",
"alias": "$LATEST",
"version": "$LATEST"
}
}
Response from Lambda
{
"sessionAttributes": {},
"dialogAction": {
"type": "ElicitSlot",
"message": {
"contentType": "PlainText",
"content": "What type of crust do you want?"
},
"intentName": "Pizza",
"slotToElicit": "Curst",
"slots": {
"topping": "Chicken"
}
}
}