AWS Lex V2 Closing Response not working

0

Hi Team,

I have a lex V2 bot invoking a lambda function to get QnA response from Open search, I need to append / or show a closing response after the lambda fulfillment, I tried using closing response and even the success response with Fulfillment options and nothing seems to be working, every time bot returns the response from the Lambda the closing responses are not shown.

Please suggest.

  • Hi, we will be able to help you better if you can share more details abot your experience? Are you seeing an error from Lex or you are getting a response which is not expected? It can be heplful if you can share the JSON reponse that Lambda function is returning to Lex and the message configured in Closing Response.

  • Hi Saket, I am not getting any error, I am looking to append a content type message group, Currently after lambda invocation I am only getting one message and the configured closing response is not getting added. Current :

    "messages": [ { "content": "Answer.", "contentType": "PlainText" }

    Expected :

    "messages": [ { "content": "Answer.", "contentType": "PlainText" }, { "content": "Closing Response.", "contentType": "PlainText" }

  • Hey, without having sufficient information of your setup. I am guessing the fulfillment Lambda function is returning a message back and bot is only responding with that message. If you are doing so then Lex bot will only respond with the message set by the lambda. You cannot use both the message in Lambda and Closing repsonse together.

  • Hello, just wanted to follow up and see if you are still working through surfacing the closing response correctly?

    As Saket mentioned it would be good to know the below information to better help answer your questions:

    1. Where is the API response being returned? Are you testing on console, have an integration with another service that consumes the response?
    2. When you say you are invoking a lambda function to get QnA response is this a CodeHook Lambda or a Fulfillment Lambda?
    3. Are you explicitly adding both the "Answer" and "Closing Response" in the same Lambda response? - If your Lambda execution updates the "messages" field Lex will honor the value you provided and not append/change any additional messages to it.

    Thank you for your time, please let me know if I can provide any additional clarification questions.

asked 2 years ago854 views
1 Answer
0

Hello AWS-User-6597632, Let us know if you still need help with your Lex V2 issue.

profile picture
SUPPORT ENGINEER
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions