Umair Ishaq
Umair Ishaq

Reputation: 752

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:

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?

Upvotes: 5

Views: 3019

Answers (1)

Peter M
Peter M

Reputation: 472

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.

Upvotes: 10

Related Questions