0

I have set the value of session attribute in my lambda function response, which I am getting in amazon lex after invoking it from Lex. But, When I tried to access this value in Amazon connect using -

$.Lex.SessionAttributes.dateFlag

I am not able to access it. I have already tried using Type as external and Lex Attributes.

I am putting the condition in amazon connect based on the values received from Above. In logs I found that the condition where I am comparing this value comes to false.

Can anyone suggest some idea on how to get the custom value/sessionAttribute values from Lex/Lambda in Amazon Connect.

Below is my response JSON from Lex. I am trying to access the dateFlag.

{
  "dialogState": "Fulfilled",
  "intentName": "suitabletime",
  "message": "Thanks for the confirmation",
  "messageFormat": "PlainText",
  "responseCard": null,
  "sessionAttributes": {
    "dateFlag": "1",
    "previousIntent": "suitabletime"
  },
  "slotToElicit": null,
  "slots": {
    "date": "2018-09-14",
    "time": "13:00"
  }
}
vikash singh
  • 1,479
  • 1
  • 19
  • 29

1 Answers1

0

Finally I found the solution. This is simpler than what I was writing. We can directly access the session attribute in our connect by taking the attribute type as Lex attribute and Attribute as Attribute Key/Name. Below is the screenshot for the same.

enter image description here

vikash singh
  • 1,479
  • 1
  • 19
  • 29