Variables
Explore the concept of Variables and how to set them up with our variable block. Choose from six different formats and easily assign values to your variables.
Think of a variable as a box that can be named and used to store "things." In this context, "things" are values such as numbers, text, dates, etc.
The Set Variable block is a powerful tool that allows you to create a variable, select its format, and assign it a value.
To use the card, simply select it from the Logic.
Setting a Variable
You can choose an existing variable or create a new one.
The variable name must start with an alphabet and can only include underscores (_) as special characters.
Simply type the name, select the format, and click "create."
When it comes to selecting the format of the variable, you have 6 formats to choose from.
Text
Number
Boolean
Date
Object
Array
Entering the Value
You can enter the value you want to assign to the variable. It can also be dependent on the values of other variables.
How to Use Variables
To utilize a variable in your chatbot, you can select or type it in the following format:
Where to Use Variables
Variables can be incorporated in various contexts, anywhere inside the chatbot including:
Messages: Personalize responses based on session data.
Integrations: Use variables to interact with external services.
API Calls: Pass variables in API requests to maintain context.
Last updated