Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Connect and Lex - Cannot reference Contact Attribute

For reference, here is the flow in question:

"Get Customer Input" (Lex) -> "Set Contact Attribute" -> "Play Prompt"

After the call to Lex, I set a contact attribute using "Save Text As Attribute" option:

DestinationKey Value ProductType $.Lex.SessionAttributes.ProductType

Then, in the "Play Prompt" I can't reference the set attribute. I use "Text to speech (Ad hoc)" and have tried the following syntax:

  • $.ProductType
  • $.System.ProductType
  • $.User.ProductType
  • $.External.ProductType

The interesting thing is, if I add a "Check contact attributes" after the "Set contact attributes" it does match on "User Defined" attribute "ProductType".

How may I reference the attribute?

like image 865
Umair Ishaq Avatar asked Dec 13 '17 03:12

Umair Ishaq


People also ask

What is contact ID in Amazon Connect?

We recommend using the contact ID to search for recordings. Even though many call recordings for specific contact IDs may be named with the contact ID prefix itself (for example, 123456-aaaa-bbbb-3223-2323234. wav), there is no guarantee that the contact IDs and name of the contact recording file always match.

What is contact attribute?

A contact attribute represents this data as a key-value pair. You might think of it as a field name together with the data entered into that field. For example, here are a couple of key-value pairs for the customer name: Key. Value.

What is Ani in Amazon Connect?

Amazon Connect stores the following Personally Identifiable Information (PII) data related to your customers: The customer's phone number: ANI for inbound calls, and DNIS for outbound calls or transfers.

What is CTR AWS?

Contact trace records (CTR) captures transactional metrics such as hold time, wait time, and agent interaction time in JavaScript Object Notation (JSON) format. Amazon Connect aggregates CTR data to create metrics reporting. Data retention for CTR is 24 months upon contact initiation.


1 Answers

Try $.Attributes.ProductType

$.Attributes is how you get to contact attributes set with Set Contact Attribute. $.External is to get to the values returned by the last Lambda execution. $.Lex for the last Lex execution.

like image 99
Peter M Avatar answered Oct 04 '22 02:10

Peter M