5

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?

sid8491
  • 6,622
  • 6
  • 38
  • 64
Umair Ishaq
  • 752
  • 9
  • 22

1 Answers1

10

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.

Peter M
  • 472
  • 5
  • 16