MCP Control
Обзор  ›  CRM
CRM · Изменение

CRM · Лиды · Предложения · Сохранение

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

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

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

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

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

Replace the complete lead proposal with the same selected lines as CRM. Include ALL retained lines; omit a line to remove it, send [] to clear. Each booking/service line accepts appointment with local dates/times. For stays quantity is the selected number of nights. Keep existing line IDs and catalog-selected names/prices/modifiers; native CRM preserves an existing Appointment when omitted on the same line/product. Saves requested selections, not confirmed bookings, orders or reservations. Native subscription, revision, product/company/location, schedule and timezone validation apply. No price is a final quote. After uncertainty read get and reuse the exact requestId/arguments only; native replay can return the current proposal after later edits.

Параметры запроса
leadId
Native leadId value; use the value and type returned by the corresponding service. обязательно по схеме · string
locationId
Идентификатор точки из текущего подключения. обязательно по схеме · string
type
Native type value; use the value and type returned by the corresponding service. обязательно по схеме · string · варианты pickup, delivery, atplace, catering
currency
Native currency value; use the value and type returned by the corresponding service. обязательно по схеме · string · до символов 8
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
lines
Native lines value; use the value and type returned by the corresponding service. обязательно по схеме · array · до элементов 100
Что вернёт команда
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
Поля и технические схемы
Входные поля и поля ответа crm_lead_proposal_save
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "leadId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Native leadId value; use the value and type returned by the corresponding service."
    },
    "locationId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Native locationId value; use the value and type returned by the corresponding service."
    },
    "type": {
      "type": "string",
      "enum": [
        "pickup",
        "delivery",
        "atplace",
        "catering"
      ],
      "description": "Native type value; use the value and type returned by the corresponding service."
    },
    "currency": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8,
      "description": "Native currency value; use the value and type returned by the corresponding service."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^\\d+:\\d+$",
      "description": "Native expectedRevision value; use the value and type returned by the corresponding service."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable request ID for these exact arguments. Keep it if the response is uncertain."
    },
    "lines": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "productId": {
            "$ref": "#/$defs/_mcp0"
          },
          "name": {
            "$ref": "#/$defs/_mcp1"
          },
          "unit": {
            "$ref": "#/$defs/_mcp2"
          },
          "unitPrice": {
            "$ref": "#/$defs/_mcp3"
          },
          "quantity": {
            "$ref": "#/$defs/_mcp4"
          },
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
            "description": "Stable proposal line ID. Keep it unchanged when editing an existing line."
          },
          "appointment": {
            "description": "Native appointment value; use the value and type returned by the corresponding service.",
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "stay",
                  "service"
                ],
                "description": "Native kind value; use the value and type returned by the corresponding service."
              },
              "startDate": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Native startDate value; use the value and type returned by the corresponding service."
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "description": "Native endDate value; use the value and type returned by the corresponding service."
              },
              "startTime": {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                "description": "Native startTime value; use the value and type returned by the corresponding service."
              },
              "endTime": {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                "description": "Native endTime value; use the value and type returned by the corresponding service."
              }
            },
            "required": [
              "kind",
              "startDate",
              "endDate",
              "startTime",
              "endTime"
            ],
            "additionalProperties": false
          },
          "modifiers": {
            "default": [],
            "description": "Native modifiers value; use the value and type returned by the corresponding service.",
            "maxItems": 900,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "$ref": "#/$defs/_mcp0"
                },
                "name": {
                  "$ref": "#/$defs/_mcp1"
                },
                "unit": {
                  "$ref": "#/$defs/_mcp2"
                },
                "unitPrice": {
                  "$ref": "#/$defs/_mcp3"
                },
                "quantity": {
                  "$ref": "#/$defs/_mcp4"
                },
                "optionSetId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
                  "description": "Native optionSetId value; use the value and type returned by the corresponding service."
                }
              },
              "required": [
                "productId",
                "name",
                "unit",
                "unitPrice",
                "quantity",
                "optionSetId"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "productId",
          "name",
          "unit",
          "unitPrice",
          "quantity",
          "id",
          "modifiers"
        ],
        "additionalProperties": false
      },
      "description": "Native lines value; use the value and type returned by the corresponding service."
    }
  },
  "required": [
    "leadId",
    "locationId",
    "type",
    "currency",
    "expectedRevision",
    "requestId",
    "lines"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp0": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Native productId value; use the value and type returned by the corresponding service."
    },
    "_mcp1": {
      "default": "",
      "description": "Native name value; use the value and type returned by the corresponding service.",
      "type": "string",
      "maxLength": 500
    },
    "_mcp2": {
      "default": "",
      "description": "Native unit value; use the value and type returned by the corresponding service.",
      "type": "string",
      "maxLength": 40
    },
    "_mcp3": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000,
      "multipleOf": 0.01,
      "description": "Native unitPrice value; use the value and type returned by the corresponding service."
    },
    "_mcp4": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 10000000,
      "description": "Native quantity value; use the value and type returned by the corresponding service."
    }
  }
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "companyId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "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"
          }
        }
      ]
    }
  }
}