Bitrix24 Integration with MyBusiness (МоёДело)
An accountant works in MyBusiness, a manager in Bitrix24. Between them — chat with invoice screenshots, voice messages with details and "did this one pay?" questions. Each day starts with manual reconciliation: who paid, who needs another invoice, which counterparty changed details. With 30+ deals per week, this process generates errors faster than the accountant finds them.
Bitrix24 integration with MyBusiness service connects CRM and accounting into unified data flow — no manual transfer.
Integration Scope
| Object | Bitrix24 → MyBusiness | MyBusiness → Bitrix24 |
|---|---|---|
| Counterparties | Create/update by INN | Updated details |
| Invoices | Auto-create from deal | Status (issued, paid, cancelled) |
| Payments | — | Fact and amount of receipt |
| Acts | Request creation from CRM | PDF for deal attachment |
| Goods/services | CRM catalog → nomenclature | — |
How the Link Works
MyBusiness provides REST API with OAuth 2.0 authorization. Bitrix24 — REST API + webhooks on CRM events. Integration is built via middleware service:
- CRM event. Deal transitions to invoice stage — Bitrix24 sends webhook.
- Middleware processes request. Gets deal data: counterparty (INN), goods, amounts, VAT.
- Search counterparty in MyBusiness. By INN. If not found — creates automatically with CRM details.
- Create invoice. Via MyBusiness API with all positions and details.
- Reverse recording. Invoice number and link saved to deal's custom field.
Counterparty Synchronization
Key rule: one INN — one record. On company creation in CRM, manager enters INN, and script:
- Checks INN format and checksum.
- Requests data from EGRUL/EGRIP (via DaData or Kontur.Focus).
- Fills card: full name, legal address, KPP, OGRN.
- On sync with MyBusiness — finds or creates counterparty.
Reverse sync: if accountant adds counterparty in MyBusiness (e.g., supplier), middleware creates company in Bitrix24.
Conflicts resolved by priority: EGRUL data — highest, then MyBusiness, then CRM.
Invoice Issuance from CRM
Manager works in familiar Bitrix24 interface. Invoice issuance process:
- In deal card, clicks "Create Invoice" (custom button or auto-trigger by stage).
- System checks mandatory data: counterparty INN, at least one good position, VAT rate.
- If missing — manager sees specific message what to fill.
- Invoice created in MyBusiness, PDF generated and attached to deal.
- Manager sends PDF to client from card — email or messenger.
For repeat invoices — copy previous with date and number update.
Payment Tracking
MyBusiness processes bank statements and matches payments to invoices. When payment recorded:
- Middleware gets "paid" status with amount and date.
- In Bitrix24, deal automatically transitions to "Paid" stage.
- In deal timeline: entry with payment details.
- If partial payment — deal stays on current stage, "Paid" field shows actual amount.
Overdue invoices: middleware daily checks unpaid invoices vs payment deadline. If overdue — manager gets notification in Bitrix24 with invoice number and days overdue.
Financial Reports in CRM
Integration adds data not originally in Bitrix24:
- Receivables — unpaid invoice sum per counterparty. Displayed in company card.
- Average payment time — days average counterparty pays after invoicing. Helps assess payment discipline.
- Turnover by counterparty — total revenue for period. Data from MyBusiness, display in CRM.
These metrics don't replace full accounting reports but give manager context for client work.
Closing Documents
After obligations fulfilled, act or bill needed. From deal card manager initiates act creation — middleware sends data to MyBusiness, document formed and returned to CRM as PDF.
If company uses EDI via MyBusiness — document sent to counterparty via EDI operator.
Error Handling
- MyBusiness API unavailable — three retries with exponential delay (5, 15, 45 seconds). If fails — task queued for retry on recovery. Admin gets notification.
- Invalid data — error returned to manager in clear language: "KPP not specified for legal entity" instead of API error code.
- Duplicates — deduplication by INN (counterparties) and internal invoice ID (documents).
Security
MyBusiness OAuth tokens stored on middleware server, auto-updated via refresh token. Data transfer — HTTPS. Middleware access — IP whitelist. Personal data in logs masked (INN — yes, full names — no).
Customize link for specific business processes: from basic "invoice from deal" to full cycle with acts, payment tracking and financial analytics in CRM.







