Integration of Bitrix24 with Comagic

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

Bitrix24 Integration with CoMagic

Your company spends budget across five advertising channels. Managers handle calls and leads, but in your CRM all leads look the same — no source attribution. The marketer counts conversions from ad clicks, and sales counts closed deals in Bitrix24. There's a gap between these numbers. CoMagic (UIS) closes it: call tracking, chat analytics, multi-touch attribution, and CRM data transmission with keyword-level precision.

This integration differs from basic UIS telephony setup. Telephony is call routing, SIP trunk, softphone. Here we're talking about the analytics side: where the client came from, which ad channel worked, how many touchpoints before the deal.

What CoMagic Tracks

CoMagic operates at the visitor session level. A site script assigns each visit a unique identifier and collects:

  • Traffic source — advertising channel, referrer, direct visit
  • UTM tags — source, medium, campaign, content, term
  • Keyword — from Yandex Direct and Google Ads
  • Landing page and request page
  • Request type — call, chat, form, callback

CoMagic substitutes phone numbers on your site (dynamic call tracking) and tracks chats via its own widget. Each request is tied to a session with full attribution.

Sending Data to Bitrix24

Data from CoMagic reaches your CRM two ways: via native connector and via Data API.

Native connector is enabled in the CoMagic dashboard: Integrations → Bitrix24. It works in "one call = one lead" mode. On incoming call, CoMagic sends data to Bitrix24 — a lead is created with UTM fields. Limitations: no field mapping flexibility, no chat handling.

Data API — CoMagic's REST interface for exporting analytics data. Main methods:

  • get /calls/report — call report with attribution
  • get /chats/report — chat report
  • get /goals/report — goal report (forms, callbacks)
  • get /visitors/report — visitor session data

Data API enables full two-way integration.

Custom Integration Architecture

For maximum analytics precision, use Data API + Bitrix24 REST API:

  1. Calls. Cron job polls /calls/report every 5 minutes. For each new call:

    • Search for contact: crm.contact.list by phone number.
    • Contact found → register call: telephony.externalcall.register bound to contact. UTM and source are recorded in notes or custom fields.
    • Contact not found → create lead: crm.lead.add with UTM_SOURCE, UTM_MEDIUM, UTM_CAMPAIGN and custom fields.
    • Attach recording: telephony.externalcall.attachRecord.
  2. Chats. Requests from CoMagic's chat widget are transmitted similarly. /chats/report returns chat text, source, UTM tags. In Bitrix24, a lead is created or activity is logged in the timeline of an existing contact.

  3. Forms and callbacks. /goals/report contains data on completed forms and callback requests. Each goal = lead in CRM.

Custom fields for CoMagic data:

  • UF_CRM_CM_SOURCE (string) — source name
  • UF_CRM_CM_KEYWORD (string) — keyword
  • UF_CRM_CM_CHANNEL (string) — advertising channel
  • UF_CRM_CM_SESSION_ID (string) — CoMagic session ID

Lead Scoring and Multi-Touch Attribution

CoMagic rates request quality: call duration, whether a conversation occurred (not a drop), repeat contact. This data is used for lead scoring in your CRM.

Scheme:

  • Call under 15 seconds → low-priority lead.
  • First call over 2 minutes → high priority. A robot in Bitrix24 auto-assigns responsible manager.
  • Repeat call from existing contact → no new lead created, activity is updated.

Multi-touch attribution shows all customer touchpoints before the request. CoMagic records: first visit from Direct → second visit from organic → call after email campaign click. In Bitrix24, this chain is recorded in lead notes or a custom field — the marketer sees the customer's full path.

Syncing Deal Data Back to CoMagic

For ROI calculation in CoMagic, revenue data from your CRM is needed. When a deal closes, the onCrmDealUpdate webhook sends to CoMagic:

  • Session ID (UF_CRM_CM_SESSION_ID)
  • Deal amount
  • Status (won / lost)

CoMagic links revenue to the advertising source and calculates ROI by channel, campaign, and keyword.

Implementation Timeline

Scale What's Included Timeline
Basic Native connector, leads from calls, UTM tags in CRM 2-3 days
Standard Data API, calls + chats + forms, custom fields, scoring 1-2 weeks
Extended Multi-touch attribution, deal data sync back, custom reports, training 2-3 weeks

What We Configure

  • Connect CoMagic to Bitrix24 via native connector or Data API
  • Create custom fields in CRM for CoMagic analytics data
  • Develop sync script: cron job, call handling, chat handling, form handling
  • Deduplication logic: contact search by number, repeat request handling
  • Attach call recordings to CRM records
  • Set up lead scoring: prioritize by call duration and request type
  • Send closed deal data back to CoMagic for ROI calculation
  • Test full chain: visit → request (call/chat/form) → lead → deal → ROI in CoMagic
  • Train marketer: source reports, multi-touch attribution, data interpretation