# 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="/files/ebFkg20K0P9EvN5FFs1J" alt=""><figcaption></figcaption></figure>

## Setting a Variable

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

<figure><img src="/files/AF7Mraol2ApKLHU3XvPX" 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="/files/HgjrmVqkR9QG44KfSPEq" 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bizmagnets.ai/bot-flows/logic/variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
