MCP Control
Лояльность · Чувствительное действие

Клиенты · Лояльность · Зачисление

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

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

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

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

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

Accrue bonus points (начислить бонусы) to one customer through the existing native ledger. Read customer_loyalty_context first; use points > 0, exact revision and requestId. No payment or notification. Recover an uncertain result with customer_loyalty_get_operation using this exact kind and unchanged arguments.

Параметры запроса
customerId
Идентификатор клиента, выбранного по результату поиска. обязательно по схеме · string
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
reason
Business reason retained in the native bonus history. обязательно по схеме · string · до символов 300
comment
Optional native comment; no personal information or credentials are needed. обязательно по схеме · string · по умолчанию "" · до символов 2000
points
Positive bonus points for the requested credit or debit, with at most two decimals. No money transfer. обязательно по схеме · number · минимум -1000000000 · максимум 1000000000
Что вернёт команда
customerId
Existing native company customer ID from customers_search. Self adjustments are forbidden. обязательно по схеме · string
groupId
Original native loyalty group. обязательно по схеме · string
entryId
Native bonus entry ID, or the native no-op amendment receipt ID when no ledger entry was needed. обязательно по схеме · string
balancePoints
Historical balance immediately after this operation; context provides the current balance. обязательно по схеме · number · минимум -1000000000 · максимум 1000000000
deltaPoints
Exact signed delta appended by this operation; zero is an amendment with no balance change. обязательно по схеме · number · минимум -1000000000 · максимум 1000000000
Поля и технические схемы
Входные поля и поля ответа customer_loyalty_credit
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "customerId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Existing native company customer ID from customers_search. Self adjustments are forbidden."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Exact current customer_loyalty_context revision, including the native ledger and group settings."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable ID for this exact operation. Recover or retry unchanged after uncertainty."
    },
    "reason": {
      "type": "string",
      "minLength": 3,
      "maxLength": 300,
      "description": "Business reason retained in the native bonus history."
    },
    "comment": {
      "default": "",
      "description": "Optional native comment; no personal information or credentials are needed.",
      "type": "string",
      "maxLength": 2000
    },
    "points": {
      "type": "number",
      "minimum": -1000000000,
      "maximum": 1000000000,
      "description": "Positive bonus points for the requested credit or debit, with at most two decimals. No money transfer."
    }
  },
  "required": [
    "customerId",
    "expectedRevision",
    "requestId",
    "reason",
    "comment",
    "points"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "customerId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Existing native company customer ID from customers_search. Self adjustments are forbidden."
    },
    "groupId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Original native loyalty group."
    },
    "entryId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Native bonus entry ID, or the native no-op amendment receipt ID when no ledger entry was needed."
    },
    "balancePoints": {
      "type": "number",
      "minimum": -1000000000,
      "maximum": 1000000000,
      "description": "Historical balance immediately after this operation; context provides the current balance."
    },
    "deltaPoints": {
      "type": "number",
      "minimum": -1000000000,
      "maximum": 1000000000,
      "description": "Exact signed delta appended by this operation; zero is an amendment with no balance change."
    }
  },
  "required": [
    "customerId",
    "groupId",
    "entryId",
    "balancePoints",
    "deltaPoints"
  ],
  "additionalProperties": false
}