How to Manage Chatbot Subscribers and Their Data
In this article, we will take a look at the sources from which users can go to your chatbot and become its subscribers on Facebook, Telegram, WhatsApp, Instagram and talk about possible ways to add and change variables and tags.
Using variables and tags, you can organize and store all the necessary information about a subscriber, including their orders and preferences, to personalize your communication with each subscriber or group of subscribers according to specific filter criteria.
What Is a Chatbot Subscriber
Facebook Messenger chatbot subscribers are those who have interacted with your Facebook page: clicked "Message" and sent you a message, subscribed using a widget or subscription form with another service, followed a link to the chatbot, clicked on an ad, opened a chat with your page and started communicating by clicking "Start."
When switching from another service or just creating a new chatbot, all subscribers are automatically transferred when the social network is connected. Read more: How to Transfer Facebook Chatbot Subscribers from Other Services to SendPulse.
Note that you can only message your Facebook chatbot subscribers within 24 hours since the subscriber's last interaction with the chatbot. After the 24-hour messaging window, you can only send transactional messages. Read more: Types of Facebook Chatbot Campaigns.
Telegram chatbot subscribers are those who have subscribed via a widget or interacted with the chatbot in Telegram, i.e., followed a link to the chatbot, subscribed, and started a conversation by clicking "Start." If you are an admin of a group or channel connected to your chatbot, they can also count as subscribers (such a channel will be displayed as a contact in the "Audience" section of your chatbot).
When switching from another service, you can transfer your subscribers if the service you are switching from allows you to export Telegram subscriber IDs. Read more: How to Transfer Telegram Chatbot Subscribers from Other Services to SendPulse.
WhatsApp chatbot subscribers are those who have subscribed via a widget or interacted with the chatbot on WhatsApp, for example, clicked on a button, responded to a template message, clicked on a link to the chatbot, clicked on an ad, subscribed, and started a conversation.
Note that WhatsApp has a 24-hour support window, during which you can send any message. It only opens after the user interacts with your chatbot, e.g. by clicking on a button or sending a message. Before this window opens, you can only send template messages. Read more: WhatsApp Pricing Policy Changes.
Instagram chatbot subscribers are those who have started interacting with the chatbot by sending a direct message to your Instagram business account.
Instagram has the following chatbot triggers:
- sending a message to your DMs (if the user sends a direct message to the account you have used to create your chatbot, they become a subscriber of this chatbot);
- subscribing via a widget (сlicking on the “Subscribe” button takes the user to your DMs, after which your chatbot sends a message to turn this user into a subscriber);
- following a link to your chatbot (when a user clicks on a link, they must send a message to sign up);
- following ads (you can add an FAQ section that pops up after the user clicks on an ad, and a click on one of these questions is considered a start of the conversation and equates to a subscription);
- a Story mention (when your profile is mentioned in a Story, a message from the user is sent to your DMs, and they become a subscriber);
- sending a comment on a live video (along with a comment, you get a direct message from the user, and they become a subscriber);
- sending a comment on a post (using this trigger, you can only send one message in response before the next user interaction).
Transfering subscribers from another service is not possible at the moment.
Note that you can only message your Instagram chatbot followers within 24 hours since their last interaction with the chatbot.
How to View Your List of Subscribers
In the Audience
To view your subscriber data, go to the "Audience" tab. This section displays the list of all users who have subscribed to your chatbot, including their tags, variables, statuses, subscription dates, and last activity time.
To hide or show variables in your audience, click the icon on the right. Select the checkbox to display the variables, and uncheck the checkbox to hide them.
Using the Contact Filter
You can filter your audience and categorize your users by certain criteria. To do this, click "Filter," and select the desired criteria:
- activity within the last 24 hours;
- contact status (subscribed, unsubscribed, disconnected, or disabled);
- contact name;
- registration date(and select a date);
- last activity (and select the date);
- the value of the contact variable depending on its type (string, number, link, phone number, and email);
- assigned or unassigned tag;
- whether a particular flow was launched or not launched;
- whether a particular campaign was received or not received;
- whether a chat is open;
- the number of incoming messages;
- the number of unread messages.
There are also some additional criteria available for your Instagram chatbot:
- whether a user follows your Instagram profile;
- whether you follow a user’s Instagram profile;
- the number of followers a user has.
You can also combine your filter conditions: "any" (corresponding to the "or" operator) or "each" (corresponding to the "and" operator).
You can also set up an integration and receive subscriber data:
- when configuring the webhook sendout;
- when configuring the "API request" element;
- using the "Get contact information by ID," "Get contact list by tag," and "Get contact list by variable" API methods.
How to Manage Variables
With SendPulse, you can use the following types of variables:
- global — used for common values for all users;
- system — values are taken from the system.
contact_idis the subscriber ID in SendPulse, and
last_messageis the last message received from the subscriber;
- custom — used to store individual values for each contact. You can store user information in variables of all types: string, number, link, date, email, and phone.
In this section, we'll take a closer look at custom 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" block. 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 "String" type in this element.
|Manually, using the "Action: Set Variable" element in the flow||Switch to the flow editing mode. Add an "Action" block. 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” block. 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, and press the "Enter" key.
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.
|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 "Bot Chats," 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 https://api.sendpulse.com/messenger/contacts/setVariable.
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:
messenger, vk, telegram, instagram.
|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 "Set 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
|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 "Bot Chats," and click on the desired contact. In the panel on the right, next to the desired variable, highlight its value, 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.
|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 "Bot Chats," 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 block.
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 https://api.sendpulse.com/messenger/contacts/setTag.
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:
messenger, vk, telegram, instagram.
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 "Bot Chats," and click on the desired contact. In the tag field on the right, hover over the desired one, and click on the cross.
Last Updated: 20.06.2022