Variable Management in Flows

Variables store data in the context of workflow execution. You can use variables to store information and reference them at a later point in time. Variables in flows allow data to be shared between the flow nodes.

Variables are of two types: 

  • Static – the value that you assign to a variable remains constant throughout 
  • Dynamic – you can provide a different value every time or pass the value at the time of execution. 

Categories of Variables

Webex Connect categorizes variables into the following categories: 

  • Input Variables - the node-level variables that you can use from the preceding nodes.
  • Custom Variables - variables explicitly defined by you 
  • Output Variables - the auto-generated node-level variables of the current node that can be used in the subsequent nodes in the flow.
  • Session Variables - the variables used by the Webex Connect platform


Please note that all flow variables are case-sensitive.

Input Variables

A list of all variables available as input to this node is available under the Input Variables pane. It lists all the node variables from the nodes that are directly connected to this node. You can search for a variable using the Search field.

Custom Variables

Custom variables are the variables that you can create and use across nodes within a flow. You can see the list of variables that you explicitly create and configure for this node under the Custom Variables pane. 

You must explicitly create the custom variables. 

When you open the configuration window of any node on the flow canvas, the list of variable types is shown on the Contextual Information Sidebar. Custom Variables pane is available within the Input Variables pane.

You can create custom variables both at the node-level and flow-level.  Notwithstanding where you create custom variables, they are available for use across the flow.

Creating Custom Variables at Node-level

To create a custom variable at the node-level:

  1. Expand the Input Variables section in the Contextual Information Sidebar.  
  2. Expand Custom Variables and click Add New Custom Variable.

Add Custom Variable Dialog

  1. Enter a Variable Name and provide a Default Value if necessary.
  2. Optionally, externalize the variable by clicking the Externalize Variable checkbox. 

Creating Custom Variables at Flow-level

To create a custom variable at the flow-level:

  1. Open the flow for which you want to create the custom variables.
  2. Click the Settings icon located at the upper-right corner of the flow canvas to open the Flow Settings dialog.
  3. Go to the Custom Variables tab.

Custom Variables in Flow Settings

  1. Enter a Variable Name and provide a Default Value if necessary.
  2. Optionally, externalize the variable by clicking the Externalize Variable checkbox. 

External Variables

You can externalize the custom variables for setting the variable value later during the flow launch. This allows the variable values to be managed centrally across multiple nodes at once during flow launch. 

The variables can be externalized both at the node-level and the flow-level. For instructions about externalizing the variables, see the Custom Variables section.

The Contextual Information Sidebar in the node window lists all the variables available. 


Using Variables

To use any of these variables in the node configuration, place the cursor in any of the text boxes within the node configuration dialog box and select the required variable from the Contextual Information Sidebar. For example, the response received from the end-user in a Receive node with node ID 11 is available through the $(n11.receive.message) node-level variable.

Output Variables

The node output variables of the current node are listed under the Output Variables pane. The list of output variables varies from node to node.

The node-level variables are auto-generated by each node and can be referenced in other nodes later in the flow. The auto-generated output variables contain the data that a node produces when the flow execution passes through that node. These variables are prefixed with the node id allowing unique access to each of these variables. For example, the customer response that a receive node captures is stored in the nodeid.receive.message output variable.

Session Variables

The variables that are used by the Webex Connect platform are listed below. They should not be created by you. If your use case has a utility of these variables in your flows, refer to the list below for more information.

Variable NameFunctionality of VariableExample Value
tsUsed for timestamp tracking1702318777 (WhatsApp channel) , Note - the timestamp format changes with channel.
servicekeyUUID of Services; Service key of the service in which flow is live.af962501-8f39-11ec-b7c7-0255675b26f
deliverychannelTo determine the channel the programme will send the message through.push
channelsKeyword used in the API-level requestsms,voice,mms etc
messageUsed for API channel message field; Can contain message received in the channel.message
destinationEnd user destination number and different kinds of destination details918142191481
appidContains asset id used to make the flow live.a_1641271202087488374
notifyurlIts for notifying the different kinds of notifications in the platform
expiryUsed for the api expiry time
payloadits used in different kind of api payloads and send node requestIf the last executed node is the HTTP node, it can contain the payload of HTTP response.
senderidIt defines the Sender ID value in the SMS channel447418367465
thread_idIt defines the Thread ID value in RT and Push channelaf962501-8f39-11ec-b7c7-0hr764hr8h9
destinationTypeDestination types like userid and customerId
channelNameIts defines the channel name in various levelsSMS
identifierIdentifier for ABC channel; Contained in ABC API payload
numberUsed in SMS or number-related channels4479827876
country_codeUsed in SMS, MMS, and Voice API-level requests91, 44
attachmentsUsed in API-level requests to provide attachments
templateUsed in API payloads for the template-related requests
templateIdUsed in API payloads for the template-related requests
contentTypeUsed in API payloadsapplication/JSON
msisdnSMS IDNumber format. either in E.164 format or a numerical values.
midUsed in different channels to correlate the gateway to Connect TIDs
transidUUID for the transactionaf962501-8f39-11ec-b7c7-09283328y723e
callbackdataUsed in all API requests to provide Callback Data
evtidUsed in event APIs
useridUsed in Profile API requests
customeridUsed in Profile API requests
otpUsed in WhatsApp channel OTP template
srcreqorigintimeUsed to track when the request was launched