How to manage chatbot subscribers, their variables, and tags
Using variables and tags, you can organize and store all the necessary subscriber information, including their orders and preferences, to personalize interactions with each subscriber or a group of subscribers based on specific filter criteria.
In this article we will talk about how to create and manage audience variables and tags.
How to manage variables
You can create a variable in the audience without a value, add a variable with a value at once, or update a value in an existing variable for all or one contact.
Creating a variable
The functionality of adding variables is the same for all messengers. Variables are created for all contacts in the "Audience" list.
Manually, via Audience | Go to the Audience tab. Click Create Variable on the right. Enter your variable name and type, and click Create. Read more: How to Create a Variable in a Chatbot Audience. |
You can create a variable using the flow editing mode so that you are able to configure adding the variable value automatically for each contact that has passed through that element of the flow. | |
Manually, using the Message: User input element in the flow | Switch to the flow editing mode. Add the Message element. Activate Wait for the subscriber's response. Next to the Save response to a variable option, click Create Variable.
Note that you can only create a variable of the |
Manually, using the Action: Set Variable element in the flow | Switch to the flow editing mode. Add an Action element. Select the Set Variable action, and click Create Variable. Enter the variable name and type. |
Manually, using the API request element in the flow | Switch to the flow editing mode. Add the API Request element. Enter the request data, and click Validate Request. Next to the Reply field option, click Create a variable. Enter the variable name and type. |
Editing your variable name
Go to Audience. Select the column of the variable you want to edit. Click the Edit icon. Select the text, delete it, enter your new value that’s no longer than 64 characters, and press the Enter key.
The variable name can contain no more than 64 characters.
Note that the changes apply to all subscribers to the chatbot. If you used variables in chatbot flows or scheduled campaigns, you will need to change the variable yourself.
Adding or updating your variable value
When adding new variable value, pay attention to the variable type. Each variable type has its own character limit. You can set values for your variables manually via API and add them automatically. Your variable value can contain up to 1,024 characters.
Manually, via Audience (for one contact) | Go to the Audience tab. Next to the desired contact, click on the cell below the variable, enter the value, and then press the Enter key. |
Manually, via Audience (for a contact list) | Go to the Audience tab. Highlight the desired contacts, and click Set Variable. Select which variable you want to set, and enter the value. |
Manually, in the chat with a subscriber | Go to Conversations, and click on the desired contact. In the panel on the right, next to the desired variable, enter your value. |
When subscribing via a widget | You can also add a script to collect additional variables when your users subscribe via the widget.
Copy the code, and paste it into the source code of your site next to the subscription widget script. Note that values can be added only to variables which you previously created. Data sent to non-existent fields will be ignored. |
The Set variable value API method | Used to create external integrations.
Send a POST to In the request header, add the authorization token. In the request body, add the contact ID, the name or ID of the variable for which you want to add new value, and the value itself. Substitute the desired request endpoint for each social network:
|
In the flow editing mode, you can configure to automatically add new variable value to each contact that has passed through that element of your flow. | |
The Message: User Input element | Switch to the flow editing mode. Add the Message element. Activate Wait for reply from subscriber. Next to the Save response to a variable option, select the variable for which you want to add new values received from the user. |
The Action: Set Variable element | Switch to the flow editing mode. Add an Action element. Select the Add Variable action, and specify the variable for which you want to save the values.
Note that the Set Variable action, unlike the other elements, will set the same variable value. You can also set dynamic values for numeric variables. To add or subtract a variable value, specify +1 or -1. If the current value is not set or is empty, the countdown will be from zero or from the current date. |
The API request element | Switch to the flow editing mode. Add the API Request element. Enter the request data, and click Validate Request. Under the Matching Setup section, next to the Response Field option, select for which variable you want to store the value received from the user. |
Deleting your variable value
You can delete a variable in an audience or from a chat with your subscriber.
Go to the Audience tab, and, next to the desired contact, click the variable valueyou want to delete. Highlight the contents of the cell, and press Delete and then Enter.
Go to Conversations, and click on the desired contact. In the panel on the right, next to the desired variable, highlight its value, and and press Delete and then Enter.
Removing a variable
When you delete a variable from the audience, the value of that variable will also be deleted for all users irretrievably.
Go to the Audience tab, and hover over the column of the variable you want to delete. Click the Delete icon.
If you don't see the variable you want, you may have hidden it. Click on the three dots to the right of the variable name, and choose which variables you want to view.
How to manage tags
A tag can only have a string value of up to 32 characters. You can use tags for additional filtering and segmentation of subscribers. Read more: How to assign tags to chatbot subscribers.
Assigning Tag
Manually, via Audience (for one contact) | Go to the Audience tab. Under the Tags column, click the box next to the desired contact, and enter the tag value. |
Manually, via Audience (for contact list) | Go to the Audience tab. Select the desired contacts, click Add Tag, and enter the tag value. |
Manually, when chatting with a subscriber | Go to Conversations, and click on the desired contact. In the right panel at the bottom, in the Specify tag field, enter the value of the tag. |
Automatically, using the Action: Add Tag element | You can configure a tag to be assigned to each contact that has passed through the flow element.
Switch to the flow editing mode. Add the Action element. Select the Add Tag action, enter the tag value. |
The Add tag to contact API method | Used to create external integrations.
Send a POST to In the header of the request, add the authorization token. In the body of the request, add the contact ID and the tag itself. Substitute the desired request endpoint for each social network:
|
Editing a tag
To edit a tag name, go to the Bot settings section > Tag tab. Click on the pencil icon, and change the name.
Note that these changes apply to all of your chatbot subscribers. If you used variables in your chatbot flows or scheduled campaigns, you will need to change the variable yourself.
Deleting a tag
You can delete a tag in the audience, in a chat with a subscriber, or via the Delete Contact Tag API method.
Go to Audience, hover over the tag you want to delete next to the desired contact, and click on the cross.
Go to Conversations, and click on the desired contact. In the tag field, hover over the desired one, and click on the cross.
You can delete an assigned tag from all subscribers. Go to the Bot settings section > Tag tab, and click on the trash icon next to your tag.
Last Updated: 07.10.2024
or