Setting Amazon Lex session attributes

AgentX provides support for an item to set Amazon Lex session attributes. There are two ways to achieve this.

  1. Use the handlebars helper setSessionAttr in an answer. For example, the following code will set an attribute called attributeName to the value attributeValue.

    {{setSessionAttr 'attributeName' 'attributeValue'}}
    
  2. Use the dedicated session attribute field to set a name/value pair.

    The attribute name can be a simple name like myAttribute or a complex name like myAttribute.subAttribute. You can also use the dot notation to set an attribute several levels deep.

NOTE: Avoid using appContext or qnabotcontext as attribute names. Setting these may have adverse effects on the system.

Canonical Session Attributes

Attributes

Attribute Name

Set By

Meaning

x-paragon-agentx:voice:next-action

User

Next action to take. See table below for possible values

x-paragon-agentx:voice:skip-next-prompt

User

If true, do not prompt for the next question

x-paragon-agentx:voice:pstn-target

User

If the next-action is PSTN-TRANSFER, must contain an E.164 phone number

x-paragon-agentx:voice:sip-target

User

If the next-action is SIP-TRANSFER, must contain a URL

x-paragon-agentx:connect:queue-target

User

If the next-action is QUEUE-TRANSFER, must contain the ID of an Amazon Connect queue

x-paragon-agentx:customer:src-number

AgentX

The source number of the phone call

x-paragon-agentx:customer:dst-number

AgentX

The destination number of the phone call

x-paragon-agentx:smt:message

User

Sets the message to be texted. If not set the last chatbot response in the chat history is sent.

Attribute Values for x-paragon-agentx:voice:next-action

Value

Behavior

TERMINATE

Hangup or end a chat contact

PSTN-TRANSFER

Transfer to a phone number

SIP-TRANSFER

Transfer to a SIP endpoint

QUEUE-TRANSFER

Transfer to an Amazon Connect queue