Variable Management in Flows
Learn about different Variables types that can be used at flow-level or node-level
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:
- Expand the Input Variables section in the Contextual Information Sidebar.
- Expand Custom Variables and click Add New Custom Variable.
- Enter a Variable Name and provide a Default Value if necessary.
- 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:
- Open the flow for which you want to create the custom variables.
- Click the Settings icon located at the upper-right corner of the flow canvas to open the Flow Settings dialog.
- Go to the Custom Variables tab.
- Enter a Variable Name and provide a Default Value if necessary.
- 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.
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 Name | Functionality of Variable | Example Value |
---|---|---|
ts | Used for timestamp tracking | 1702318777 (WhatsApp channel) , Note - the timestamp format changes with channel. |
servicekey | UUID of Services; Service key of the service in which flow is live. | af962501-8f39-11ec-b7c7-0255675b26f |
deliverychannel | To determine the channel the programme will send the message through. | push |
channels | Keyword used in the API-level request | sms,voice,mms etc |
message | Used for API channel message field; Can contain message received in the channel. | message |
destination | End user destination number and different kinds of destination details | 918142191481 |
appid | Contains asset id used to make the flow live. | a_1641271202087488374 |
notifyurl | Its for notifying the different kinds of notifications in the platform | https://requestinspector.com/inspect/hjr3984rhf3489fj304 |
expiry | Used for the api expiry time | |
payload | its used in different kind of api payloads and send node request | If the last executed node is the HTTP node, it can contain the payload of HTTP response. |
senderid | It defines the Sender ID value in the SMS channel | 447418367465 |
thread_id | It defines the Thread ID value in RT and Push channel | af962501-8f39-11ec-b7c7-0hr764hr8h9 |
destinationType | Destination types like userid and customerId | |
channelName | Its defines the channel name in various levels | SMS |
identifier | Identifier for ABC channel; Contained in ABC API payload | |
number | Used in SMS or number-related channels | 4479827876 |
country_code | Used in SMS, MMS, and Voice API-level requests | 91, 44 |
attachments | Used in API-level requests to provide attachments | |
template | Used in API payloads for the template-related requests | |
templateId | Used in API payloads for the template-related requests | |
contentType | Used in API payloads | application/JSON |
msisdn | SMS ID | Number format. either in E.164 format or a numerical values. |
mid | Used in different channels to correlate the gateway to Connect TIDs | |
transid | UUID for the transaction | af962501-8f39-11ec-b7c7-09283328y723e |
callbackdata | Used in all API requests to provide Callback Data | |
evtid | Used in event APIs | |
userid | Used in Profile API requests | |
customerid | Used in Profile API requests | |
otp | Used in WhatsApp channel OTP template | |
srcreqorigintime | Used to track when the request was launched |
Updated 4 months ago