Перейти к основному содержимому

custom.conversation_state (выходной)

Выходной топик аккаунта канала: запись пишет Shtab Connect, читает система организации. Повтор записи несёт тот же event_id.

Схема outbound.conversation_state.v1 собрана из src/backend/contracts/integrations/custom_channel/outbound.conversation_state.v1.json при сборке портала.

Поля​

ConversationState​

ПолеТипОбязательноеОписание
conversation_idstring (uuid)да
customerCustomerда
event_idstring (uuid)да
numberstringда
occurred_atstring (date-time)да
operator_namestringнетПо умолчанию "".
schema_versionintegerнетПо умолчанию 1.
statusConversationStatusда
thread_idstringнетПо умолчанию "".
type"custom.conversation_state"даВид варианта: всегда custom.conversation_state.

Customer​

Клиент в системе организации: по external_id Helpdesk находит его карточку.

ПолеТипОбязательноеОписание
external_idstringдаот 1 симв., до 100 симв..
namestringнетдо 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"
}