Available variables are predefined values you can reference when building flows. You can also create, insert, and delete custom variables.
Before you begin
Before you use available variables, enter the journey you want to edit and locate the target component.
Log on to the Chat App Message Service console.
On the Agentic Journey page, click Edit next to the journey you want to modify to open the canvas editor.
On the canvas, click the component where you want to use available variables. The configuration panel on the right shows the Available Variables section.
For example, after you select the Send WhatsApp Message component, the Available Variables section of the right-side panel displays available variables such as
incomingMessage,serviceId, andcustomerPhoneNumber.NoteJourneys whose trigger type is incoming message trigger (WhatsApp, Instagram, Viber, Messenger, and others) have preset system variables. For a journey triggered by an API event, add variables in the Start node so that the journey can receive the parameters that you pass after it is triggered.
Default variables
Variable | Description | Example |
incomingMessageType | Type of the incoming message. |
|
incomingMessage | First incoming message from the end user. | Hello |
wabaId | WhatsApp Business Account (WABA) ID. | 10***********23 |
wabaPhoneNumber | Phone number associated with the WABA. | 861301111**** |
customerPhoneNumber | End user's phone number. | 861310000**** |
customerName | End user's name. | John |
customerPhoneNumberOrBsuid | BSUID value used when the phone number is unavailable. |
|
bsuid | BSUID value only. |
|
chatFlowSessionId | Journey session ID. |
|
Create a variable
Create variables using any of the following methods. First, complete the steps in Before you begin.
Set Variables component
From the Component Library on the left, drag the Set Variables component onto the canvas.
Click the Set Variables component on the canvas. Its configuration panel opens on the right.
To add multiple variables, click Add Variable. When you are finished, click Save.
In the Variable Configuration section, enter the Key and Value.
In the dialog box that appears, click Save.
On-the-fly creation
On the canvas, click a component such as Send a Viber Message or Send an Instagram Message. In the Message Settings panel, type
{{in the Content field to open a dropdown. Select an existing variable or type a new name to create one. The list includes variables such aschatFlowSessionId,incomingOutId, andincomingUuid.Click Save. In the dialog box that appears, click Save again.
Start node (manual triggers only)
On the canvas, click the Start node. In the Basic Settings panel on the right, turn off the Do Not Accept Incoming Variables switch. In the Variable Name field, enter the name for the new variable.
To add more variables, click Add Variable. After you add all the variables, click Save.
In the dialog box that appears, click Save.
Insert a variable
To insert a variable, first complete the steps in Before you begin.
In a component's configuration area, such as the Content field in the Message Settings panel, type
{{to open a variable dropdown. Select an existing variable from the list, which includes options likechatFlowSessionId,incomingOutId, andincomingUuid.
Delete a variable
Delete variables using the method that matches how they were created. First, complete the steps in Before you begin.
You can only delete a variable from the component where it was created. You cannot delete a System Variable. Deleting a variable may cause errors in other parts of the flow that reference it.
Set Variables component
On the canvas, click the Set Variables component. In the configuration panel, find the variable to remove and click Delete.
NoteIf the variable was created via insertion in the Set Variables component, click the variable, and then click Delete in the confirmation dialog that appears.
After deleting, click Save at the top of the canvas.
In the dialog box that appears, click Save to confirm.
Start node (manual triggers only)
On the canvas, click the Start node. In the configuration panel, click the delete icon next to the variable to remove.
After you delete the variable, click Save.
In the dialog box that appears, click Save to confirm.