All Products
Search
Document Center

Chat App Message Service:Use available variables

Last Updated:Feb 26, 2025

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. 

  1. 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.image

  2. 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.

    image

    Note

    Default 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

  1. On the left-side toolbar, click Component Library. Find and drag the Set Variables component to the canvas.

  2. Click the component on the canvas and configure the variable on the right-side panel.

  3. To add multiple variables, click Add Variable. After you finish configurations, click Save.

    image

  4. In the pop-up dialog box, click Save.

    image

In the message settings

  1. 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.

    image

  2. Enter the variable name in the pop-up dialog box and click Create a variable. Close the dialog box and click Save.

    image

  3. In the pop-up dialog box, click Save.

    image

In the Start node (for manually triggered flows)

  1. Click Start on the canvas, turn off Specifying variables is not supported. Enter the variable you want to add in the Variable Name field.

  2. To add multiple variables, click Add Variable. After you finish configurations, click Save.

    image

  3. In the pop-up dialog box, click Save.

    image

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. 

  1. In the component configuration section, find the location where you want to insert a variable and click Insert Variables.image

  2. In the dialog box, find the desired variable and click Insert in the Operation column to insert the variable.image

  3. View the inserted variable. image

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. 

Important

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

  1. Click the Set Variables component on the canvas. In the right-side panel, find the variable you want to delete and click Delete.

    Note

    If the variable was added when you inserted the variable, click Insert Variables and click Delete in the dialog box.

    image

  2. After deletion, click Save on the top. Then, click Save in the pop-up dialog box.

    image

In the message settings

  1. On the canvas, click the component where you want to delete the variable. In the right-side panel, click Insert Variables.

    image

  2. In the pop-up dialog box, find the variable you want to delete and click Delete.

    image

  3. After deletion, click Save on the top. Then, click Save in the pop-up dialog box.

    image

In the Start node (for manually triggered flows)

  1. Click the Start node on the canvas and then click the delete icon to delete the variable.

    image

  2. After deletion, click Save on the top. Then, click Save in the pop-up dialog box.

    image