# 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.

<figure><img src="https://789614814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvCr7uCTpZRGEF8A48OOJ%2Fuploads%2F0OsiIQCapwkKOGiuY77i%2FScreenshot%202025-09-18%20155858.png?alt=media&#x26;token=924f03e8-8385-47cc-a898-607554a73ce9" alt=""><figcaption></figcaption></figure>

## Setting a Variable

You can choose an existing variable or create a new one.&#x20;

<figure><img src="https://789614814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvCr7uCTpZRGEF8A48OOJ%2Fuploads%2FSLs0LLgnX8miuWhqfCpt%2FScreenshot%202024-07-02%20152107.png?alt=media&#x26;token=56200993-4766-4efa-b2a6-e7094fb4e227" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The variable name must start with an alphabet and can only include underscores (\_) as special characters.
{% endhint %}

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

<figure><img src="https://789614814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvCr7uCTpZRGEF8A48OOJ%2Fuploads%2Fou2BRQNCekz7zu1UoLi0%2FScreenshot%202024-07-09%20155255.png?alt=media&#x26;token=c6e4bdd2-2dd0-41c7-8cfe-82bee0b83b33" alt=""><figcaption></figcaption></figure>

## 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:

```
{{variable.VARIABLE_NAME}}
```

## 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.
