# Переменные

Для удобства все константы пользователя (контакта) можно использовать в вашем коде как обычные JavaScript переменные.

### Список переменных

* `id` - ID контакта
* `bot_id` - ID бота
* `name` - Полное имя контакта
* `first_name` - Имя контакта
* `last_name` - Фамилия контакта
* `phone` - Телефон контакта
* `email` - Электронная почта контакта
* `address` - Адрес контакта
* `created_at` - Дата создания контакта в формате [`Y-m-d H:i:s`](https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters)
* `username` - Username контакта
* `telegram_id` - ID контакта в Телеграм&#x20;
* `max_id` - ID контакта в Max
* `start_message` - Стартовое сообщение пользователя перед началом использования чат-бота

### Пример

Допустим текущего пользователя зовут Дмитрий, тогда в переменную `test` запишется строка `Привет Дмитрий!`

```javascript
var test = "Привет " + first_name + "!";
```


---

# 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.watbot.ru/js-api/peremennye.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.
