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.

    Rate this article about "How to Create a Global Variable for Chatbot Subscribers"

    User Rating: 4 / 5

    Previous

    How to Create a Variable in a Chatbot Audience

    Next

    How to Сheck Your Сhatbot User Interaction Statistics

    Popular in Our Blog

    Try creating a chatbot for Facebook Messenger for free