MCP Control
Обзор  ›  CRM
CRM · Чтение

CRM · Лиды · Изменение · Контекст

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

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

Получить данные
  1. Вы указываетеId объекта
  2. ПомощникЧтение
  3. Вы получаетеПоля ответа
Запрос в чат
Для задачи «CRM / Лиды / Изменение / Контекст» выполни чтение по выбранной записи (ID объекта). Выведи кратко: ID объекта, версия записи.
Что искать в ответе
resourceId
Id объекта
revision
Версия записи
values
Изменяемые поля
Задать параметры
  1. Вы указываетеId объекта
  2. ПомощникСверка выбора
  3. Вы получаетеТочный объект
Запрос в чат
Покажи, как получить «CRM / Лиды / Изменение / Контекст» на учебном примере с resourceId = DEMO-101. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
Фрагмент учебных параметров
resourceId
DEMO-101
Разобрать ответ
  1. Вы указываетеПолученный ответ
  2. ПомощникРазбор значений
  3. Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «CRM / Лиды / Изменение / Контекст» объясни ID объекта, версия записи. Отметь отсутствующие значения.
Поля для проверки
resourceId
Id объекта
revision
Версия записи
values
Изменяемые поля
Как работает действие

Это чтение. Выберите запись или задайте фильтры в доступной компании.

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

Read native editable lead fields, current stage/archive state and exact concurrency revision. Use lead_activity for paginated status/history/notes. Never replace history through crm_lead_update. Read proposal items and requested booking/service times with crm_lead_proposal_get.

Параметры запроса
resourceId
Canonical lead ID in the connected company. обязательно по схеме · string
Что вернёт команда
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
Поля и технические схемы
Входные поля и поля ответа crm_lead_edit_context
Вход · 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."
    }
  },
  "required": [
    "resourceId"
  ],
  "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)))$"
    }
  }
}