Skip to main content

ProductCRMIntegrationCreate

Binds a product to a company CRM integration, with the mapping configuration used to import and sync that product's leads. Identified by the (product_id, crm_integration_id) pair. Tracks the last import and last sync times.

product_idProduct Idrequired

ID of the product (workspace) that owns this record. Most endpoints scope access by product.

crm_integration_idCrm Integration Idrequired

ID of the company CRM integration this binding connects the product to.

config objectrequired

Per-product CRM mapping configuration (stage mapping, field mapping, sync options).

import_enabledImport Enabled

Whether the scheduled importer sweeps this CRM's import stages for new leads. It governs that bulk sweep only — a chat channel that answers inbound conversations imports the lead it is answering on demand, whether or not this is enabled.

Default value: true
import_to_stage_id object
anyOf
integer
import_interval_secondsImport Interval Seconds
Default value: 86400
pin_import_note_enabledPin Import Note Enabled

When enabled for amoCRM or Kommo, the CRM note created after a lead import is pinned on the deal. Other CRM vendors ignore this option.

Default value: false
contacts_from_custom_fields object
property name* ProductCRMIntegrationContactFromCustomFieldConfig

Defines how one CRM custom field is imported as a contact.

guess_contact_typeGuess Contact Type
Default value: true
contact_type object
anyOf
ContactType

Possible values: [phone, username, chat_id, email]

channel_type object
anyOf
string

Possible values: [telegram, whatsapp, waba, max, viber, instagram, fasttrack, usedesk, salebot, avito, vk, yandex_messenger, email, sms, pinbox, linkedin, amocrm_salesbot, bitrix24_openlines, sip, webrtc, bothelp]

ext_channel_id object
anyOf
string
channel_vendor object
anyOf
string

Possible values: [wazzup24, self_wz, self_tg_bot, chatpush, greenapi, wappi, chatapp, yandex_messenger, salebot, bothelp, radist, fasttrack, usedesk, amocrm_salesbot, bitrix24_openlines, twilio, mail.ru, gmail, pinbox, unipile, voice]

channel_alias object

Optional exact name of another CRM field whose value selects the product channel for this chat-id contact. Supported only for chat_id contacts and mutually exclusive with ext_channel_id.

anyOf
string
enum_fields object
property name* ProductCRMIntegrationEnumFieldConfig
typeTyperequired

Possible values: [select, multiselect]

optionsstring[]
crm_fields object
property name* ProductCRMIntegrationFieldConfig
crm_code object
anyOf
string
field_typeField Type
Default value: text
sourceSource

Possible values: [custom, system]

Default value: custom
is_multipleIs Multiple
Default value: false
import_enabledImport Enabled
Default value: false
is_read_onlyIs Read Only
Default value: false
options object[]
  • Array [
  • labelLabelrequired

    The option as a person reads it.

    valueValuerequired

    The option as it is stored and compared.

    ext_id object

    The CRM's own id for this option, where it exposes one. It is what the option is written back to the CRM as, so a renamed option keeps resolving. Set by the platform.

    anyOf
    string
  • ]
  • contact_duplicates_allowedContact Duplicates Allowed
    Default value: false
    contact_crm_id_duplicates_allowedContact Crm Id Duplicates Allowed

    When contact_duplicates_allowed is true, permits the same external CRM contact ID to be imported on contacts belonging to different local leads during initial import and subsequent contact synchronization. Defaults to false and has no effect while contact_duplicates_allowed is false.

    Default value: false
    crm_fields_conditions object

    Optional filter applied when importing: a CRM lead whose fields fail these conditions is not imported. Nothing records the skip, so relaxing the conditions imports the lead on a later run, as long as it still sits on an import stage. Only fields with import_enabled reach the check, so a condition naming any other field matches nothing and skips every lead.

    anyOf
    operatorCRMFieldsConditionsOperator

    Possible values: [AND, OR]

    Default value: AND
    conditions object[]
  • Array [
  • fieldFieldrequired
    operatorCRMFieldConditionOperatorrequired

    Possible values: [EQUALS, NOT_EQUALS, IN, NOT_IN, STARTS_WITH, ENDS_WITH, CONTAINS, EXISTS, NOT_EXISTS, IS_EMPTY, IS_NOT_EMPTY]

    valueValue
  • ]
  • derive_phone_number_from_lead_titleDerive Phone Number From Lead Title
    Default value: true
    amocrm_allowed_inbound_source_idsstring[]

    amoCRM only. Which connected chat sources may open a conversation with the agent, by amoCRM source id. Leave empty to accept any source. Only consulted for a lead that has never been imported: once a lead exists, its conversation is already established and this cannot stop the agent replying.

    amocrm_inbound_max_lead_age_secondsAmocrm Inbound Max Lead Age Seconds

    amoCRM only. How recently a lead must have been created in amoCRM for the agent to start answering its chat. Without a limit, enabling inbound would put the agent into every long-running conversation on the source, one at a time as each customer next wrote. Set to 0 to remove the limit. Like the source list, this applies only to a lead that has never been imported.

    Possible values: >= 0

    Default value: 3600
    sync_enabledSync Enabled
    Default value: false
    sync_interval_secondsSync Interval Seconds
    Default value: 86400
    deactivate_on_external_moveDeactivate On External Move
    Default value: false
    merged_lead_stage_id object

    Stage that leads are moved to when their CRM deal is merged into another one (see POST /leads/crm-merge). The stage must belong to this product. Leave unset to deactivate and mute merged-away leads without changing their stage. The move is local only and is never pushed back to the CRM.

    anyOf
    integer
    classification_fields_resync_requested_at object
    anyOf
    date-time
    classification_fields_last_resynced_at object
    anyOf
    date-time
    classification_fields_last_resync_failed_at object
    anyOf
    date-time
    classification_fields_last_resync_failures_countClassification Fields Last Resync Failures Count
    Default value: 0
    dump_message_enabledDump Message Enabled
    Default value: true
    dump_manager_messages_enabledDump Manager Messages Enabled
    Default value: true
    create_crm_lead_for_new_inboundCreate Crm Lead For New Inbound

    Enables automatic creation of a Bitrix24 deal or lead for an eligible new inbound lead that has no CRM record yet. The created entity follows the integration's lead_mode and lands in inbound_crm_lead_pipeline_id / inbound_crm_lead_stage_id; disabled by default.

    Default value: false
    inbound_crm_lead_pipeline_id object

    Pipeline the record created by create_crm_lead_for_new_inbound is placed in, and the pipeline the platform lead records as its origin. Must be one of the pipelines mapped in pipelines, otherwise nothing is created: a lead whose origin pipeline is unmapped can never sync its stage movements. Defaults to "0" — the CRM's default deal funnel, and the single pipeline reported when the integration works on leads rather than deals.

    anyOf
    string
    inbound_crm_lead_stage_id object

    CRM stage the record created by create_crm_lead_for_new_inbound starts on. Leave unset to use the first stage of that pipeline.

    anyOf
    string
    generate_summary_on_conversionGenerate Summary On Conversion

    When a lead is converted into a deal, summarise the conversation and post it as a comment on the new deal. The summary is generated at conversion time rather than reused from storage, so it reflects the exchange that won the deal.

    Default value: false
    summary_on_conversion_additional_instructions object

    Extra instructions for that summary — what the sales team picking the deal up needs to read. Summaries are cached per instruction set, so setting this means the conversion summary is always generated separately from the agent's own.

    anyOf
    string
    pipelines object[]
  • Array [
  • is_activeIs Active
    Default value: true
    pipeline_idPipeline Id
    Default value:
    stages object
    property name* ProductCRMIntegrationStageConfig

    Maps one platform stage onto a CRM stage, and declares what else happens when a lead reaches it.

    crm_idCrm Idrequired

    Identifier of the CRM stage this platform stage maps to.

    is_import_stageIs Import Stage

    Whether leads sitting on this CRM stage are imported into the platform.

    Default value: false
    convert_lead_to_dealConvert Lead To Deal

    When a lead moves onto this stage, also create the deal it converts into. Bitrix24 working on leads only — elsewhere the lead already is the deal. Per stage, so different stages can convert into different funnels. The stage must still map to the CRM status the lead should end on: conversion creates the deal, it never moves the lead by itself.

    Default value: false
    converted_deal_category_id object

    Funnel the converted deal is created in. Unset uses the CRM default.

    anyOf
    string
    converted_deal_stage_id object

    Stage the converted deal starts on. Unset uses the funnel's first stage.

    anyOf
    string
    openlines_transfer_to_operatorOpenlines Transfer To Operator
    Default value: false
  • ]
  • last_import_at object

    When leads were last imported from the CRM for this product (UTC).

    anyOf
    date-time
    last_sync_at object

    When this product's data was last synced to the CRM (UTC).

    anyOf
    date-time
    ProductCRMIntegrationCreate
    {
    "product_id": 0,
    "crm_integration_id": 0,
    "config": {
    "import_enabled": true,
    "import_to_stage_id": 0,
    "import_interval_seconds": 86400,
    "pin_import_note_enabled": false,
    "contacts_from_custom_fields": {},
    "enum_fields": {},
    "crm_fields": {},
    "contact_duplicates_allowed": false,
    "contact_crm_id_duplicates_allowed": false,
    "crm_fields_conditions": {
    "operator": "AND",
    "conditions": [
    {
    "field": "string",
    "operator": "EQUALS"
    }
    ]
    },
    "derive_phone_number_from_lead_title": true,
    "amocrm_allowed_inbound_source_ids": [
    "string"
    ],
    "amocrm_inbound_max_lead_age_seconds": 3600,
    "sync_enabled": false,
    "sync_interval_seconds": 86400,
    "deactivate_on_external_move": false,
    "merged_lead_stage_id": 0,
    "classification_fields_resync_requested_at": "2024-07-29T15:51:28.071Z",
    "classification_fields_last_resynced_at": "2024-07-29T15:51:28.071Z",
    "classification_fields_last_resync_failed_at": "2024-07-29T15:51:28.071Z",
    "classification_fields_last_resync_failures_count": 0,
    "dump_message_enabled": true,
    "dump_manager_messages_enabled": true,
    "create_crm_lead_for_new_inbound": false,
    "inbound_crm_lead_pipeline_id": "string",
    "inbound_crm_lead_stage_id": "string",
    "generate_summary_on_conversion": false,
    "summary_on_conversion_additional_instructions": "string",
    "pipelines": [
    {
    "is_active": true,
    "pipeline_id": "",
    "stages": {}
    }
    ]
    },
    "last_import_at": "2024-07-29T15:51:28.071Z",
    "last_sync_at": "2024-07-29T15:51:28.071Z"
    }