From Bright Pattern Documentation
Jump to: navigation, search

Workflow Variables

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

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


Passing Variables Between Scenarios and Workflows
  • 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.
  • Local variables 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.
  • 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)).


Common Variables

$(user.loginId)

$(user.loginId) specifies the agent's login ID if the workflow is started due to agent action.

Note: This variable is available in scenarios.

$(user.firstName)

$(user.firstName) specifies the agent's first name.

Note: This variable is available in scenarios.

$(user.lastName)

$(user.lastName) specifies the agent's last name.

Note: This variable is available in scenarios.

$(item.caseId)

$(item.caseId) specifies the case ID of the interaction, if available.

$(item.caseNumber)

$(item.caseNumber) specifies the case number of the interaction, if available.

$(item.contactId)

$(item.contactId) specifies the contact ID of the customer, if available.

Note: This variable is available in scenarios.

$(item.firstName)

$(item.firstName) specifies the first name of the customer, if available.

Note: This variable is available in scenarios.

$(item.lastName)

$(item.lastName) specifies the last name of the customer, if available.

Note: This variable is available in scenarios.

$(item.agentSummary)

Provides access to Real-Time AI Summaries generated for the interaction.

When the workflow is triggered by Interaction ends with last disposition or Interaction ends with average sentiment, only the summary for the last agent is available, aligned with that agent’s dispositions and notes.

To capture summaries for all agents involved in the interaction, trigger the workflow with the Agent completes interaction with any disposition trigger.

$(item.agentSummary.JSONObject)

Contains the Real-Time AI Summary as a JSON object with the following structure:

  • template_name (string): The name of the template used to generate the summary.
  • topics (array of objects):
    • name (string): Topic name.
    • value (string): Response to the topic prompt.
    • hide_from_agent (0, 1): 1 if the topic is marked as hidden and 0 if not hidden from the agent.


  {
   "template_name": "Example Template",
   "topics": [
      {
      "name" : "Reason for Contact",
      "value" : "The customer called about a free room carpet cleaning special for $120.",
      "hide_from_agent" : "0"
      },
      {...}
    ]
  }

$(item.agentSummary.HTML)

Provides the Real-Time AI Summary with topic titles formatted for readability in HTML. Topics are separated by an empty line. Note that all topics are included, even if they are marked as hide from agent.

$(item.agentSummary.text)

Provides the Real-Time AI Summary in plain-text format. Topics are separated by an empty line. Note that all topics are included, even if they are marked as hide from agent.

$(global_interaction_id)

$(global_interaction_id) specifies the Global interaction identifier. This variable is also known as $(item.globalInteractionId).

Note: This variable is available in scenarios.

$(disposition)

$(disposition) specifies the disposition that was used in an interaction.

Note: This variable is available in scenarios.

Variables for Chat

$(item.averageSentiment)

If sentiment analysis is being performed on interaction, this variable is set to the current average sentiment value.

Variables for Email

$(item.cc)

A string containing any addresses in the CC (carbon copy) field of the email. Multiple addresses will be separated by commas, for example "Name" <email@domain.com>, email2@domain.com).

$(item.language)

Auto detected language from email content

$(item.replyTo)

Email reply-to address


Variables for Voice

$(LanguageAsked)

$(LanguageAsked) specifies whether the customer asked for a specific language (e.g., "Yes").

$(NPS_raw)

$(NPS_raw) specifies the Net Promoter Score (NPS) value (e.g., "11").

$(contact_satisfaction)

$(contact_satisfaction) specifies the customer's contact satisfaction rating (e.g., "1").

$(destination)

$(destination) specifies the destination for the Connect Call block (e.g., "2042").

Note: This variable is available in scenarios.

$(first_call)

$(first_call) specifies whether this voice interaction is the first placed call (e.g., "1").

$(screenpopData)

$(screenpopData) 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.

Note: This variable is available in scenarios.

$(item.ANI)

$(item.ANI) specifies the Automatic Number Identification (ANI), a telephone company service providing a calling party with a number of the calling party. "ANI" is often used instead of “calling party number.”

Note: This variable is available in scenarios.

$(item.DNIS)

$(item.DNIS) specifies the Dialed Number Identification Service (DNIS), a telephone company service providing the called party with a number that was dialed by the calling party. "DNIS" is often used as a shorthand for "called party number."

Note: This variable is available in scenarios.

$(item.cnam)

$(item.cnam) is the caller ID display name (if provided by the SIP network).

$(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 scenarios.

$(item. Email)

Customer e-mail address. Scenario may get or set this variable.

$(item.averageSentiment)

If sentiment analysis is being performed on interaction, this variable is set to the current average sentiment value.

$(item. from)

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

$(item.interactionId)

$(item.interactionId) specifies the interaction identifier.

Note: This variable is available in scenarios.

$(item.media)

$(item.media) specifies the media type (e.g., "voice").

Note: This variable is available in scenarios.

$(outbound_data)

$(outbound_data) contains data from calling lists and is available if the workflow is triggered from outbound campaign.

$(notes)

Case/ Disposition notes, if available

$(item.transcript.JSON)

$(item.transcript.JSON) returns the full transcript of the chat session or voice call as a JSON-formatted string.

Note: This variable can pass information from scenarios.

$(item.transcript.HTML)

$(item.transcript.HTML) contains the HTML formatted transcript of the chat session or voice call.

Note: This variable can pass information from scenarios.

$(item.transcript.text)

$(item.transcript.text) contains the text transcript of the chat session or voice call.

Note: This variable can pass information from scenarios.

Historical Asset Variable Collections

Variables containing Historical Transcripts and data generated by the Intelligence Engine.

$(item.customerSummary)

Provides access to Historical AI Summaries generated after an interaction has ended. The Wait Historical Asset block must execute successfully to populate this collection. If populated, the collection contains the summary for the entire interaction, regardless of whether the workflow was triggered per agent or per interaction.

$(item.customerSummary.JSONObject)

Contains the Historical AI Summary as a JSON object with the following structure:

  • template_name (string): The name of the template used to generate the summary.
  • topics (array of objects):
    • name (string): The topic name.
    • value (string): The content/answer for the topic.
    • hide_from_agent (boolean): 1 if the topic is hidden from agents and 0 if it is visible.


For example:

{
   "template_name": "Default",
   "topics": [
{
    "name" : "Reason for Contact",
    "value" : "The customer called about a free room carpet cleaning special for $120.",
    "hide_from_agent" : "0"
  },
{...}  
   ]
}

$(item.customerSummary.HTML)

Provides the Historical AI Summary with topic titles formatted for readability in HTML. Topics are separated by an empty line. Note that all topics are included, even if they are marked as hide from agent.

$(item.customerSummary.text)

Provides the Historical AI Summary with topic titles in plain-text format. Topics are separated by an empty line. Note that all topics are included, even if they are marked as hide from agent.

$(item.histTranscript)

Provides access to the Historical Transcript of an interaction. The Wait Historical Asset block must execute successfully to populate this collection. If populated, the collection contains the transcript of the entire interaction, regardless of whether the workflow was triggered per agent or per interaction.

$(item.histTranscript.JSONArray)

Returns the full Historical Transcript of the interaction as a JSON array of event objects, including metadata.

$(item.histTranscript.HTML)

Returns the full Historical Transcript formatted with HTML.

$(item.histTranscript.text)

Returns the full Historical Transcript formatted as plain-text.

$(item.categorySets)

Contains the results of Categorization performed on the interaction. The Wait Historical Asset block must execute successfully to populate this collection.

$(item.categorySets.JSONArray)

Contains the categorization results as an array of JSON objects with the following structure:

  • set_name (string): The name of the Category Set.
  • subset_name (string): The name of the Category Subset (optional).
  • categories (array of strings): A list of categories indicated by Intents triggered in the interaction.


For example:

[
    {
      "set_name": "Reason for Contact",
      "categories": ["Cancellation", "Reschedule"],
    },
    {
      "set_name": "Emotions",
      "subset_name": "Negative",
      "categories": ["Anger", "Disappointment"],
    },
    {...}
  ]

$(item.categorySets.categoriesAll)

Contains an array of all distinct categories triggered during the interaction across all category sets. For example:

["Cancellation", "Reschedule", "Anger", "Disappointment", "Confusion"]

$(item.discoveries)

Contains the tags and discoveries identified for the interaction by Discovery. The Wait Historical Asset block must execute successfully to populate this collection.

$(item.discoveries.JSONArray)

Contains the Discovery results for the interaction as an array of JSON objects with the following structure:

  • discovery_name (string): The name of the discovery.
  • tags (array of strings): A list of tags identified for that discovery.


For example:

[
    {
      "discovery_name": "Reason for Contact",
      "tags": ["Cancellation", "Reschedule"],
    },
    {
      "discovery_name": "Sentiment",
      "tags": ["Negative"],
    },
    {...}
]

$(item.discoveries.tagsAll)

An array containing all distinct tags identified across all discoveries for the interaction. For example:

["Cancellation", "Reschedule", "Negative"]

CRM Variables

If an interaction initiated via CRM integration (e.g. using a communication widget) triggers a workflow, that workflow has access to the following CRM variables. For an example of these variables in use, see Associating Calls with Relevant Microsoft Dynamics Records.

$(recordingUrl)

$(recordingUrl) contains the URL to the interaction recording within the Contact Center Administrator application.

$(playbackUrl)

$(playbackUrl) contains the standalone URL for playing back the interaction recording.

$(serviceName)

$(serviceName) specifies the name of the service associated with the interaction.

$(direction)

$(direction) specifies the direction of the interaction. Possible values are "inbound" and "outbound".

$(duration)

$(duration) specifies the interaction duration in seconds.

$(startTime)

$(startTime) specifies the timestamp indicating when the interaction started.

$(endTime)

$(endTime) specifies the timestamp indicating when the interaction ended.

$(numberOfAssociatedRecords)

$(numberOfAssociatedRecords) specifies the number of CRM records that the agent validated as associated with the interaction.

$(associatedRecords)

$(associatedRecords) contains an array of JSON objects identifying the CRM records associated with the interaction. The length of the array matches the value of $(numberOfAssociatedRecords). Each JSON object includes two properties: "objectId" (the record ID within the CRM) and "objectType" (the record type within the CRM).

$(activityRecordId)

$(activityRecordId) specifies the ID of the created activity record. If the CRM integration created multiple activity records, this variable contains the ID of the first record only.

< Previous | Next >