Configuring 1C Document Printing from Bitrix24
A manager works in Bitrix24 CRM — managing a deal, communicating with a client via the built-in messenger. At some point, an invoice needs to be issued. The invoice is created in 1C. Previously this meant: open 1C, find the counterparty, create the document, save as PDF, return to Bitrix24, attach the file. Five context switches for a single action. Integration of 1C document printing from Bitrix24 eliminates this switching.
What "Printing from Bitrix24" Means
"Printing 1C documents from Bitrix24" covers several related scenarios:
- Generating a PDF document (invoice, UPD, waybill, act) in 1C — directly from a deal or counterparty card in Bitrix24
- Sending the document to the client — via email, messenger, or a download link
- Saving the document in Bitrix24 Drive — linked to a deal or contact
Technically this is implemented via an HTTP service in 1C that receives a request from Bitrix24 and returns a ready PDF.
HTTP Service in 1C for Document Generation
Create an HTTP service in 1C (UT, CA, ERP) with method POST /hs/documents/print.
Request:
{
"document_type": "invoice",
"order_id": "bitrix_order_123",
"counterparty_guid": "abc-123-def...",
"items": [
{"guid": "product-guid", "quantity": 5, "price": 1500.00},
{"guid": "product2-guid", "quantity": 2, "price": 3200.00}
],
"date": "2024-03-15",
"api_key": "secret-key"
}
The service in 1C:
- Finds or creates the counterparty by
counterparty_guid - Creates the document (Invoice / Buyer Order / UPD)
- Generates the print form via the standard
PrintFormmechanism - Returns the PDF in base64
{
"success": true,
"document_number": "INV-00001234",
"document_date": "2024-03-15",
"document_1c_guid": "document-guid...",
"pdf_base64": "JVBERi0xLjQ..."
}
Button in the Bitrix24 Interface
A "Issue Invoice" button is needed for the manager directly in the deal card. Implemented via:
Option 1: Bitrix24 Application (Marketplace). A developed application adds a tab to the deal card. The manager sees a form: document selection (invoice/waybill/act), list of deal positions, "Generate" button.
Option 2: Widget via REST API. Via CRMActivityUI.EntityDetail, Bitrix24 allows embedding custom interfaces in the CRM card.
Option 3: Robots/triggers. When a deal transitions to a specific status — an invoice is automatically generated in 1C and attached to the deal. Without manager involvement.
Option 3 is the most automated. Suitable when the document logic is standard (one invoice type for all deals of a given type).
Linking Deal Positions to 1C Nomenclature
For the invoice in 1C to contain the correct nomenclature — deal positions in Bitrix24 must contain XML_ID matching the GUID of the nomenclature in 1C. This is ensured via the Bitrix24 product catalog synchronized with 1C (either via exchange through the Bitrix site, or via direct synchronization of the Bitrix24 catalog with 1C through the REST API).
If catalog synchronization is absent — positions can be transferred by name, but then "unknown nomenclature" will be created in 1C, and the accountant will need to clarify it manually.
Document Types for Printing
| Document | 1C Configuration | When Needed |
|---|---|---|
| Invoice | UT, CA, BP, ERP | Issuing an invoice to the client |
| Waybill (TORG-12) | UT, CA, ERP | Product shipment |
| UPD (invoice + waybill) | UT, CA, BP, ERP | Shipment with VAT |
| Work completion act | CA, ERP, UNF | Services |
| Contract (by template) | All configurations | Contract signing |
Each document type — a separate endpoint in the 1C HTTP service, or a document_type parameter in a unified endpoint.
Case Study: Reducing the Invoice Cycle Time
An equipment manufacturer: the cycle from order acceptance to sending the invoice to the client — 2–4 hours (waiting for the accountant to open 1C and issue the invoice). The client could call earlier.
After integration: the manager in the Bitrix24 deal card clicks "Issue Invoice," fills in quantity and date — within 3 seconds the invoice PDF is attached to the deal and sent to the client by email via a task. The accountant receives a notification about the created invoice in 1C.
The cycle was reduced from 2–4 hours to 5 minutes. Eliminated cases of "forgotten" invoices that previously accumulated in the manager's task list.
Additionally: configured automatic invoice creation when a deal transitions to "Invoice Being Issued" status — via a Bitrix24 robot that calls a webhook triggering an HTTP request to 1C.







