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
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
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.