AWS Connect and Lex - Cannot reference Contact Attribute
Asked Answered
S

1

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?

Sturgill answered 13/12, 2017 at 3:41 Comment(0)
W
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.

Walkin answered 14/12, 2017 at 18:47 Comment(1)
Thanks! The AWS Connect document is missing the 's' in Attributes.Herophilus

© 2022 - 2024 — McMap. All rights reserved.