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

conversation.closed

Тело запроса POST на адрес подписки. Заголовки, подпись и повторы описаны в гайде «Вебхуки».

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

Поля​

Closed​

ПолеТипОбязательноеОписание
conversationConversationда
cycleintegerда
event_idstring (uuid)да
occurred_atstring (date-time)да
resolutionstringда
schema_versionintegerнетПо умолчанию 1.
statusConversationStatusда
type"conversation.closed"даВид варианта: всегда conversation.closed.

Conversation​

ПолеТипОбязательноеОписание
customer_idstring (uuid)да
idstring (uuid)да
identitiesмассив Identityда
numberstringда
queue_idstring (uuid) или nullнетПо умолчанию null.

Identity​

Подтверждённая личность клиента: по ней система находит его у себя.

ПолеТипОбязательноеОписание
external_idstringда
namespacestringда

ConversationStatus​

Состояние обращения, как его видит организация: без внутренних оттенков очереди.

Значения: "assigned", "at_bot", "closed", "on_hold", "resolved", "waiting".

JSON Schema​

{
"$defs": {
"Closed": {
"properties": {
"conversation": {
"$ref": "#/$defs/Conversation"
},
"cycle": {
"type": "integer"
},
"event_id": {
"format": "uuid",
"type": "string"
},
"occurred_at": {
"format": "date-time",
"type": "string"
},
"resolution": {
"type": "string"
},
"schema_version": {
"default": 1,
"type": "integer"
},
"status": {
"$ref": "#/$defs/ConversationStatus"
},
"type": {
"description": "Вид варианта: всегда `conversation.closed`.",
"enum": [
"conversation.closed"
]
}
},
"required": [
"type",
"event_id",
"occurred_at",
"conversation",
"status",
"resolution",
"cycle"
],
"title": "Closed",
"type": "object"
},
"Conversation": {
"properties": {
"customer_id": {
"format": "uuid",
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"identities": {
"items": {
"$ref": "#/$defs/Identity"
},
"type": "array"
},
"number": {
"type": "string"
},
"queue_id": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"id",
"number",
"customer_id",
"identities"
],
"title": "Conversation",
"type": "object"
},
"ConversationStatus": {
"description": "Состояние обращения, как его видит организация: без внутренних оттенков очереди.",
"enum": [
"assigned",
"at_bot",
"closed",
"on_hold",
"resolved",
"waiting"
],
"title": "ConversationStatus"
},
"Identity": {
"description": "Подтверждённая личность клиента: по ней система находит его у себя.",
"properties": {
"external_id": {
"type": "string"
},
"namespace": {
"type": "string"
}
},
"required": [
"namespace",
"external_id"
],
"title": "Identity",
"type": "object"
}
},
"$ref": "#/$defs/Closed"
}