MCP Control
Коммуникации · Изменение

Социальные сети · Чаты · Сайт · Интерактивные · Изменение

social_workspace_chat_site_interactive_update
Контактные карточки и телефон

Попробуйте три запроса

Подготовить
  1. Вы указываетеСайт
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Социальные сети / Чаты / Сайт / Интерактивные / Изменение». Для изменения нужны сайт, диалог. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
siteId
Сайт
conversationId
Диалог
messageId
Параметр
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Социальные сети / Чаты / Сайт / Интерактивные / Изменение» с параметром siteId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
siteId
DEMO-101
conversationId
DEMO-101
messageId
DEMO-101
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Социальные сети / Чаты / Сайт / Интерактивные / Изменение» по исходному ответу. Покажи companyId, результат. Объясни, чем подтвердить эффект для выбранного объекта.
Как сверить изменение
  1. До измененияПрочитать версию
  2. При записиПередать выбранную версию
  3. После ответаПеречитать объект
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.

Описание разработчика

Update an outbound interactive Site chat card in place at its exact revision. Uses the same native Site implementation and preserves message time.

Параметры запроса
siteId
Native siteId value; use the value and type returned by the corresponding service. обязательно по схеме · string
conversationId
Native conversationId value; use the value and type returned by the corresponding service. обязательно по схеме · string
messageId
Native messageId value; use the value and type returned by the corresponding service. обязательно по схеме · string
interactive
Interactive message; use the declared type, limits and current saved card definition. обязательно по схеме · object
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · integer · максимум 9007199254740991
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
companyId
Native companyId value; use the value and type returned by the corresponding service. обязательно по схеме · string
result
Native result value; use the value and type returned by the corresponding service. обязательно по схеме · object
Поля и технические схемы
Входные поля и поля ответа social_workspace_chat_site_interactive_update
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "siteId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Native siteId value; use the value and type returned by the corresponding service."
    },
    "conversationId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Native conversationId value; use the value and type returned by the corresponding service."
    },
    "messageId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Native messageId value; use the value and type returned by the corresponding service."
    },
    "interactive": {
      "type": "object",
      "properties": {
        "version": {
          "default": 1,
          "description": "Interactive version; use the declared type, limits and current saved card definition.",
          "type": "number",
          "const": 1
        },
        "kind": {
          "default": "card",
          "description": "Interactive kind; use the declared type, limits and current saved card definition.",
          "type": "string",
          "enum": [
            "card",
            "form",
            "status",
            "html"
          ]
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 180,
          "description": "Interactive title; use the declared type, limits and current saved card definition."
        },
        "body": {
          "default": "",
          "description": "Interactive body; use the declared type, limits and current saved card definition.",
          "type": "string",
          "maxLength": 3000
        },
        "fields": {
          "default": [],
          "description": "Interactive fields; use the declared type, limits and current saved card definition.",
          "maxItems": 12,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/_mcp0"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120,
                "description": "Interactive label; use the declared type, limits and current saved card definition."
              },
              "type": {
                "default": "text",
                "description": "Interactive type; use the declared type, limits and current saved card definition.",
                "type": "string",
                "enum": [
                  "text",
                  "textarea",
                  "number",
                  "select",
                  "checkbox",
                  "date"
                ]
              },
              "required": {
                "default": false,
                "description": "Interactive required; use the declared type, limits and current saved card definition.",
                "type": "boolean"
              },
              "options": {
                "description": "Interactive options; use the declared type, limits and current saved card definition.",
                "maxItems": 30,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "maxLength": 160,
                      "description": "Interactive value; use the declared type, limits and current saved card definition."
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 160,
                      "description": "Interactive label; use the declared type, limits and current saved card definition."
                    }
                  },
                  "required": [
                    "value",
                    "label"
                  ],
                  "additionalProperties": false,
                  "description": "Interactive options; use the declared type, limits and current saved card definition."
                }
              },
              "maxLength": {
                "default": 500,
                "description": "Interactive maxLength; use the declared type, limits and current saved card definition.",
                "type": "integer",
                "minimum": 1,
                "maximum": 1500
              },
              "minimum": {
                "description": "Interactive minimum; use the declared type, limits and current saved card definition.",
                "type": "number"
              },
              "maximum": {
                "description": "Interactive maximum; use the declared type, limits and current saved card definition.",
                "type": "number"
              },
              "value": {
                "description": "Interactive value; use the declared type, limits and current saved card definition.",
                "anyOf": [
                  {
                    "$ref": "#/$defs/_mcp1"
                  },
                  {
                    "type": "number",
                    "description": "Interactive value; use the declared type, limits and current saved card definition."
                  },
                  {
                    "type": "boolean",
                    "description": "Interactive value; use the declared type, limits and current saved card definition."
                  },
                  {
                    "type": "null",
                    "description": "Interactive value; use the declared type, limits and current saved card definition."
                  }
                ]
              }
            },
            "required": [
              "id",
              "label",
              "type",
              "required",
              "maxLength"
            ],
            "additionalProperties": false,
            "description": "Interactive fields; use the declared type, limits and current saved card definition."
          }
        },
        "metrics": {
          "default": [],
          "description": "Interactive metrics; use the declared type, limits and current saved card definition.",
          "maxItems": 12,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "maxLength": 120,
                "description": "Interactive label; use the declared type, limits and current saved card definition."
              },
              "valueKey": {
                "$ref": "#/$defs/_mcp0"
              },
              "suffix": {
                "default": "",
                "description": "Interactive suffix; use the declared type, limits and current saved card definition.",
                "type": "string",
                "maxLength": 30
              }
            },
            "required": [
              "label",
              "valueKey",
              "suffix"
            ],
            "additionalProperties": false,
            "description": "Interactive metrics; use the declared type, limits and current saved card definition."
          }
        },
        "progress": {
          "description": "Interactive progress; use the declared type, limits and current saved card definition.",
          "type": "object",
          "properties": {
            "label": {
              "default": "",
              "description": "Interactive label; use the declared type, limits and current saved card definition.",
              "type": "string",
              "maxLength": 120
            },
            "valueKey": {
              "$ref": "#/$defs/_mcp0"
            },
            "maximum": {
              "default": 100,
              "description": "Interactive maximum; use the declared type, limits and current saved card definition.",
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 1000000000000
            }
          },
          "required": [
            "label",
            "valueKey",
            "maximum"
          ],
          "additionalProperties": false
        },
        "actions": {
          "default": [],
          "description": "Interactive actions; use the declared type, limits and current saved card definition.",
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/_mcp0"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "Interactive label; use the declared type, limits and current saved card definition."
              },
              "kind": {
                "default": "submit",
                "description": "Interactive kind; use the declared type, limits and current saved card definition.",
                "type": "string",
                "enum": [
                  "submit",
                  "flow"
                ]
              },
              "flow": {
                "description": "Interactive flow; use the declared type, limits and current saved card definition.",
                "type": "object",
                "properties": {
                  "siteId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
                    "description": "Interactive siteId; use the declared type, limits and current saved card definition."
                  },
                  "alias": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{1,63}$",
                    "description": "Interactive alias; use the declared type, limits and current saved card definition."
                  },
                  "input": {
                    "default": {},
                    "description": "Interactive input; use the declared type, limits and current saved card definition.",
                    "type": "object",
                    "propertyNames": {
                      "$ref": "#/$defs/_mcp0"
                    },
                    "additionalProperties": {
                      "$ref": "#/$defs/_mcp2"
                    }
                  }
                },
                "required": [
                  "siteId",
                  "alias",
                  "input"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "label",
              "kind"
            ],
            "additionalProperties": false,
            "description": "Interactive actions; use the declared type, limits and current saved card definition."
          }
        },
        "values": {
          "default": {},
          "description": "Interactive values; use the declared type, limits and current saved card definition.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/_mcp0"
          },
          "additionalProperties": {
            "$ref": "#/$defs/_mcp2"
          }
        },
        "html": {
          "description": "Interactive html; use the declared type, limits and current saved card definition.",
          "type": "string",
          "maxLength": 60000
        },
        "height": {
          "default": 360,
          "description": "Interactive height; use the declared type, limits and current saved card definition.",
          "type": "integer",
          "minimum": 160,
          "maximum": 800
        }
      },
      "required": [
        "version",
        "kind",
        "title",
        "body",
        "fields",
        "metrics",
        "actions",
        "values",
        "height"
      ],
      "additionalProperties": false,
      "description": "Interactive message; use the declared type, limits and current saved card definition."
    },
    "expectedRevision": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Interactive expectedRevision; use the declared type, limits and current saved card definition."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Interactive requestId; use the declared type, limits and current saved card definition."
    }
  },
  "required": [
    "siteId",
    "conversationId",
    "messageId",
    "interactive",
    "expectedRevision",
    "requestId"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp0": {
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z0-9_]{0,47}$",
      "description": "Interactive id; use the declared type, limits and current saved card definition."
    },
    "_mcp1": {
      "type": "string",
      "maxLength": 1500,
      "description": "Interactive value; use the declared type, limits and current saved card definition."
    },
    "_mcp2": {
      "anyOf": [
        {
          "$ref": "#/$defs/_mcp1"
        },
        {
          "type": "number",
          "description": "Interactive value; use the declared type, limits and current saved card definition."
        },
        {
          "type": "boolean",
          "description": "Interactive value; use the declared type, limits and current saved card definition."
        },
        {
          "type": "null",
          "description": "Interactive value; use the declared type, limits and current saved card definition."
        }
      ],
      "description": "Interactive value; use the declared type, limits and current saved card definition."
    }
  }
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "companyId": {
      "type": "string",
      "description": "Native companyId value; use the value and type returned by the corresponding service."
    },
    "result": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "description": "Native result value; use the value and type returned by the corresponding service."
    }
  },
  "required": [
    "companyId",
    "result"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}