Overview: Set Variable workflow module (Console)
Console > Workflows > Workflow modules > Overview: Set Variable workflow module (Console)
This article explains the Set Variable workflow module in Console.
In this article
Overview
The Set Variable workflow module is used to create a variable. A variable can hold a piece of data, like a name, pin number, or a phone number, for later use in a workflow. You can use a variable to save a piece of data that you want another workflow module to use.
This article explains the general structure of the Set Variable module and how you can use it to define variables in a workflow.
Configuring the Set Variable module
Once you’ve added a Set Variable module, you can double-click it to open and configure it. By configuring the Set Variable module, you can choose:
The name of your variable
The kind of data you want it to store
Left: The Set Variable module in a workflow
Above: The configuration page of the Set Variable module.
Initially, there are two dropdown menus for the Set Variable module.
Name (the name of the variable. This is what you use later in the workflow to refer to the data contained in the variable)
Type
The type menu is where you select what kind of value you want to query or map to. In most circumstances, these are properties of an interaction.
Linked IDs: For values from Salesforce, Zendesk, or a Custom Database
Advanced: For custom values and targeting advanced variables on an interaction.
Source: Contains data associated with the customer, like:
Phone Number
Email
Person Id
Person Device Id
Person Session Id
Details: Contains various data values associated with the input, including:
Tags
Comm Type
Recordings
Agent Recording
Caller Recording
Result
Notes
Points
Type
Queue
Contact Card URL
Avaya.cx User Email Address
Avaya.cx User First Name
Avaya.cx User Last Name
Avaya.cx User Full Name
Salesforce User Id
Zendesk User Id
Routing Details:
Inbound Number
Inbound Number Name
Channel Key
Email
Comm Type
Phone
Messaging
Video
Email
Task
Variable: This can be any custom variable name that you can use later in the workflow. For more information, see: Overview: Variable replacement in workflows
In the screenshot below, the source phone number (the phone number the customer called with) is being mapped to a variable called myVariable. Once created, the variable is able to be used anywhere in the rest of the workflow.
Use case
Variables are entirely customizable, so the possibilities of what you could do with a variable are open ended.
You could use the Set Variable module to aid in verification of a customer’s information with the aid of the Webhook module and the Decision module. Suppose that you have a workflow that checks whether a person calling into a workflow is an existing customer current with your organization.
Based on the results of the Webhook module, the Decision module analyzes:
Is the caller a current customer?
This could be based on an evaluation of whether the value returned by the webhook is true or false.
If the value is true, you can set a variable including the customer’s unique ID (like a Salesforce contact ID) from your system (retrieved by the webhook module)
If the value is false, you can set a variable indicating that the caller isn’t a customer and route them to a queue trained to handle new customers.
When you go to create the interaction, you can then map the variable to a field on the interaction for the queue user to see.
Visual breakdown
Exterior structure
This is the exterior structure of a Set Variable module. All modules share this same structure.
Reference the Overview: Workflow modules article to take a deeper dive into each of these components.
Interior structure
Below is the deep dive explanation for each interior area of the Set Variable module.
The screenshot above is what a fresh Set Variable module looks like before any configuration.
Label: The Label field is where you can give a customized name to the workflow module.
Save: Press the Save button to save any changes to the module.
Name: The Name field is where you define the name of the variable. This can’t contain any spaces.
Add: The Add button lets you add more variables to create.
Trash can: The Trash can icon removes a variable.
Type: The type menu is where you select what kind of value you want to use for the variable. In most circumstances, these are properties of an interaction.
Linked IDs: For values from Salesforce, Zendesk, or a Custom Database
Advanced: For custom values and targeting advanced variables on an interaction.
Source: Contains data associated with the customer, like:
Phone Number
Email
Person Id
Person Device Id
Person Session Id
Details: Contains various data values associated with the input, including:
Tags
Comm Type
Recordings
Agent Recording
Caller Recording
Result
Notes
Points
Type
Queue
Contact Card URL
Avaya.cx User Email Address
Avaya.cx User First Name
Avaya.cx User Last Name
Avaya.cx User Full Name
Salesforce User Id
Zendesk User Id
Routing Details:
Inbound Number
Inbound Number Name
Channel Key
Email
Comm Type
Phone
Messaging
Video
Email
Task
Variable: This can be any custom variable name that you can use later in the workflow. For more information, see: Overview: Variable replacement in workflows