custom.receipt (выходной)
Выходной топик аккаунта канала: запись пишет Shtab Connect, читает система организации. Повтор записи несёт тот же event_id.
Схема outbound.receipt.v1 собрана из src/backend/contracts/integrations/custom_channel/outbound.receipt.v1.json при сборке портала.
Поля
Receipt
Итог приёма сообщения клиента message_id.
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
conversation_id | string (uuid) или null | нет | По умолчанию null. |
customer | Customer | да | |
event_id | string (uuid) | да | |
helpdesk_message_id | string (uuid) или null | нет | По умолчанию null. |
message_id | string | да | |
occurred_at | string (date-time) | да | |
reason | RejectReason или null | нет | По умолчанию null. |
schema_version | integer | нет | По умолчанию 1. |
status | ReceiptStatus | да | |
thread_id | string | нет | По умолчанию "". |
type | "custom.receipt" | да | Вид варианта: всегда custom.receipt. |
Customer
Клиент в системе организации: по external_id Helpdesk находит его карточку.
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
external_id | string | да | от 1 симв., до 100 симв.. |
name | string | нет | до 255 симв.. По умолчанию "". |
RejectReason
Значения: "empty", "invalid".
ReceiptStatus
Значения: "accepted", "rejected".
Пример
{
"type": "custom.receipt",
"schema_version": 1,
"event_id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"message_id": "msg-1001",
"customer": {
"external_id": "client-42",
"name": "Анна Петрова"
},
"thread_id": "order-77",
"status": "accepted",
"conversation_id": "6f1c2a8e-3b7d-4c55-9a10-2f4e8d1b7c01",
"helpdesk_message_id": "9e8d7c6b-5a49-4382-a1b0-c9d8e7f6a5b4",
"reason": null,
"occurred_at": "2026-11-10T09:30:00Z"
}
JSON Schema
{
"$defs": {
"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"
},
"Receipt": {
"description": "Итог приёма сообщения клиента ``message_id``.",
"properties": {
"conversation_id": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"customer": {
"$ref": "#/$defs/Customer"
},
"event_id": {
"format": "uuid",
"type": "string"
},
"helpdesk_message_id": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"message_id": {
"type": "string"
},
"occurred_at": {
"format": "date-time",
"type": "string"
},
"reason": {
"anyOf": [
{
"$ref": "#/$defs/RejectReason"
},
{
"type": "null"
}
],
"default": null
},
"schema_version": {
"default": 1,
"type": "integer"
},
"status": {
"$ref": "#/$defs/ReceiptStatus"
},
"thread_id": {
"default": "",
"type": "string"
},
"type": {
"description": "Вид варианта: всегда `custom.receipt`.",
"enum": [
"custom.receipt"
]
}
},
"required": [
"type",
"event_id",
"message_id",
"customer",
"status",
"occurred_at"
],
"title": "Receipt",
"type": "object"
},
"ReceiptStatus": {
"enum": [
"accepted",
"rejected"
],
"title": "ReceiptStatus"
},
"RejectReason": {
"enum": [
"empty",
"invalid"
],
"title": "RejectReason"
}
},
"$ref": "#/$defs/Receipt"
}