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

Лиды · Установка значения · Этап

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

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

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

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

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

Append a validated native pipeline stage without replacing existing status/history. Checks current access, revision and immutable operation receipt. Pipelines requiring an unavailable Flow dispatcher are rejected before changes.

Параметры запроса
resourceId
Canonical lead ID in the connected company. обязательно по схеме · string
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
pipelineId
Omit to keep the existing pipeline; supply to move to another company pipeline. необязательно · string
stageId
Exact stage ID from the selected native pipeline, not its display label. обязательно по схеме · string
reason
Optional reason appended to the native status/history entry. необязательно · string · до символов 1000
Что вернёт команда
resourceId
Canonical lead ID in the connected company. обязательно по схеме · string
revision
Exact Firestore update revision from crm_lead_edit_context. Refresh after any change. обязательно по схеме · string
values
Editable fields as committed by this operation, not a later current state. обязательно по схеме · object
fieldErrors
Present only when editable fields have incompatible stored values. Those entire fields are omitted from values, not reset. Use this revision and an explicit valid patch to repair them; all other fields remain unchanged. необязательно · array · до элементов 100
pipelineId
Native pipeline ID, if assigned. обязательно по схеме · string / null
stageId
Last native status Name; cancel means archived. обязательно по схеме · string / null
archived
Whether the last native status is cancel. обязательно по схеме · boolean
Поля и технические схемы
Входные поля и поля ответа lead_set_stage
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "resourceId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
      "description": "Canonical lead ID in the connected company."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^\\d{1,12}:\\d{1,9}$",
      "description": "Exact Firestore update revision from crm_lead_edit_context. Refresh after any change."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable ID for these exact arguments. Reuse unchanged after an uncertain response."
    },
    "pipelineId": {
      "description": "Omit to keep the existing pipeline; supply to move to another company pipeline.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
    },
    "stageId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
      "description": "Exact stage ID from the selected native pipeline, not its display label."
    },
    "reason": {
      "description": "Optional reason appended to the native status/history entry.",
      "type": "string",
      "maxLength": 1000
    }
  },
  "required": [
    "resourceId",
    "expectedRevision",
    "requestId",
    "stageId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "resourceId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
      "description": "Canonical lead ID in the connected company."
    },
    "revision": {
      "type": "string",
      "pattern": "^\\d{1,12}:\\d{1,9}$",
      "description": "Exact Firestore update revision from crm_lead_edit_context. Refresh after any change."
    },
    "values": {
      "type": "object",
      "properties": {
        "name_lid": {
          "description": "Native Leads.name_lid.",
          "type": "string",
          "maxLength": 2000
        },
        "customerId": {
          "description": "Native Leads.customerId. Verified workspace ID.",
          "type": "string",
          "maxLength": 2000
        },
        "name": {
          "description": "Native Leads.name.",
          "type": "string",
          "maxLength": 2000
        },
        "lastName": {
          "description": "Native Leads.lastName.",
          "type": "string",
          "maxLength": 2000
        },
        "posicion": {
          "description": "Native Leads.posicion.",
          "type": "string",
          "maxLength": 2000
        },
        "contacts": {
          "description": "Native Leads.contacts. Supplied array replaces the whole array.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "date": {
                "$ref": "#/$defs/_mcp0"
              },
              "name": {
                "description": "Native contact.name.",
                "type": "string",
                "maxLength": 2000
              },
              "value": {
                "description": "Native contact.value.",
                "type": "string",
                "maxLength": 2000
              }
            },
            "additionalProperties": false,
            "description": "Native Leads.contacts."
          }
        },
        "address": {
          "description": "Native Leads.address.",
          "type": "object",
          "properties": {
            "Number": {
              "description": "Native Address_json.Number.",
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "Available": {
              "description": "Native Address_json.Available.",
              "type": "boolean"
            },
            "name": {
              "description": "Native Address_json.name.",
              "type": "string",
              "maxLength": 2000
            },
            "latLng": {
              "description": "Native Address_json.latLng. Supplied array replaces the whole array.",
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "number",
                "description": "Native Address_json.latLng."
              }
            },
            "address": {
              "description": "Native Address_json.address.",
              "type": "string",
              "maxLength": 2000
            },
            "city": {
              "description": "Native Address_json.city.",
              "type": "string",
              "maxLength": 2000
            },
            "state": {
              "description": "Native Address_json.state.",
              "type": "string",
              "maxLength": 2000
            },
            "country": {
              "description": "Native Address_json.country.",
              "type": "string",
              "maxLength": 2000
            },
            "zipCode": {
              "description": "Native Address_json.zipCode.",
              "type": "string",
              "maxLength": 2000
            },
            "Apartment": {
              "description": "Native Address_json.Apartment.",
              "type": "string",
              "maxLength": 2000
            },
            "Code-door": {
              "description": "Native Address_json.Code-door.",
              "type": "string",
              "maxLength": 2000
            },
            "Comment": {
              "description": "Native Address_json.Comment.",
              "type": "string",
              "maxLength": 12000
            },
            "Zone": {
              "description": "Native Address_json.Zone.",
              "type": "string",
              "maxLength": 2000
            },
            "tax": {
              "description": "Native Address_json.tax.",
              "type": "number"
            },
            "view": {
              "description": "Native Address_json.view.",
              "type": "string",
              "maxLength": 2000
            }
          },
          "additionalProperties": false
        },
        "company": {
          "description": "Native Leads.company.",
          "type": "string",
          "maxLength": 2000
        },
        "source": {
          "description": "Native Leads.source.",
          "type": "string",
          "maxLength": 2000
        },
        "sourceDetail": {
          "description": "Native Leads.sourceDetail.",
          "type": "string",
          "maxLength": 2000
        },
        "manager": {
          "description": "Native Leads.manager. Verified workspace ID.",
          "type": "string",
          "maxLength": 2000
        },
        "priority": {
          "description": "Native Leads.priority.",
          "type": "string",
          "maxLength": 2000
        },
        "segment": {
          "description": "Native Leads.segment.",
          "type": "string",
          "maxLength": 2000
        },
        "industry": {
          "description": "Native Leads.industry.",
          "type": "string",
          "maxLength": 2000
        },
        "timezone": {
          "description": "Native Leads.timezone.",
          "type": "string",
          "maxLength": 2000
        },
        "budget": {
          "description": "Native Leads.budget.",
          "type": "number"
        },
        "currency": {
          "description": "Native Leads.currency.",
          "type": "string",
          "maxLength": 2000
        },
        "consentGivenAt": {
          "description": "Native Leads.consentGivenAt. ISO 8601 with timezone; stored as a timestamp.",
          "type": "string",
          "format": "date-time",
          "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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "tags": {
          "description": "Native Leads.tags. Supplied array replaces the whole array.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 2000,
            "description": "Native Leads.tags."
          }
        },
        "comment": {
          "description": "Native Leads.comment.",
          "type": "string",
          "maxLength": 12000
        },
        "fields": {
          "description": "Native Leads.fields. Supplied array replaces the whole array.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "date": {
                "$ref": "#/$defs/_mcp0"
              },
              "name": {
                "description": "Native contact.name.",
                "type": "string",
                "maxLength": 2000
              },
              "value": {
                "description": "Native contact.value.",
                "type": "string",
                "maxLength": 2000
              }
            },
            "additionalProperties": false,
            "description": "Native Leads.fields."
          }
        },
        "language": {
          "description": "Native Leads.language.",
          "type": "string",
          "maxLength": 2000
        },
        "hearus": {
          "description": "Native Leads.hearus.",
          "type": "string",
          "maxLength": 2000
        },
        "companyLabel": {
          "description": "Editable client business name, separate from the tenant company binding.",
          "type": "string",
          "maxLength": 500
        }
      },
      "additionalProperties": false,
      "description": "Editable fields as committed by this operation, not a later current state."
    },
    "fieldErrors": {
      "description": "Present only when editable fields have incompatible stored values. Those entire fields are omitted from values, not reset. Use this revision and an explicit valid patch to repair them; all other fields remain unchanged.",
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Native field path requiring an explicit correction; no stored values are returned."
          },
          "expected": {
            "type": "string",
            "description": "Required native type or edit bound."
          },
          "actual": {
            "type": "string",
            "description": "Observed value type, never its content."
          }
        },
        "required": [
          "field",
          "expected",
          "actual"
        ],
        "additionalProperties": false
      }
    },
    "pipelineId": {
      "description": "Native pipeline ID, if assigned.",
      "type": [
        "string",
        "null"
      ]
    },
    "stageId": {
      "description": "Last native status Name; cancel means archived.",
      "type": [
        "string",
        "null"
      ]
    },
    "archived": {
      "type": "boolean",
      "description": "Whether the last native status is cancel."
    }
  },
  "required": [
    "resourceId",
    "revision",
    "values",
    "pipelineId",
    "stageId",
    "archived"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp0": {
      "description": "Native contact.date. ISO 8601 with timezone; stored as a timestamp.",
      "type": "string",
      "format": "date-time",
      "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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    }
  }
}