One-Click 1C Invoices with Stamp and Signature in 2 Seconds from CRM
The Challenge
The client is an automotive interior studio serving both individual car owners and dealerships. A single B2B order frequently covers 2–7 vehicles. The studio runs a custom CRM (Next.js + PostgreSQL + S3) alongside cloud-hosted 1C:Accounting 3.0 on Scloud.
The goal was to issue an invoice in 1C with one click from a CRM order card and automatically receive a PDF containing the company stamp and signature facsimile. At the same time, the accountant’s existing workflow in the MAX messenger (completion certificates, UPD tax documents, advance payments, and onboarding new corporate entities) had to remain untouched.
The owner and accountant set one strict constraint: do not modify the standard 1C configuration and never create duplicate or posted accounting documents.
Before the Integration
For every B2B order, a manager clicked “Request invoice and certificate” and waited. The order card was sent to the accountant in MAX, who manually created the invoice in 1C: copying line items, car makes, models, and VINs (often 5–7 vehicles per invoice), double-checking totals, exporting a stamped PDF, and sending the file back in chat for the bot to attach.
This created manual bottlenecks on routine invoices, risked typos in VINs and line totals, and delayed sending invoices to dealerships.
How We Built It
Step 1. Outbound Pull Instead of Exposing 1C Publicly
Our initial plan was inbound OData from CRM to 1C. Reconnaissance of the cloud Scloud instance uncovered two hard blockers: standard OData returned zero published entities (value=[]), and the available cloud login was a shared admin account where permissions, passwords, and licenses could not be changed.
We switched to an outbound pull architecture with zero open inbound ports. A lightweight external processing module (.epf) inside 1C polls the CRM API over HTTPS and claims jobs from a PostgreSQL queue (MVCC order snapshot + SHA256 verification, 5-minute lease). Authentication uses a Bearer token strictly bound to the exact infobase Ref so a staging copy can never collide with production.
The module runs under 1C’s standard library safe mode (SafeMode = True) with a single permission: HTTPS calls to the CRM domain. The core 1C configuration was never touched, so vendor updates apply cleanly.

Step 2. Duplicate Prevention and Safe Drafts
1C always creates an unposted draft invoice without VAT. Documents only go to clients after manager review.
Each job carries a deterministic UUID for the target invoice. On network drops, double-clicks, or timeouts, 1C looks up any existing document by that UUID instead of creating a second invoice.
We also built a smart fallback: if an order involves an advance payment, lacks a matching counterparty or contract in 1C, or already has an open accounting request, the CRM automatically routes the manager to the MAX accountant workflow.
Step 3. Auditing 10 Real PDFs Before Writing Code
Before launch, we compared 10 real accountant-issued PDF invoices against raw CRM orders. Two non-obvious business rules surfaced immediately:
- In multi-vehicle orders, the accountant always groups services by vehicle: every job for a single car stays grouped together with its make and VIN, even when managers entered items out of order.
- Delivery fees are folded into service line totals rather than listed as a separate line item, making closing paperwork easier for dealership accounting teams.
We encoded both rules into the invoice builder using BigInt cent-level integer math. Without that pre-launch audit, automated invoices would have been mathematically valid yet unfamiliar to repeat B2B clients.
Step 4. In-Memory Stamped PDFs and Unified MAX Flow
Under cloud 1C safe mode, writing temporary PDF files to disk is unreliable. We switched print-form export (using 1C’s built-in print manager with stamp and signature graphics) to an in-memory binary stream: the ~180 KB PDF renders entirely in RAM and uploads straight back to the CRM within the same job confirmation request.
A “Create in 1C” button now sits directly inside the CRM’s corporate documents panel with a confirmation modal showing the total and tax ID. Once generated, the PDF uploads to S3 and attaches to the order card with Preview and Download actions, short invoice number, audit log entry, and a link in the client portal.
The accountant chat button updates dynamically to “Request act and UPD in MAX” and posts "Invoice #225 created" to the accountant’s thread so no duplicate is ever raised.
Cloud 1C Production Nuances
- Interactive sessions and background jobs execute on different cluster nodes (
rphost), resulting in different full connection strings. Binding the target guard to the infobaseRefsolved this cleanly. - In 1C:Accounting 3.0.212, the organization’s bank account lives on the
StructuralUnitdocument attribute while units of measurement pull from the catalog item. Read-only diagnostics caught both before a single test write. - Scheduled background jobs were disabled at the hosting cluster level by default (all 105 jobs showed 0 runs). One support ticket unlocked cluster execution, enabling reliable 1-minute polling.
Results
| Metric | Before | After |
|---|---|---|
| Invoice creation | Waiting on accountant, manual entry | 1 manager click, ~2 seconds in 1C |
| Stamped & signed PDF | Sent manually as a chat file | Attached automatically to order card |
| Duplicate invoices | Risk on repeat requests | 0, guarded by deterministic UUID |
| Core 1C changes | Would require custom configuration edits | 0, safe-mode external .epf module |
| Accountant workload | Every invoice entered manually | Only acts, UPDs, prepayments, new entities |
Draft invoices match the exact visual layout and grouping rules that dealership clients and the accountant expect.
Tech Stack
- CRM: Next.js + PostgreSQL + S3
- Cloud 1C:Accounting 3.0 (release 3.0.212.9, platform 8.5, Scloud hosting)
- External
.epfmodule: outbound HTTPS pull, Bearer auth + infobaseRefbinding - 1C print-form engine + in-memory stream for stamped PDF generation
- MAX messenger for acts, UPDs, and edge-case accounting requests
Want a Similar Integration?
Message @eldarmarketing or reach out here to discuss your workflow.