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:
- Seller Details — from B24 company settings (tax ID, registration code, address, bank account).
- Buyer Details — from counterparty company/contact card in CRM.
- Nomenclature — from deal product positions (name, quantity, price, VAT).
- 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:
- Sent — document reached counterparty
- Delivered — counterparty received document
- Signed — counterparty signed with their QES
- Rejected — counterparty refused signing (with comment)
- 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







