CRM · Изменение
CRM · Лиды · Создание
crm_lead_create
Попробуйте три запроса
Подготовить
- Вы указываетеОбъект
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «CRM / Лиды / Создание». Для изменения нужны изменяемые поля. Покажи объект и ожидаемый эффект до выполнения.
- values
- Изменяемые поля
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «CRM / Лиды / Создание» с параметром values.customerId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- values.customerId
- DEMO-101
- values.name
- Осенняя коллекция
- values.timezone
- America/Tijuana
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «CRM / Лиды / Создание» по исходному ответу. Покажи ID объекта, версия записи. Объясни, чем подтвердить эффект для выбранного объекта.
- ЗапросСохранить исходный ключ
- ОтветПроверить статус
- ПроверкаСверить эффект операции
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.
Описание разработчика
Create a native company lead in an existing pipeline. Uses the pipeline default stage and atomically links or creates the native customer profile, merging contacts without duplicates. No order, Firebase Auth login or outbound message is created. After creating the lead, use crm_lead_proposal_save for selected products, requested stay check-in/check-out or service start/end.
Параметры запроса
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
- values
- Значения для записи. Состав и вложенность указаны в схеме. обязательно по схеме · object
Что вернёт команда
- 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
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable ID for these exact arguments. Reuse unchanged after an uncertain response."
},
"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
},
"pipelineId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Existing pipeline ID in the connected company."
},
"stageId": {
"description": "New leads enter pipeline defolt. If supplied, this must equal defolt; change stage after creation.",
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
}
},
"required": [
"pipelineId"
],
"additionalProperties": false,
"description": "Initial native lead fields, with required name_lid and pipelineId. Server sets identity, date and history."
}
},
"required": [
"requestId",
"values"
],
"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)))$"
}
}
}Выход · 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)))$"
}
}
}