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 add 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_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 variables These variables store SendPulse system data:

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

contact_id (Number 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.

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

    Next

    How to Use a Live Chat

    Popular in Our Blog

    Try creating a chatbot for Facebook Messenger for free