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

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

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

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

Поля​

Receipt​

Итог приёма сообщения клиента message_id.

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

Customer​

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

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