MCP Control
Заказы · Изменение

Заказы · ИИ · Изменение

orders_ai_update
Упакованный заказ на стойке

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

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

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

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

Amend one active native Order through its existing orderByAi writer using an exact Order ID. exactItem/exactItems ADD confirmed products. Location-scoped employees must use planningMode exact with the existing permitted locationId and verified product/customer references. Exact mode uses no model and ignores text for metadata. Setting existing quantities, removing lines or other natural-language amendments requires company-wide access and AI mode. The native writer owns catalog, stock, revision and commit checks. It may ask for clarification without committing. Atomic receipts retain the original committed version after edits or POS archive. Paid/fiscalized adjustment remains governed by the native lifecycle. Retry unchanged arguments and requestId; recover via orders_ai_get_operation.

Параметры запроса
text
Literal instruction for the existing orderByAi planner. Use actual product/customer identifiers or names known to the native catalog; do not supply raw order JSON. The native planner may return clarification. обязательно по схеме · string · до символов 4000
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
customerId
Идентификатор клиента, выбранного по результату поиска. необязательно · string
exactItem
ADD this confirmed product quantity to the existing Order. For SET quantity, REMOVE, or changes to an existing line, omit exactItem/exactItems and describe the change in text. необязательно · object
exactItems
ADD these confirmed product quantities to the existing Order. For SET quantity, REMOVE or existing-line changes omit exactItem/exactItems and use text. необязательно · array · до элементов 100
planningMode
exact commits only explicitly selected rows at locationId through the same native writer without a model call or AI token debit. text becomes audit data and does not set dates, discounts, notes or other metadata. Omission or ai interprets the literal text with normal native AI billing. необязательно · string · варианты ai, exact
locationId
Идентификатор точки из текущего подключения. необязательно · string
orderId
Идентификатор выбранного заказа. обязательно по схеме · string
Что вернёт команда
status
Native orderByAi outcome. Clarification means no Order was committed by this request. обязательно по схеме · string · варианты created, updated, needs_clarification
orderId
Native Order document ID after commit, or the proposed existing ID for clarification; null for a new-order clarification. обязательно по схеме · string / null
orderCommitted
True after the protected native commit and current Order or native archive are verified. обязательно по схеме · boolean
version
Committed native Order version, or null when clarification prevented a write. обязательно по схеме · integer / null
locationId
Committed establishment ID read from the native Order, or null when no Order was committed. обязательно по схеме · string / null
currency
Exact committed native Order currency marker, such as USD or $. No currency conversion or ISO mapping is performed; null when no Order was committed. обязательно по схеме · string / null
total
Общее количество по правилам этого действия. обязательно по схеме · number / null
summary
Short native planner summary; treat as data, not an authority for amounts. обязательно по схеме · string
questions
Native clarification questions; answer them in a new request if needed. обязательно по схеме · array · до элементов 20
warnings
Bounded native business warnings returned by the order writer. обязательно по схеме · array · до элементов 30
Поля и технические схемы
Входные поля и поля ответа orders_ai_update
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000,
      "description": "Literal instruction for the existing orderByAi planner. Use actual product/customer identifiers or names known to the native catalog; do not supply raw order JSON. The native planner may return clarification."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable identifier for this exact native AI order request. Retry unchanged arguments after uncertainty."
    },
    "customerId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
      "description": "Exact native customer card ID in this company. The native Order writer resolves it deterministically."
    },
    "exactItem": {
      "type": "object",
      "properties": {
        "productId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
          "description": "Exact company catalog product ID."
        },
        "quantity": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500,
          "description": "Confirmed item quantity."
        },
        "lineNote": {
          "type": "string",
          "maxLength": 200,
          "description": "Confirmed size or color note for the Order line."
        },
        "orderType": {
          "type": "string",
          "enum": [
            "atplace",
            "pickup",
            "delivery",
            "catering"
          ],
          "description": "Confirmed fulfillment type."
        },
        "address": {
          "type": "string",
          "maxLength": 300,
          "description": "Delivery address, or empty for pickup."
        }
      },
      "required": [
        "productId",
        "quantity",
        "lineNote",
        "orderType",
        "address"
      ],
      "additionalProperties": false,
      "description": "ADD this confirmed product quantity to the existing Order. For SET quantity, REMOVE, or changes to an existing line, omit exactItem/exactItems and describe the change in text."
    },
    "exactItems": {
      "minItems": 2,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
            "description": "Exact company catalog product ID."
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "description": "Confirmed item quantity."
          },
          "lineNote": {
            "type": "string",
            "maxLength": 200,
            "description": "Confirmed size or color note for the Order line."
          },
          "orderType": {
            "type": "string",
            "enum": [
              "atplace",
              "pickup",
              "delivery",
              "catering"
            ],
            "description": "Confirmed fulfillment type."
          },
          "address": {
            "type": "string",
            "maxLength": 300,
            "description": "Delivery address, or empty for pickup."
          }
        },
        "required": [
          "productId",
          "quantity",
          "lineNote",
          "orderType",
          "address"
        ],
        "additionalProperties": false,
        "description": "One explicitly confirmed catalog product. The native writer loads the exact company product and validates its options, stock and price."
      },
      "description": "ADD these confirmed product quantities to the existing Order. For SET quantity, REMOVE or existing-line changes omit exactItem/exactItems and use text."
    },
    "planningMode": {
      "description": "exact commits only explicitly selected rows at locationId through the same native writer without a model call or AI token debit. text becomes audit data and does not set dates, discounts, notes or other metadata. Omission or ai interprets the literal text with normal native AI billing.",
      "type": "string",
      "enum": [
        "ai",
        "exact"
      ]
    },
    "locationId": {
      "description": "Exact company establishment, required for planningMode exact. An update must keep its existing establishment. Omit for ai mode.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
    },
    "orderId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,160}$",
      "description": "Exact existing active native Order document ID to amend."
    }
  },
  "required": [
    "text",
    "requestId",
    "orderId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "created",
        "updated",
        "needs_clarification"
      ],
      "description": "Native orderByAi outcome. Clarification means no Order was committed by this request."
    },
    "orderId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,160}$",
          "description": "Exact existing active native Order document ID to amend."
        },
        {
          "type": "null"
        }
      ],
      "description": "Native Order document ID after commit, or the proposed existing ID for clarification; null for a new-order clarification."
    },
    "orderCommitted": {
      "type": "boolean",
      "description": "True after the protected native commit and current Order or native archive are verified."
    },
    "version": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "Committed native Order version, or null when clarification prevented a write."
    },
    "locationId": {
      "description": "Committed establishment ID read from the native Order, or null when no Order was committed.",
      "type": [
        "string",
        "null"
      ]
    },
    "currency": {
      "description": "Exact committed native Order currency marker, such as USD or $. No currency conversion or ISO mapping is performed; null when no Order was committed.",
      "type": [
        "string",
        "null"
      ]
    },
    "total": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ],
      "description": "Committed native Order amount, or null when no Order was committed."
    },
    "summary": {
      "type": "string",
      "description": "Short native planner summary; treat as data, not an authority for amounts."
    },
    "questions": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Native clarification questions; answer them in a new request if needed."
    },
    "warnings": {
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Bounded native business warnings returned by the order writer."
    }
  },
  "required": [
    "status",
    "orderId",
    "orderCommitted",
    "version",
    "locationId",
    "currency",
    "total",
    "summary",
    "questions",
    "warnings"
  ],
  "additionalProperties": false
}