What types of chatbot variables are there?

With chatbot variables, you can save and store subscriber data and use them to personalize your chatbot communication.

For example, you can use them to send messages or API requests and filter user data to branch your chatbot scenario.

Let's talk about chatbot variables and how to use them.

Chatbot variable types

You can use variables of the following types:

Custom variables for contacts These variables store user-entered values as different data types. Users will receive the values recorded in their contact cards of your Bot Audience.

Learn more: Adding or updating your variable value.

Global bot variables These variables store shared values you can add in the bot settings.

By default, you can use the following variables:

$bot_name (String type);

$bot_username (for TG, IG, String type);

$bot_id (String type);

$current_date (Date type) — the date when the user reached the element with this variable.

$current_datetime (DateTime type) — the date and time when the user reached the element with this variable.

Learn more: How to create a global variable for chatbot subscribers.

System contact variables in bot These variables store SendPulse system data:

last_message (String type) — the subscriber's last message text or file URL;

contact_id (String type) — subscriber ID in the Bot Audience. You can also copy the subscriber ID from the chat address bar and through the Get list of contacts API method.

First_name (String type) — your subscriber’s first name on social media;

Last_name (String type) — your subscriber’s last name on social media;

full_name (String type) — your subscriber’s full name on social media;

sp_assignee (String type) — chat assignee;

username (for Telegram and Instagram) — your subscriber’s username on social media;

telegram_id — your subscriber’s Telegram ID;

phone (for WhatsApp, the Phone type) — your subscriber's WhatsApp phone number;

You cannot edit system variables.

You can modify variables you use in messages or the ones you set as other variables’ values.

Chatbot variable usage

You can use chatbot variables in the following flow elements:

Message Add variables to the Text element to send personalized messages.
API Request Add variables to your URL field or request body to transfer data.
Action Add variables to the Insert Google Sheets row, Find and Update Google Sheets row, Retrieve data from a Google Sheet row, Create a Deal, Edit CRM Deal, Enroll in the EDU course, and Notify me actions to add or retrieve data from third-party tools.
Filter Add variables to your filter criteria to segment users by certain attributes.
    Rate this article about "What types of chatbot variables are there?"

    User Rating: 5 / 5 (7)

    Previous

    How to automatically save chatbot subscriber data to your mailing list and set up an automation

    Next

    How to manage chatbot conversations

    Popular in Our Blog

    Create your own chatbot today