Integration of Bitrix24 with Kontur.Diadoc

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
    1173
  • 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
    745
  • 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 Kontur.Diadoc

A manager closes a deal, creates an invoice in 1C, downloads PDF, uploads to Diadoc, signs with digital signature, sends to counterparty. Meanwhile manually attaches copy to CRM. Week later — another invoice. And another UPD. At 50 deals per month this becomes routine consuming two work days. Integration of B24 with Kontur.Diadoc automates the chain: document forms from CRM, goes to EDI, gets signed, status returns to deal.

What is Kontur.Diadoc

Kontur.Diadoc is an Electronic Document Interchange (EDI) operator from SKB Kontur. Through it, legal entities exchange legally significant documents: invoices, acts, UPDs, shipping documents, contracts. Documents are signed with qualified electronic signature (QES) and have same legal force as paper originals.

Document types transmitted via Diadoc:

  • Invoice — for VAT deduction
  • UPD (Universal Transfer Document) — replaces invoice + act/shipment
  • Act of Work Completed — confirmation of service delivery
  • Shipping Document (Torq-12) — goods shipment
  • Contract — arbitrary document with bilateral signing

Integration Architecture

B24 + Diadoc connection works via Diadoc API (REST). Main components:

Component Role
Bitrix24 CRM Data source: company details, amounts, nomenclature from deal
Middleware (server handler) Forms XML document per FNS standard, sends to Diadoc API
Diadoc API Receives document, routes to counterparty, manages signing
QES (CryptoPro / VipNet) Document signature on sender side

No direct "B24 → Diadoc" connector out of box. Integration realized through:

  • Ready-made app from B24 Marketplace — if one covers your scenario.
  • Custom development — server script (PHP/Node.js) that on B24 webhook forms document and sends via Diadoc API.
  • iPaaS platform (Albato, Make) — if no need to form XML per FNS standard.

Document Formation from CRM

Document data comes from deal and related entities:

  1. Seller Details — from B24 company settings (tax ID, registration code, address, bank account).
  2. Buyer Details — from counterparty company/contact card in CRM.
  3. Nomenclature — from deal product positions (name, quantity, price, VAT).
  4. Amounts — total, VAT, payable — calculated automatically.

Middleware forms XML per format required by tax authority (for invoices and UPDs — formalized format). For acts and contracts — unformalized (PDF or arbitrary XML).

Signing Process

Document signing in Diadoc requires QES. Signing options from B24:

  • Via Diadoc Interface. Manager clicks button in CRM → document created in Diadoc → manager goes to Diadoc, signs with QES. Status returns to B24 via API.
  • Via Server Signature. CryptoPro CSP installed on server. Document signed automatically with organization certificate. Fits mass distribution (tens of documents daily).
  • Via Kontur Cloud Signature. QES stored in Kontur cloud — signing via API without local CryptoPro installation.

Document Statuses and CRM Feedback

After sending, document in Diadoc goes through stages:

  1. Sent — document reached counterparty
  2. Delivered — counterparty received document
  3. Signed — counterparty signed with their QES
  4. Rejected — counterparty refused signing (with comment)
  5. Canceled — one side initiated cancellation

Statuses return to B24 via Diadoc API polling (periodic check) or event mechanism. In deal card, custom field "EDI Status" updates, and on bilateral signing — robot moves deal to next stage.

Handling Incoming Documents

Counterparty sends document via Diadoc. Integration intercepts and:

  • Creates activity (event) in CRM linked to counterparty company.
  • Attaches PDF version to deal card.
  • Notifies responsible manager.
  • After company signing — updates status.

Implementation Timeline

Scope What's Included Timeline
Basic Sending unformalized documents (acts, contracts) from CRM to Diadoc, manual signing 1-2 weeks
Standard Formalized documents (UPD, invoice), automatic formation from deal, status return 2-4 weeks
Extended Server signature, incoming document processing, 1C + B24 + Diadoc integration 4-6 weeks

What We Configure

  • Connecting Diadoc API: authorization, token receipt, organization box setup
  • Mapping details: company and contact in CRM → seller/buyer details in document
  • Forming documents from CRM: UPDs, acts, invoices based on deal data
  • Setting up signing: CryptoPro integration (local or server), Kontur cloud signature
  • Returning statuses from Diadoc to CRM: updating deal fields, automatic stage transition
  • Processing incoming documents: notifications, deal binding, signing
  • Training managers: sending document from CRM, tracking status, handling rejections