From Bright Pattern Documentation
Jump to: navigation, search
• 5.19 • 5.3 • 5.8

Variables

This section describes the variables that are used in Bright Pattern Contact Center scenarios and workflows.

Variables are accessed using the common $(varname) format. They can be used in integer and string expressions.

Most of the scenario variables are local. Local means they do not contain a prefix (e.g., item., user., etc.) and 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 or Local 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.

Note: If you would like to pass information from scenarios to workflows, note that not all scenario variables pass information to workflows; however, local variables are always passed to workflows. For any variables that are not passed to workflows, you may use a Set Variable block to rename the required scenario variable into a local variable (e.g., set "varDNIS" to $(item.DNIS)).


Local Variables

$(destination)

$(destination) specifies the destination for the Connect Call or Connect Chat block.

Note that if the destination is an IVR, the phone number can include pauses and digits required to get to the desired contact or self-service option. Comma symbols are used for pauses; each comma will delay dialing of the next digit by one second (e.g., 18005552222,,,5,,245). For more information, see the Agent Guide, section How to Speed-Dial Through External IVRs.

$(___sip_response_code___)

$(___sip_response_code___) is an optional variable that specifies the SIP response code sent on an unanswered inbound call. The default is 480. It works only if the scenario has Accept or Answer blocks and the scenario finishes before the Answer block.

$(fetchURLResultBody)

$(fetchURLResultBody) specifies the body of HTTP response received by the most recent Fetch URL block. Note that the block will report the same value via the $(integrationResultBody) variable.

$(fetchURLResultCode)

$(fetchURLResultCode) specifies the code of HTTP response received by the most recent Fetch URL block. Note that the block will report the same value via the $(integrationResultCode) variable..

$(integrationResultBody)

$(integrationResultBody) specifies the body of HTTP response received by the most recent of these integration blocks:

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)

$(integrationResultCode) specifies the code of HTTP response received by the most recent of the integration blocks. For more information, see the description of the $(integrationResultBody) variable.

$(agentState)

$(agentState) specifies the state of the agent obtained by the most recent Get Agent State block.

$(notReadyReason)

$(notReadyReason) specifies the Not Ready reason of the agent obtained by the most recent Get Agent State block.

$(targetDisconnectedCause)

In the event of agent connection loss during a chat with a customer, the $(targetDisconnectedCause) variable informs the chat scenario of the cause of the agent's disconnection in the Target Disconnected branch of Connect Chat block. Possible causes could be one of the following: "UserHangup," "SystemHangup," "UserLogout," or "Failure."

$(doNotRecord)

$(doNotRecord) can be set to 1 or true (case insensitive) prior to Connect Call block to disable voice recording. This overrides all recording settings in configuration. Recording can still be enabled manually via Agent Desktop or via desktop API methods. See also $(banVoiceRecording).

$(banVoiceRecording)

The $(banVoiceRecording) variable can be set to 1 or true (case insensitive) to ban voice recording for the entire call. This overrides all recording settings in configuration. It will also block any any attempts to enable recording manually via Agent Desktop or via desktop API methods. See also $(doNotRecord).

$(banMonitoring)

The $(banMonitoring) variable can be set to "1" or "true" (case insensitive) to ban call monitoring by a supervisor.

$(ttsVoice)

$(ttsVoice) can be set to specify the TTS voice to be used by the scenario.

$(botContext)

The $(botContext) variable is part of the sentiment analysis context.

$(XXX)

$(XXX) is 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 recreate all custom variables defined in scenarios of the associated primary calls and will inherit their values.


Screenpop Data

$(screenpopData.XXX)

$(screenpopData.XXX) specifies the list of the screen pop data received or set by interactive voice response (IVR). An actual list of available screen pop data elements depends on the particular IVR and integration.


Media Item (Call, Chat) Properties

$(item.globalInteractionId)

$(item.globalInteractionId) specifies the Global interaction identifier.

$(item.interactionId)

$(item.interactionId) specifies the interaction identifier. This parameter is maintained for backward compatibility. Starting with Bright Pattern Contact Center version 3.11, the $(item.globalInteractionId) variable is recommended for use in any operations involving interaction identification.

$(item.interactionStepId)

$(item.interactionStepId) specifies the interactions step identifier. This variable can be used to obtain recordings and the related metadata via the Interaction Content API.

For any other operations involving interaction identification, the $(item.globalInteractionId) variable should be used.

$(item.media)

$(item.media) specifies the media type. This variable can be set to voice or chat.

$(item.from)

$(item.from) specifies the origination address (e.g., phone number, chat user display name, or chat user IP address). This variable is also known as ANI.

$(item.to)

$(item.to) specifies the destination address (i.e., dialed phone number or chat launch point name). This variable is also known as DNIS.

$(item.priorTo)

$(item.priorTo) specifies the prior destination address (phone number or chat launch point name). It is used for forwarded calls.

$(item.contactId)

$(item.contactId) specifies the ID of the CRM contact associated with the caller, if any.

Note: This variable is available in workflows.

$(item.firstName)

$(item.firstName) specifies the customer first name. The scenario may get or set this variable. Setting the variable also updates the historical database interaction step as well as customer chat party information.

Note: This variable is available in workflows.

$(item.lastName)

$(item.lastName) specifies the customer last name and passes the ANI for SMS interactions. The scenario may get or set this variable. Setting the variable also updates the historical database interaction step as well as customer chat party information.

Note: This variable is available in workflows.

$(item.customerPhone)

$(item.customerPhone) specifies the 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.
  • In scenarios launched for new outgoing calls, its value matches the value of the $(item.to) variable.
  • In scenarios launched for consult calls and blind transfers, the value of the $(item.customerPhone) is inherited from the scenarios of the associated primary calls.

Note: This variable is available in workflows.

$(item.email)

$(item.email) specifies the customer email address. It may contain multiple addresses separated by a comma or semicolon, and the scenario may get or set this variable.

Note: This variable is available in workflows.

$(item.sendTranscript)

For chat interactions, scenario must set the $(item.sendTranscript) variable to 1 to have a 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 Contact Center Administrator Guide.

$(item.data.<name>)

$(item.data.<name>) specifies a 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, the $(item.message) variable specifies the last chat message received from the origination side.

$(item.newMessage)

For chat interactions, the $(item.newMessage) variable adds a new message as it was received from customer. This variable is used to populate a chat session with form field values. The new message is treated as it was received from the customer and is added to chat transcript.

$(item.transcript)

$(item.transcript) gets the full JSON transcript of the chat session or voice call (i.e., if Speech to Text integration is configured).

$(item.transcript.text)

$(item.transcript.text) gets the text transcript of the chat session or voice call (i.e., if Speech to Text integration is configured).

$(item.transcript.HTML)

$(item.transcript.HTML) gets the HTML formatted transcript of the chat session or voice call (i.e., if Speech to Text integration is configured).

$(item.transcript.JSON)

$(item.transcript.JSON) gets the full JSON transcript of the chat session or voice call (i.e., if Speech to Text integration is configured).

$(item.externalChatData)

For chat interactions, use the $(item.externalChatData) variable to specify the full collection of data received from the 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.

In addition, $(item.externalChatData) can be used to pass custom variables from widget pre-chat configuration. Input fields (text boxes) can be saved as these custom variables. and the name field is what is saved as the ending of the variable (e.g., name = issue variable = $(item.externalChatData.issue)). Note that this variable is case-locked; the variable must be typed in lowercase for it to work.

$(item.externalChatData.user_platform.browser)

For chat interactions, this variable returns the type and version of the browser used by the customer. Note that this variable will contain data only if the customer-side chat application was designed using the Bright Pattern Chat Widget Configuration application.

$(item.externalChatData.user_platform.os)

For chat interactions, this variable returns the type and version of the operating system used by the customer. Note that this variable will contain data only if the customer-side chat application was designed using the Bright Pattern Chat Widget Configuration application.

$(item.externalChatData.user_platform.description)

For chat interactions, this variable returns the type and version of both the browser and operating system used by the customer. Note that this variable will contain data only if the customer-side chat application was designed using the Bright Pattern Chat Widget Configuration application.

$(item.virtualDevice)

The voice scenario may set the $(item.virtualDevice) variable to indicate that an inbound call should not be terminated when the scenario ends; instead, the call will be converted to "virtual phone" (used for external agents on PBX).

$(item.sip.headers)

$(item.sip.headers) gets the key-value list of SIP INVITE headers from inbound calls. This variable 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-channelnumber)).

$(item.sip.send.headers.XXX=ZZZ)

When making a call using the Connect Call block, before calling the Connect Call block, the scenario can set SIP headers to be included in INVITE in the format item.sip.send.headers.XXX=ZZZ, where XXX is a header name (e.g., "P-Customer-Type"). Note that the XXX must begin with either the letter P or the letter X.

$(item.EWT)

For voice and chat interactions, $(item.EWT) is the item's current estimated waiting time (in seconds).

$(item.queuePos)

For voice and chat interactions, $(item.queuePos) is the item’s current position in queue. This variable displays results while the interaction is in the Find Agent block; it is blank at all other times.

$(item.continuationUserId)

If the customer had contacted the system before and was connected to an agent, the $(item.continuationUserId) variable will contact the user ID of the agent. It could be used to route new customer interaction to the same agent. Note: In order to use this variable, you must include an Identify Contact block either before your scenario's Find Agent block and/or before you make references to this variable. For more information, see How to Configure Last-Agent Routing Using the Internal Database.

$(item.averageSentiment)

If sentiment analysis is being performed on an interaction, the $(item.averageSentiment) variable is set to the current average sentiment value. It is changed whenever the average sentiment is updated.

Note: This variable is available in workflows.

$(item.sentiment)

If sentiment analysis is being performed on an interaction, the $(item.sentiment) variable is set to the sentiment value of the last analyzed phrase.

$(item.emotion)

If sentiment analysis is being performed on an interaction, the $(item.emotion) variable is set to the emotion value of the last analyzed phrase.

$(item.keywords)

If sentiment analysis is being performed on an interaction, the $(item.keywords) variable is set to the array of the keywords found in the last analyzed phrase.

$(item.coBrowsing)

If co-browsing is enabled, $(item.coBrowsing) used to determine if a co-browsing session was requested by the chat client; the variable may be added to custom reporting fields in scenarios. If the variable returns the integer value 1, this means a co-browsing session was requested within a chat session; the initial value is 0.

Note: If a Set Custom Reporting Field block is placed after the Connect Chat block, we recommend a Wait block with a one second delay should be added before the Set Custom Reporting Field block in order for the feature to work properly.


Scenario Configuration Properties

$(app.version)

'$(app.version) specifies the scenario version (as reported by configuration server).

$(app.appName)

The $(app.appName) variable specifies the scenario name.

$(app.name)

$(app.name) specifies the scenario entry name.

$(app.priority)

The $(app.priority) variable holds the priority specified in the scenario launch point.

Note that all variables that begin with "app" are configuration parameters from either the scenario itself (i.e., app.name) or the launch point (i.e., app.priority).

$(app.tenantName)

$(app.tenantName) is the tenant name.


Custom Parameters

$(app.custom.XXX)

$(app.custom.XXX) names the custom parameters that can be specified in a scenario entry. The variable 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 the 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 Variables

$(user.id)

$(user.id) is the unique identifier assigned to this user object in configuration.

$(user.version)

$(user.version) is the version of the user's configuration information.

$(user.loginId)

This variable is the user’s username.

Note: This variable is available in workflows.

$(user.team)

$(user.team) is the name of the team to which the user is assigned.

$(user.firstName)

$(user.firstName) is the user’s first name.

Note: This variable is available in workflows.

$(user.lastName)

$(user.lastName) is the user’s last name.

Note: This variable is available in workflows.

$(user.phone)

This variable is the phone number that the user is logged onto or the user's extension as specified in configuration.


Service Parameters

$(service.name)

$(service.name) is the name of the service (as specified in the scenario entry or in the Request Skill or Service block).

$(service.version)

$(service.version) is the version of service configuration information.

$(service.slPercent)

This variable specifies the Service level call percentage.

$(service.slTimeout)

The $(service.slTimeout) variable specifies the Service level timeout in seconds.

$(service.EWT)

$(service.EWT) is the current estimated waiting time for the service. It is calculated as the average time the last 20 answered interactions waited in the service queue before being answered.

$(service.queueLength)

$(service.queueLength) is current queue length for the service.


Outbound Target Workitem Parameters

$(workitem.id)

$(workitem.id) is the Workitem identifier.

$(workitem.firstName)

$(workitem.firstName) is the customer’s first name.

$(workitem.lastName)

$(workitem.lastName) is the customer’s last name.

$(workitem.suggestedPhone)

This variable is the customer's default phone number.

$(workitem.otherInfo)

$(workitem.otherInfo) specifies all list fields except phones, first name, and last name (e.g., $(workitem.otherInfo.MTN)).

$(workitem.fullInfo)

$(workitem.fullInfo) specifies all list fields (e.g., $(workitem.fullInfo.MTN)).



< Previous | Next >