From Bright Pattern Documentation
Jump to: navigation, search
• 3.10 • 3.11 • 3.12 • 3.13 • 3.14 • 3.15 • 3.16 • 3.17 • 3.18

Variables

This section describes the variables that are used in ServicePattern scenarios. Variables are accessed using the common $(varname) format. They can be used in integer and string expressions.

Note: Most of the scenario variables are local, i.e., their values are available to the scenario where they are defined and to the sub-scenarios that are started from that parent scenario using the Start Another Scenario block. Variable $(item.customerPhone), as well as all variables in the General category, of scenarios launched for consult calls and blind transfers inherit values of the same variables of the associated primary calls. To share data between independent scenarios, consider using blocks Fetch URL or DB Execute to store variable values in a persistent storage and to access them from other scenarios.


General
$(destination) Destination for the Connect Call or Connect Chat block.
$(fetchURLResultBody) The body of HTTP response received by most recent Fetch URL block. Note that the block will report the same value via the $(integrationResultBody) variable below.
$(fetchURLResultCode) The code of HTTP response received by most recent Fetch URL block. Note that the block will report the same value via the $(integrationResultCode) variable below.
$(integrationResultBody) The body of HTTP response received by most recent of these integration blocks: RightNow Create Object, RightNow Search, RightNow Update, Salesforce.com Delete, Salesforce.com Insert, Salesforce.com Search, Salesforce.com Update, Zendesk Create Object, Zendesk Search, Zendesk Update, and Fetch URL.

To understand why an attempt to look up or update data in a third-party application may have failed, consider using this variable and the corresponding $(integrationResultCode) after each integration block in the following manner:

  • Use the If block to separate failed attempts from successful ones, e.g., If scenario variable (number) $(integrationResultCode) is not = 200. (The exact expression will depend on the messages returned by the third-party application, their codes, and the types of messages you expect to be notified about.)
  • For failed attempts, use either the EMail or Internal Message block to submit content of both these variables to concerned personnel.
$(integrationResultCode) The code of HTTP response received by most recent of the integration blocks. For more information, see description of variable $(integrationResultBody) above.
$(agentState) The state of the agent obtained by most recent Set Agent State block.
$(notReadyReason) The Not Ready reason of the agent obtained by most recent Set Agent State block.
$(doNotRecord) Can be set to 1 or true (case insensitive) prior to Connect Call block to disable call recording. This overrides all recording settings in configuration and the value of the Record checkbox in Connect Call block.
$(targetDisconnectedCause) In the event of agent connection loss during a chat with a customer, this variable informs the chat scenario of which side has disconnected and gives an option to continue the conversation using the chat scenario or another agent. This can be used as a conditional exit in chat scenarios.
$(XXX) A custom (user-defined) variable. Substitute XXX with a meaningful variable name, e.g., $(accountNumber). Custom variables are used to pass custom data between blocks of the same scenario and to transfer such data from scenarios of primary customer calls to the associated dependent calls (consultations and blind transfers). Scenarios launched for consult calls and blind transfers will re-create all custom variables defined in scenarios of the associated primary calls and will inherit their values.
Screenpop data
$(screenpopData.XXX) List of screenpop data received or set by IVR. Actual list of available screenpop data elements depends on the particular IVR and integration.
Interaction Properties
$(item.globalInteractionId) Global interaction identifier.
$(item.interactionId) Interaction identifier. This parameter is maintained for backward compatibility. Starting from release 3.11, the $(item.globalInteractionId) variable is recommended for use in any operations involving interaction identification.
$(item.interactionStepId) Interactions step identifier. Can be used to create URLs to call recordings in the following format: https://host:8443/admin/?interactionId=829314033221498390341. This parameter is maintained for backward compatibility. Starting from release 3.11, the $(item.globalInteractionId) variable is recommended for use in any operations involving interaction identification.
$(item.media) Media type. Can be set to voice or chat.
$(item.from) Origination address (phone number or chat user display name). Also known as ANI.
$(item.to) Destination address (dialed phone number or chat launch point name). Also known as DNIS.
$(item.customerPhone) Customer phone number. This variable enables passing customer phone information from scenarios of primary inbound and outbound customer calls to scenarios of the associated consultations and blind transfers.
  • In scenarios launched for new incoming calls its value matches the value of the $(item.from) variable (see above)
  • In scenarios launched for new outgoing calls its value matches the value of the $(item.to) variable (see above)
  • In scenarios launched for consult calls and blind transfers, inherits the value of the $(item.customerPhone) from the scenarios of the associated primary calls
$(item.priorTo) Prior destination address (phone number or chat launch point name); used for forwarded calls.
$(item.firstName) Customer first name. Scenario may get or set this variable. Setting the variable also updates historical database interaction step as well as customer chat party information.
$(item.lastName) Customer last name. Scenario may get or set this variable. Setting the variable also updates historical database interaction step as well as customer chat party information.
$(item.fullName) Customer full name. Scenario may get or set this variable. For voice calls it is set to display name as received from the network. For chat this is initially empty, but can be set by scenario.
$(item.email) Customer email address. May contain multiple addresses separated by a comma or semicolon. Scenario may get or set this variable.
$(item.sendTranscript) For chat interactions, scenario must set this variable to 1 to have session transcript emailed to the customer. The variable can be set at any time. The transcript will be emailed to the address(es) specified in $(item.email) when the session ends. For the corresponding email template and SMTP configuration, see section Email Settings of the ServiceProvider Contact Center Administrator Guide.
$(item.data) Key-value list of optional additional interaction data. To obtain content of a particular data element, use $(item.data.<name>). E.g., $(item.data.firstName).
$(item.message) For chat interactions, last chat message received from the origination side.
$(item.newMessage) For chat interactions, adds new message as it was received from customer. Used to populate chat session with form field values. New message is treated as it was received from customer and is added to chat transcript.
$(item.sip.headers) Key-value list of SIP INVITE headers from inbound calls. Can be used to obtain content of individual P-, X- and Diversion headers. To obtain content of a particular header, use $(item.sip.headers.<header_name>). E.g., $(item.sip.headers.X-tdm-channelnubmer).
$(item.transcript) For chat interactions, full transcript of the chat session.
$(item.externalChatData) For chat interactions, full collection of data received from customer chat page. This is a container for all values that were entered by the customer while chat was in the Request Input block for their possible later use in the scenario.
$(item.virtualDevice) Voice scenario may set this variable to indicate that inbound call should not be terminated when scenario ends; instead call will be converted to "virtual phone" (used for external agents on PBX).
Scenario Configuration
$(app.version) Scenario version (as reported by configuration server).
$(app.appName) Scenario name.
$(app.name) Scenario entry name.
$(app.priority) Priority as specified in scenario entry.
$(app.tenantName) Tenant name.
Custom Parameters
$(app.custom.XXX) Custom parameters which can be specified in scenario entry. Must follow naming convention $(app.custom.XXX) where XXX is the name of the custom parameter. All scenario variables conforming to such convention are treated as custom parameters. The list of such parameters will be displayed in property Scenario parameters of every scenario entry associated with the given scenario. You can set values of such custom parameters for every scenario entry point separately.
User Configuration
$(user.id) Unique identifier assigned to this user object in configuration.
$(user.version) Version of user's configuration information.
$(user.loginId) User’s username.
$(user.team) Name of the team the user is assigned to.
$(user.firstName) User’s first name.
$(user.lastName) User’s last name.
$(user.phone) The phone number the user is logged on to or user's extension as specified in configuration.
Service Configuration
$(service.name) Name of the service (as specified in the scenario entry or in the Request Skill or Service block).
$(service.version) Version of service configuration information.
$(service.slPercent) Service level call percentage.
$(service.slTimeout) Service level timeout in seconds.
$(service.EWT) Current estimated waiting time for the service. Calculated as the average time the last twenty answered interactions waited in the service queue before being answered.
Outbound Target Work Items
$(workitem.firstName) Customer’s first name.
$(workitem.lastName) Customer’s last name.
$(workitem.suggestedPhone) Customer's default phone number.
$(workitem.otherInfo) All list fields except phones, first name and last name. E.g., $(workitem.otherInfo.MTN).
$(workitem.fullInfo) All list fields. E.g., $(workitem.fullInfo.MTN).



< Previous | Next >
< Previous | Next >