From Bright Pattern Documentation
< 5.19:Workflow-builder-reference-guide
Revision as of 02:44, 24 December 2025 by Wyler.metge (talk | contribs) (Updated via BpClonePage extension. Source page: draft:Workflow-builder-reference-guide/Variables)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 5.19 • 5.2 • 5.3 • 5.8

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
Info.40x40.png
  • 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)

Collection that 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):
    • topic (string): Topic name,
    • content (string): Answer for the topic question, string
    • hide_from_agent (0, 1): 1 if the topic is marked as hidden and 0 if not hidden from 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 divided 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 divided 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.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.

CRM Variables

If an interaction is initiated via a CRM integration (e.g., using a communication widget) and that interaction triggers a workflow, the following variables are available to the workflow:

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