Print 1C Documents Straight from Bitrix24
A manager works in Bitrix24 CRM — manages deals, communicates with clients via built-in messenger. At some point, an invoice needs to be issued. Previously, this meant: open 1C, find the counterparty, create a document, save as PDF, return to Bitrix24, attach the file. Five context switches for one action. Setting up 1C document printing from Bitrix24 eliminates this switching. We configure this connection so the manager never has to leave the CRM. The entire operation — from button press to receiving the PDF — takes seconds. This reduces invoice issuance time from hours to minutes and eliminates errors from manual data copying. Our experience shows that such integration pays for itself within the first month.
By "printing 1C documents from Bitrix24" we mean several related scenarios:
- Generating a PDF document (invoice, UPD, waybill, certificate) in 1C — directly from a deal or contact card in Bitrix24
- Sending the document to the client — via email, messenger, or a download link
- Saving the document in Bitrix24 Drive — linking it to a deal or contact
Technically, this is implemented via an HTTP service in 1C that receives a request from Bitrix24 and returns the ready PDF.
HTTP Service in 1C for Document Generation
We create an HTTP service in 1C (UT, KA, ERP) with a POST /hs/documents/print method. 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 1C service:
- Finds or creates the counterparty by counterparty_guid
- Creates the document (Invoice / Customer Order / UPD)
- Generates the printed form via the standard PrintingForm mechanism
- Returns the PDF in base64
{
"success": true,
"document_number": "Inv-00001234",
"document_date": "2024-03-15",
"document_1c_guid": "document-guid...",
"pdf_base64": "JVBERi0xLjQ..."
}
Implementation details of the HTTP service
Important: use API key validation in the Authorization header, log requests and responses. For high loads, add caching of printed forms.
Error handling and logging are added at each stage — guaranteeing transparency of the integration's operation.
Button in the Bitrix24 Interface
The manager needs a "Issue Invoice" button right in the deal card. Implemented via:
Option 1: Bitrix24 Application (Marketplace). The developed application adds a tab to the deal card. The manager sees a form: document type selection (invoice/waybill/certificate), list of items from the deal, a "Generate" button.
Option 2: Widget via REST API. Bitrix24 allows embedding custom interfaces in the CRM card via CRMActivityUI.EntityDetail.
Option 3: Robots/Triggers. When a deal moves to a certain status, an invoice is automatically generated in 1C and attached to the deal. No manager involvement.
Option 3 is the most automated. Suitable if the document logic is standard (one invoice type for all deals of that type).
| Option |
Complexity |
Automation |
| Application |
High |
Manual |
| Widget |
Medium |
Manual |
| Robots |
Low |
Full |
Linking Deal Items to 1C Items
To ensure the invoice in 1C contains the correct items, the deal items in Bitrix24 must have an XML_ID matching the 1C item GUID.
This is achieved via the Bitrix24 product catalog synchronized with 1C (either through exchange via a Bitrix site or through direct synchronization of the Bitrix24 catalog with 1C via REST API).
If there is no catalog synchronization, items can be passed by name, but then 1C will create "unknown items" and the accountant will have to clarify them manually.
Which Documents Can Be Printed
| Document |
1C Configuration |
When Needed |
| Invoice for Payment |
UT, KA, BP, ERP |
Issuing an invoice to a client |
| Waybill (TORG-12) |
UT, KA, ERP |
Shipment of goods |
| UPD (Invoice + Waybill) |
UT, KA, BP, ERP |
Shipment with VAT |
| Certificate of Completion |
KA, ERP, UNF |
Services |
| Contract (by template) |
All configurations |
Signing a contract |
Each document type can be a separate endpoint in the 1C HTTP service or a parameter document_type in a single endpoint.
Case Study: Reducing Invoice Issuance Cycle (from our practice)
A manufacturer of equipment: the cycle from order acceptance to sending an invoice to the client took 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 via email through a task. The accountant receives a notification about the created invoice in 1C.
Chief accountant: "Previously, issuing an invoice took up to 30 minutes, now it's 5. Errors are gone."
The cycle was reduced from 2–4 hours to 5 minutes. The integration was 10 times faster than manual transfer. We eliminated cases of "forgotten" invoices that previously got stuck in the manager's task list. Savings amounted to about 300,000 rubles per month in accounting labor costs, saving the company nearly 2 million rubles per year. Additionally, we configured automatic invoice creation when a deal is moved to the "Invoice Issued" status — via a Bitrix24 robot that calls a webhook, triggering an HTTP request to 1C.
How Long Does Setup Take?
The timeframe depends on complexity. Basic setup for one document type (invoice) takes 1-2 days. A full cycle with robots and all documents takes up to 5 days. We determine exact timelines after auditing your current document flow scheme.
Typical Integration Mistakes
- Incorrect item GUID: synchronize the product catalog
- Missing API key in 1C: check the request header
- 1C server overload: add request rate limiting
What Is Included in the Work
- Audit of current document flow scheme and 1C configurations
- Development of the HTTP service in 1C for the required document types
- Creation of a button in the Bitrix24 deal card (application/widget/robot)
- Item synchronization setup (if required)
- Testing of all scenarios: normal operation, errors, load
- Training for managers and accountants
- Operational documentation and integration scheme
Why Automate Printing?
Manual data transfer from Bitrix24 to 1C is a source of errors: mixed-up counterparties, incorrect amounts, forgotten invoices. Integration eliminates the human factor and speeds up the operation by 5-10 times. We guarantee the solution's operability at all stages: from design to support.
Order a preliminary assessment of your project — we will analyze the document types, load, and existing architecture. Contact us for a consultation.
Open Lines: Where It All Begins and Breaks
The Open Lines module (imopenlines) is the standard Bitrix24 mechanism for omnichannel communications. It connects an external channel to an internal chat via the Im\Model\ChatTable entity. The problem is that out-of-the-box routing settings are primitive: "in turn" or "all at once." For a real sales department with 15+ managers, VIP clients, and SLA response times, this is not enough. We enhance routing via event handlers OnImOpenLinesChatStart and the REST API.
A manager switching between five windows loses messages, forgets to reply—the client leaves for a competitor who responded in 30 seconds. Bitrix24 messenger configuration gathers all channels into one interface, and CRM records every touch. Experience shows that after setup, average first response time drops by 40% within the first week.
How we implement messenger integration
We connect Telegram, WhatsApp, Viber, VK, online chat, email, and other channels via standard connectors or REST API. Each channel requires its own configuration, but the result is unified—all messages end up in open lines, and from there into the client card. We guarantee no message gets lost: we use tagged caching and agents to check queues.
How to connect WhatsApp to Bitrix24?
WhatsApp is the main business channel. Integration via WhatsApp Business API with a verified account. We configure sending and receiving messages from the Bitrix24 interface—they fall into an open line. We create HSM templates for initiating dialog (abandoned cart reminders, order status). Templates go through Meta moderation—allow 2-3 days. We ensure file, image, and document transfer. We link conversations to contacts and deals via CRM_ENTITY_TYPE and CRM_ENTITY_ID.
| Method |
Nuances |
Payment Model |
| WhatsApp Business API (Cloud) |
Verification via Meta Business, templates, bulk messaging |
Per conversation window (24h) |
| Provider (Edna, Wazzup, Chat2Desk) |
Quick start, intermediary service, own limits |
Subscription fee |
| Bitrix24 CRM Marketing |
Built-in integration, minimal setup |
Included in Professional+ tariff |
Telegram: Free Channel with High Reach
Telegram Bot API is free and well-documented—a pleasant rarity among messengers. Integration into Bitrix24 is done via the imopenlines connector. Setup: connect the bot to open lines, configure the connector to Telegram. Receiving messages, photos, videos, documents—all mapped to the Bitrix24 chat. Inline buttons and reply keyboards for navigation. Webhook on https://yourdomain/rest/imconnector.register—register the connector. CRM integration: incoming message creates a lead via crm.lead.add or an activity in the deal.
Telegram is indispensable for:
- Support via bot—standard questions resolved without an operator (up to 70% of inquiries).
- Notifications: orders, delivery, payment—via Telegram Bot API sendMessage.
- Lead collection: bot asks qualifying questions → creates a lead.
Viber and VK: Audience 35+ and Social Network
Viber maintains positions in regions. We connect a business account via the open lines connector. We use Viber Business Messages—bulk messaging with action buttons and rich content. Receiving and sending from CRM works immediately.
VK (Vkontakte) is the largest social network in Russia. Integration via the imopenlines community messages connector. Process messages and comments from a single interface. Auto-creation of a lead—handler OnImOpenLinesCrmCreate. Integration with VK Ads for tracking sources via UTM. Bot for auto-replies—VK Bot API + Callback API.
Why is proper routing of inquiries important?
Distribution of inquiries among operators is organized through queue mechanisms. By default: "who is free." In reality, more complexity is needed:
- Determining responsible person by number or email from CRM—
im.chat.get + search via crm.contact.list.
- Distribution by departments based on keywords (NLP classifier or simple regex on first message).
- Priority queue for VIP—by segment in CRM.
- Escalation on 5-minute timeout—auto-switch to next.
- Transition to call directly from chat—
telephony.externalcall.register.
We use custom event handlers OnImOpenLinesChatStart and REST API to implement such scenarios. Additionally, we connect Bizproc for complex approval chains and integration with HL blocks for storing custom queue parameters. Result: client does not wait, operator is not overloaded.
What is included in messenger integration work
| Component |
Description |
| Audit of current CRM structure |
Analysis of inquiry types, channels, operator load |
| Connecting channels |
Configuration of WhatsApp, Telegram, Viber, VK, email, online chat connectors |
| Routing setup |
Queues, distribution by competence, escalations, SLA |
| Chatbot development |
Script-based or with NLP, integration with CRM and external APIs |
| Operator training |
Documentation, video instruction recording, webinar |
| Testing and support |
Running all scenarios, 2-week monitoring after launch |
| 6-month warranty |
Free bug fixes, consultations |
Chatbots: Script-Based and with NLP
Types
Script-based (rule-based): button menu, decision tree. "How to pay" → "Where is my order" → "Business hours." Transfer to operator at intent == 'unknown' → transfer_to_queue. Reliable, predictable, covers 60-70% of typical inquiries.
With NLP: free text in Russian. Intent detection (buy, complain, inquire about delivery), entity extraction (name, date, order number). Contextual dialog—remembers what was discussed. Implemented on Rasa or Dialogflow, integrated with Bitrix24 via REST.
Example handler code for a script-based bot (PHP)
use Bitrix\Main\Loader;
use Bitrix\Imopenlines\Model\SessionTable;
Loader::includeModule('imopenlines');
$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler('imopenlines', 'OnImOpenLinesMessageReceive', function($event) {
$message = $event->getParameter('message');
$chatId = $event->getParameter('chatId');
if (preg_match('/order status (\d+)/i', $message, $matches)) {
$orderId = $matches[1];
// Get order status via API
$order = \Bitrix\Sale\Order::load($orderId);
if ($order) {
$status = $order->getField('STATUS_ID');
\Bitrix\ImOpenLines\Chat::sendMessage($chatId, 'Your order #' . $orderId . ' status: ' . $status);
}
}
});
Scenarios and Real Impact
| Scenario |
Action |
Operator Relief |
| FAQ |
Answers from knowledge base based on intent match |
30-50% |
| Order status |
Request sale.order.get by number |
15-25% |
| Booking |
Date/specialist selection, creation via API |
20-30% |
| Calculation |
Preliminary estimate based on parameters |
10-20% |
| Lead qualification |
Data collection → crm.lead.add |
3x funnel acceleration |
| NPS/CSAT |
Rating after service |
100% automatic collection |
Comparison: a script-based bot processes requests 5 times faster than an operator, and an NLP bot reduces fallback rate to 15% after training on real dialogs. Average savings on operator salary when implementing a chatbot amount to substantial monthly savings.
How can chatbots transform your customer support?
Development Process
- Inquiry analysis—export history from open lines, cluster by topic. Identify 80% of typical requests.
- Dialog design—map on miro/figma. Each branch ends either with an answer or transfer to operator.
- Development—logic, integration with CRM and external APIs. For script-based: finite state machine. For NLP: pipeline: tokenizer → featurizer → classifier → response selector.
- NLP training—on real dialogs (at least 500 examples). Set confidence threshold.
- Testing—run all branches, edge cases (empty message, sticker, voice).
- Optimization—monitor fallback rate, retrain on new dialogs every 2 weeks.
Timeline
| Task |
Duration |
| Single messenger connection |
1-2 days |
| Open lines setup |
2-3 days |
| Script-based bot (basic) |
1-2 weeks |
| Bot with NLP |
3-6 weeks |
| Comprehensive omnichannel system |
4-8 weeks |
Result: all communications in one window, routine automated, no message lost. Managers sell, not search for the right chat. Evaluate which channels you need—contact us, we'll select for your niche. Get a personalized timeline and cost estimate for your project.