> For the complete documentation index, see [llms.txt](https://help.onebot.tech/onebot-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.onebot.tech/onebot-help/rabota-s-peremennymi/polzovatelskie-peremennye.md).

# Пользовательские переменные

{% hint style="info" %}
Куда передаются данные из пользовательских переменных?
{% endhint %}

Они сохраняются до тех пор пока не создастся заявка и отправится уведомление, в котором они будут указаны.

{% hint style="info" %}
Как подставить пользовательскую переменную в сообщение или ссылку?
{% endhint %}

Вставь команду **{{$ИмяПеременной}}** в нужно месте.

{% hint style="info" %}
Сравнение переменных пользователей:
{% endhint %}

На данный момент в блоке "[**Условие**](/onebot-help/bloki-konstruktora/prostye/rabota-s-usloviyami.md)" нельзя сравнить локальную переменную с глобальной.

{% hint style="info" %}
Как сохранять переменные пользователя?
{% endhint %}

В блоках "[**Сообщения**](/onebot-help/bloki-konstruktora/prostye/otpravka-soobshenii.md)" ты можешь сохранять ответы пользователей в переменные. Для этого необходимо придумать название переменной и написать его в нижней части настроек блока включив функцию "**Записать ответ в пользовательскую переменную**".

<figure><img src="/files/Hhu7fqHlUhPwdVPv3tDx" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Редактирование переменных пользователя:
{% endhint %}

К примеру, ты делаешь небольшой квест с начислением баллов за выполнение заданий. Чтобы начислять баллы за действия, которые бот не может учесть, (*например за фото с хэштегом в соц.сетях и т.п.)* **можно редактировать переменную вручную**.

Для этого нужно:\
1\. Зайти в раздел **Списки > Контакты и выбрать нужного подписчика, кликнув по его имени.**

<figure><img src="/files/tp47Dm4ZpnEzKRdvJf2W" alt=""><figcaption></figcaption></figure>

2\. В карточке клиента нажимаешь на значение переменной, после чего ее можно редактировать.

<figure><img src="/files/MtkrKEqqWVC2xAyE61oL" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Выборочное удаление пользовательских переменных после создания заявки:
{% endhint %}

Для этого необходимо отмечать отдельно каждую пользовательскую переменную, которую ты хочешь удалить после создания заявки.

<figure><img src="/files/KrtimIzLDJwePjV2AgeN" alt=""><figcaption></figcaption></figure>

В разделе «С**писки**» находятся подсказки по пользовательским переменным. Можно удалять подсказки массово или выборочно. Следует учитывать, что удаление переменных из этого списка не удаляет их у контакта.

<figure><img src="/files/RG1eB4hVqzGmW4GfZb1y" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.onebot.tech/onebot-help/rabota-s-peremennymi/polzovatelskie-peremennye.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
