Struggling to get Amazon Lex (Fullfilment Lambda) response in Amazon Connect

0

I've been working on a solution that involves using Amazon Lex in Amazon Connect to get customer input and the process it and get an answer back from an agent in Amazon Bedrock.

The part where I'm struggling with is with the json response generated with this lambda Lex FullFilment Lambda This fullfliment lambda is only to get the customer input so then I can send it over to the amazon bedrock agent as customer input.

The Json Generated is something like this: { "sessionState": { "sessionAttributes": {}, "dialogAction": { "type": "Close", "fulfillmentState": "Fullfilled", "message": "message" }, "intent": { "name": "CaptureAllIntent", "confirmationState": "Confirmed", "state": "Fulfilled", "slots": { "content": { "value": { "interpretedValue": "I would like to order a pizza", "originalValue": "I would like to order a pizza", "resolvedValues": [ "I would like to order a pizza" ] } } } } } }

I want to send the "originalValue" to a lambda block in Amazon Connect as a parameter. But I'm not able to send it correctly. I have tested $.Lex.Slots.content.value.originalValue or with external too $.External.sessionState.intent.slots.content.value.originalValue but I'cant have the value as parameter in the Lambda block

Flow setting looks like

1 Answer
1
Accepted Answer

There is no way to pass the intent back to Connect today if you use the Bedrock fallback intent in Lex. So far it's been build as an either/or. The Lex team is working on it. Stand by.

AWS
Magda
answered 23 days ago
profile picture
EXPERT
reviewed 23 days ago
  • Well, yesterday i was able to get it working. From the fullfilment lambda i changed the json so i had the answer in the "sessionAttributes": {}, key-pair values. In Amazon Connect I defined it as user defined variable and was able to add it as parameter in the Lambda block. If anyone need some help with something like that I'm happy to help.

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