# Открытие/передача чат-сессии

Тип события `session_updated` приходит:

* при открытии чат-сессии
* при передаче чата команде/оператору

{% code overflow="wrap" %}

```json
{
  "event_type": "session_updated",
  "payload": {
    "chat": {
      "uuid": "uuid пользователя",
      "avatar": "ссылка на аватар пользователя",
      "platform": "мессенджер",
      "phone": "номер телефона пользователя",
      "name": "имя пользователя"
    },
    "profile": {
      "uuid": "uuid профиля пользователя"
    },
    "session": {
      "title": null,
      "context": null,
      "team": {
        "id": "id команды",
        "name": "название команды"
      }
    }
  },
  "timestamp": 1777967172102
}
```

{% endcode %}

<details>

<summary><strong>Описание параметров</strong></summary>

### chat

* `uuid` — уникальный идентификатор чата&#x20;
* `avatar` — аватар пользователя (при наличии)
* `platform` — канал (Telegram, WhatsApp и т.д.)
* `phone` — телефон (если доступен)
* `name` — имя пользователя

#### profile

* `uuid` — идентификатор профиля пользователя

#### session

* `title` — заголовок чат-сессии (может быть null)
* `context` — контекст чат-сессии (может быть null)
* `team.id` — ID команды (число)
* `team.name` — название команды

</details>


---

# 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.fstrk.io/knowledge_base/intagrations/sobstvennaya-crm-and-cdp-new/otkrytie-peredacha-chat-sessii.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.
