> For the complete documentation index, see [llms.txt](https://docs.noqo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.noqo.ai/main-settings/additional-settings/user-variables.md). Agents can also search and read this documentation through its [MCP server](https://docs.noqo.ai/~gitbook/mcp).

# User variables

Thanks to the 'Custom Variables' option, you can create one or more variables yourself. Creating variables can be useful when the bot needs to remember specific information that should later be passed

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2F8atgKBhMDDBQTPNVMhZF%2FUser_variablest_1.jpg?alt=media&amp;token=4ab70b03-546d-4ebd-bf1c-c43ab83c58c2" alt=""><figcaption></figcaption></figure>

There are two types of variables available:

* Fixed variables
* Dynamic variables

**Fixed variables** allow creating variables with a known data type. They are chosen when the type and format of the information to be obtained from the user are known in advance. In other words, fixed variables are used when data typing and validation are important. Data stored in such variables can be used for transferring information via API to another service.

#### **Example:**

The following information is required for correct field filling: name, date of birth, and email. The data format must be as follows: Name, 15.01.1990, <mail@gmail.com>. Define the variables **name, birth\_date, email,** and set the data type as "String." In the instructions, specify the format in which the data should be provided to these variables: *"Request the user's name, date of birth, and email. The data must be entered in the following format: Name, 15.01.1990,* [*mail@gmail.com*](mailto:mail@gmail.com)*. If the information does not match this format, request it again, and clarify the required format. After receiving the information in the correct format, save it as a string in the variables **set\_fields\_values(name, birth\_date, email)**."*

If the user provides information in an incorrect format, the bot will prompt for input again until the data is received in the correct type and format. As a result, the final service will receive information that will not cause errors.

The user provides information in an incorrect format. The bot clarifies the format and asks to resend it:

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2F2EMsvwunpAvzWdyIFKuy%2FUse_2.jpg?alt=media&amp;token=8b1ba63b-c114-44f3-9743-dea7fb31b7b3" alt=""><figcaption></figcaption></figure>

Once the information is received in the correct format, it is validated and saved to variables:

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FGGtPJsMgDotHiNpmQnHD%2FUse_3.jpg?alt=media&amp;token=3eea87ba-d952-4cfc-9db9-aebf5094b860" alt=""><figcaption></figcaption></figure>

Function completed

#### Key Points

* User input must match the specified format and data type to avoid errors.​
* If the input is invalid, the system should prompt the user to re-enter the data, providing clear instructions about the required format.​
* Correctly validated and formatted data should be stored in variables for further use in API communication or service processing

**Dynamic variables** allow for storing any information of any size, and all information is always saved as **a string**. Dynamic variables have no type checking, making them more flexible. The AI determines what information is important and sets the variable automatically. This type of variable cannot be passed to other services. Dynamic variables enable higher-quality bot responses by adapting the content to the context. When necessary, information that should be saved can be explicitly marked.

**Example:**\
We need to save a user's financial goals for financial planning. Indicate this in the instructions: *"Request the user's financial goals. Pass the financial goals to the memorize function. Use the financial goals when building the budget."*

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FXN24QWoayKBdEMN9Yvl7%2FUser_variablest_6.jpg?alt=media&amp;token=0d37ed3a-5714-44e4-8570-0fb8c3ed15af" alt=""><figcaption></figcaption></figure>

**Fixed Variables**

To create a **Fixed variable**, follow these steps:

{% stepper %}
{% step %}
To create, press the **"Add variable"** button.

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FSbTb1UeEqBGx6bFmY2Cu%2FUser_variables_1.jpg?alt=media&amp;token=376f5615-f306-4c59-a3a8-dbc58d82ee60" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Then specify the variable name, its description, and data type.

There are 4 types of variables:

* **String** – any information that should be recognized by the system as text (“watermelon”, “noqo”, “+89001234567”)
* **Integer** – a whole number (1, 2, 5, -1)
* **Integer or floating-point** – either a whole number or a decimal (1, 1.0, 3.4, -1.2)
* **Boolean** – true or false (yes or no)

When choosing, it is essential to strictly consider the type of information that will be contained in the variable.

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FtBRvyStBaYE06Vmal7iU%2FUser_variablest_2.jpg?alt=media&amp;token=b2a40b67-48f0-4333-808e-cfad9e269b86" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
In our example, select the **"Integer"** type.

After entering all parameters, click on the **"Save"** icon.

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2F151mFApdhfi7tPXybEEK%2FUser_variablest_3.jpg?alt=media&amp;token=99e53515-648c-4d09-ba6d-d7abac9ff640" alt=""><figcaption></figcaption></figure>

{% endstep %}
{% endstepper %}

**Fixed variables** are associated with a function

```
set_fields_values
```

In the instruction, specify which data should be saved in which variable. It is recommended to indicate the data type that will be stored in the variable to avoid confusion and prevent numeric data from being passed as a **"String"** type. For example:

*"Prompt the user for their age and save the numeric data in the variable set\_fields\_values(age)."*

**Dynamic Variables**

To enable Dynamic Variables, activate the corresponding switch. In the instructions, specify what information should be saved. Describe in detail exactly what information must be stored.

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FspzinoCnMqOlF7pO6ds6%2FUser_variablest_4.jpg?alt=media&amp;token=4e13e28a-508c-4113-8061-412cfd1fcc9e" alt=""><figcaption></figcaption></figure>

After activating Dynamic variables, an additional option will appear to delete information from these variables when clearing.

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2Fiic5e4XiOQpD4MVjNUJd%2FUser_variablest_5.jpg?alt=media&amp;token=1c517a0f-0ac7-4eee-99d7-587617120b56" alt=""><figcaption></figcaption></figure>

Dynamic variables are associated with a function:

```
memorize
```

When **Dynamic Variables** are enabled, the neural network independently decides what information to remember. However, if we need specific information to be saved, we can manually specify what exactly needs to be remembered. To do this, add the following phrase to the instructions: "Pass this information to the **memorize** function".

If necessary, we can retrieve information about the variables. To do this, request the following:\
"Return the information saved in the **memorize** function"

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FaDLzTS9d7vxU5R9Oxmh9%2FUser_variablest_7.jpg?alt=media&amp;token=57857add-402b-484b-aad3-119f235dc97c" alt=""><figcaption></figcaption></figure>
