Available variables are common configuration items for chat flow components. Commonly used variables are created by default and displayed in the available variables section for use during chat flow orchestration. This topic describes default available variables and how to add, insert, and delete available variables.
Before you begin
Before you use available variables, you must enter the chat flow to be edited and find the component that needs to use the available variables.
In the Chat App Message Service console, click Chat Flow in the left-side navigation pane. On the Flow Management tab, click the name of the chat flow to be edited to go to the chat flow orchestration page.
Click the component that needs to use available variables on the canvas. The available variables section is displayed in the component configuration pane on the right side.
NoteDefault variables are available in flows that are triggered by WhatsApp, Instagram, Viber, or Messenger messages. For manually triggered flows, you need to click the Start node and add variables in Basic Configuration section.
Default variables
Variable | Description | Example |
incomingMessage | The first mobile originated (MO) messages from users. | Hello |
wabald | WhatsApp Business Account (WABA) ID. | 10***********23 |
wabaPhoneNumber | Phone numbers bound to WABAs. | 861301111**** |
customerPhoneNumber | The phone numbers of end users. | 861310000**** |
customerName | The names of end users. | John |
Create a variable
You can perform the following steps to create a variable. Before you create a variable, perform the steps described in the Before you begin section of this topic.
In the Set Variables component
On the left-side toolbar, click Component Library. Find and drag the Set Variables component to the canvas.
Click the component on the canvas and configure the variable on the right-side panel.
To add multiple variables, click Add Variable. After you finish configurations, click Save.
In the pop-up dialog box, click Save.
In the message settings
Some components support creating variables in message settings, such as Send a Viber Message and Send an Instagram Message. Click these components on the canvas. In the Message Settings section on the right-side panel, click Insert Variables.
Enter the variable name in the pop-up dialog box and click Create a variable. Close the dialog box and click Save.
In the pop-up dialog box, click Save.
In the Start node (for manually triggered flows)
Click Start on the canvas, turn off Specifying variables is not supported. Enter the variable you want to add in the Variable Name field.
To add multiple variables, click Add Variable. After you finish configurations, click Save.
In the pop-up dialog box, click Save.
Insert a variable
You can perform the following steps to insert a variable. Before you insert a variable, perform the steps described in the Before you begin section of this topic.
In the component configuration section, find the location where you want to insert a variable and click Insert Variables.
In the dialog box, find the desired variable and click Insert in the Operation column to insert the variable.
View the inserted variable.
Delete a variable
You can perform the following steps to delete an available variable. Before you delete a variable, perform the steps described in the Before you begin section of this topic.
Variables can be deleted only from the components where they are created. Default variables cannot be deleted. After deletion, the locations where the variables are used will fail to retrieve parameters. Proceed with caution.
In the Set Variables component
Click the Set Variables component on the canvas. In the right-side panel, find the variable you want to delete and click Delete.
NoteIf the variable was added when you inserted the variable, click Insert Variables and click Delete in the dialog box.
After deletion, click Save on the top. Then, click Save in the pop-up dialog box.
In the message settings
On the canvas, click the component where you want to delete the variable. In the right-side panel, click Insert Variables.
In the pop-up dialog box, find the variable you want to delete and click Delete.
After deletion, click Save on the top. Then, click Save in the pop-up dialog box.
In the Start node (for manually triggered flows)
Click the Start node on the canvas and then click the delete icon to delete the variable.
After deletion, click Save on the top. Then, click Save in the pop-up dialog box.