How to create a global variable for chatbot subscribers
In your chatbot settings, you can add global variables. With their help, you will be able to use messages with predefined values common to all subscribers. For example, the name and address of your company, links to groups in social networks, or the name of a manager.
How to add a global variable
By default, there are three global variables available in the chatbot settings: $bot_name
(chatbot name), $current_datetime
(date and time), and $bot_id
(chatbot ID).
To create a new global variable, go to the chatbot settings and click the Create variable button.
Enter a variable name up to 64 characters in Latin characters. If the variable consists of several words, you can separate the words with _
and .
signs.
Select a variable type: string, number, date, phone, email, or URL.
Enter a variable value up to 500 characters.
To add a variable, click the Save button.
How to Use Global Variables
You can use global variables in campaigns and chatbot flows.
How to use global variables in campaigns
Start building your campaign. Select the chatbot to which the message will be sent.
Enter your message text. To insert variables, click on {} in the upper right corner of the text field and select the required variable from the drop-down list. You will find global variables in the list of all variables — they are separated at the bottom by a horizontal divider and start with a $
sign.
Each user will be sent a message with the variable value.
How to use global variables in the chatbot builder
Go to the flow builder of the desired chatbot.
In the text field of the Message element, enter your message. To insert variables, click on {} in the upper right corner of the text field and select the required variable from the drop-down list. You will find global variables in the list of all variables — they are separated at the bottom by a horizontal divider and start with a $
sign.
Each user will be sent a message with the variable value.
Last Updated: 22.06.2024
or