I have a chat bot in Amazon Lex V2 that is connected to Amazon Connect. When using Lex I am able to connect to a lambda function for interactive messages, like image response and plain messages.
When I Use Amazon Connect with the lex bot, Connect doesn’t recognize this type of messages.
It goes through to the lambda but doesn’t display response from bot.
This is an example of how message response format is created in Lambda lex function:
def message_format_retry(message,intent_type,name_intent,event,intent,sessionAttributes):
return {
"bot": event["bot"],
"inputMode":event["inputMode"],
"inputTranscript": event["inputTranscript"],
"content": "Incorrect username or password. Please try again or Sign up",
"contentType": "text",
"sessionState": {
"dialogAction": {
"type": "Close"
},
"intent": {
"name": name_intent,
"slots": intent["intent"]["slots"],
"state": "Fulfilled"
},
"sessionAttributes": sessionAttributes,
"originatingRequestId": event.get("sessionState").get("originatingRequestId")
},
"interpretations": event.get("interpretations"),
"requestAttributes": event["requestAttributes"],
"sessionId": event.get("sessionId")
}
Camila Rayen Nahuel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.