Setting up contact exchange between Bitrix24 and 1C

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Configuring Contact Exchange between Bitrix24 and 1C

Contacts in Bitrix24 CRM and counterparties/individuals in 1C are the same customer base split between two systems. Exchange eliminates duplication: a new client entered in one system automatically appears in the other.

What is synchronized

Contacts (individuals): Bitrix24 crm.contact ↔ 1C "Individual" or "Individual counterparty".

Companies: Bitrix24 crm.company ↔ 1C "Organization counterparty".

Fields for mapping:

Bitrix24 1C Matching key
NAME, LAST_NAME Name, Last name Email or phone
PHONE Phone
EMAIL Email Main key
UF_CRM_INN TIN For legal entities
COMPANY_ID Counterparty
ASSIGNED_BY_ID Responsible manager

Direction of synchronization

Option 1: Bitrix24 as main system. Managers work in Bitrix24. When creating a contact — it goes to 1C for accounting operations.

Option 2: 1C as main system. Customer base is maintained in 1C (accounting, contracts). Goes to Bitrix24 for manager work.

Option 3: bidirectional. Both directions with certain priority rules.

Implementation: Bitrix24 → 1C

When a contact is created in Bitrix24, an outgoing webhook triggers. Bitrix24 sends POST to the registered URL with event data.

Webhook handler (PHP script):

  1. Receives data[FIELDS][ID] — contact ID
  2. Calls crm.contact.get to get full data
  3. Sends HTTP request to 1C HTTP service with JSON contact data
  4. 1C creates counterparty, returns ID
  5. Handler records 1C ID in contact's user field in Bitrix24 UF_CRM_1C_CONTACT_ID via crm.contact.update

Implementation: 1C → Bitrix24

In 1C, a handler is created (subscription to OnCounterpartySave event). When saving a new or modified counterparty:

// 1C pseudocode
Request = New HTTPRequest;
Request.SetBodyFromString(DataJSON);
Connection = New HTTPConnection("portal.bitrix24.ru");
Response = Connection.SendForProcessing(Request, "/rest/.../crm.contact.add");

The response contains the ID of the new contact in Bitrix24 — save it in 1C counterparty property for future identification.

Deduplication

The main problem of bidirectional exchange is duplicates. One client might be created in both systems independently. Duplicate prevention algorithm:

  1. When receiving a new contact, check if a record with such email/phone exists in the other system.
  2. If yes — update the existing one, don't create a new one.
  3. If no — create and record mutual IDs.

For searching in Bitrix24: crm.duplicate.findbycomm — method for finding duplicates by phone and email.

Batch initial synchronization

When starting integration, need to synchronize existing databases. Order:

  1. Export all contacts from Bitrix24 via crm.contact.list (pagination by 50 records).
  2. For each, search for match in 1C by email.
  3. Matched ones — update mutual IDs, don't duplicate.
  4. Unmatched ones — create in 1C.
  5. Contacts that exist in 1C but not in Bitrix24 — create in Bitrix24.

This is a one-time operation performed once before starting bidirectional exchange.

Common challenges

  • Different phone formats. Bitrix24 stores phones as +7 (XXX) XXX-XX-XX, 1C in free format. Normalize before comparison.
  • Multiple phones per contact. In Bitrix24 this is a multiple field, in 1C can be one field. Take first phone as primary.
  • Responsible manager. Bitrix24 users and 1C users are different entities. Need a mapping table.