custom.conversation_state (выходной)
Выходной топик аккаунта канала: запись пишет Shtab Connect, читает система организации. Повтор записи несёт тот же event_id.
Схема outbound.conversation_state.v1 собрана из src/backend/contracts/integrations/custom_channel/outbound.conversation_state.v1.json при сборке портала.
Поля
ConversationState
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
conversation_id | string (uuid) | да | |
customer | Customer | да | |
event_id | string (uuid) | да | |
number | string | да | |
occurred_at | string (date-time) | да | |
operator_name | string | нет | По умолчанию "". |
schema_version | integer | нет | По умолчанию 1. |
status | ConversationStatus | да | |
thread_id | string | нет | По умолчанию "". |
type | "custom.conversation_state" | да | Вид варианта: всегда custom.conversation_state. |
Customer
Клиент в системе организации: по external_id Helpdesk находит его карточку.
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
external_id | string | да | от 1 симв., до 100 симв.. |
name | string | нет | до 255 симв.. По умолчанию "". |
ConversationStatus
Состояние обращения, как его видит организация: без внутренних оттенков очереди.
Значения: "assigned", "at_bot", "closed", "on_hold", "resolved", "waiting".
Пример
{
"type": "custom.conversation_state",
"schema_version": 1,
"event_id": "2d3e4f5a-6b7c-4d8e-9fa0-b1c2d3e4f5a6",
"conversation_id": "6f1c2a8e-3b7d-4c55-9a10-2f4e8d1b7c01",
"number": "HD-1048",
"customer": {
"external_id": "client-42",
"name": "Анна Петрова"
},
"thread_id": "order-77",
"status": "assigned",
"operator_name": "Мария",
"occurred_at": "2026-11-10T09:30:00Z"
}
JSON Schema
{
"$defs": {
"ConversationState": {
"properties": {
"conversation_id": {
"format": "uuid",
"type": "string"
},
"customer": {
"$ref": "#/$defs/Customer"
},
"event_id": {
"format": "uuid",
"type": "string"
},
"number": {
"type": "string"
},
"occurred_at": {
"format": "date-time",
"type": "string"
},
"operator_name": {
"default": "",
"type": "string"
},
"schema_version": {
"default": 1,
"type": "integer"
},
"status": {
"$ref": "#/$defs/ConversationStatus"
},
"thread_id": {
"default": "",
"type": "string"
},
"type": {
"description": "Вид варианта: всегда `custom.conversation_state`.",
"enum": [
"custom.conversation_state"
]
}
},
"required": [
"type",
"event_id",
"conversation_id",
"number",
"customer",
"status",
"occurred_at"
],
"title": "ConversationState",
"type": "object"
},
"ConversationStatus": {
"description": "Состояние обращения, как его видит организация: без внутренних оттенков очереди.",
"enum": [
"assigned",
"at_bot",
"closed",
"on_hold",
"resolved",
"waiting"
],
"title": "ConversationStatus"
},
"Customer": {
"description": "Клиент в системе организации: по ``external_id`` Helpdesk находит его карточку.",
"properties": {
"external_id": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"name": {
"default": "",
"maxLength": 255,
"type": "string"
}
},
"required": [
"external_id"
],
"title": "Customer",
"type": "object"
}
},
"$ref": "#/$defs/ConversationState"
}