1C:Enterprise integration: product sync, orders, inventory
Monday morning. The manager opens the site and sees that the product sold out on Friday is still "in stock." Three customers already paid for an order for out-of-stock goods. This is the classic pain of lack of synchronization between 1C and an online store.
1C is the accounting system of most Russian companies. A website is a storefront. They should speak the same language and do it regularly, reliably, and without data loss.
Protocols and approaches
CommerceML 2.x — standard exchange protocol supported by 1C:Trade Management, 1C:Integrated Automation, and several other configurations. WooCommerce and some other CMS have built-in support (1C-Bitrix plugin for their products, separate plugins for WordPress). Flow: 1C initiates exchange → sends ZIP archive with XML to site endpoint → site parses, updates catalog.
CommerceML format — XML with its own schema: CommercialInformation, Classifier, Catalog, PackageOffers. Categories, products, characteristics, images, prices, inventory. Main complexity — 1C characteristic hierarchy and site product attributes don't always match one-to-one. Requires mapping.
Direct REST API. For non-standard 1C configurations or when CommerceML doesn't fit — write HTTP-service in 1C (built-in capability since version 8.3) and interact via REST JSON. Gives full control over data structure and sync frequency, but requires development from 1C programmer side.
Message Broker. For enterprise tasks with multiple accounting systems — Message Broker (RabbitMQ, Apache Kafka) as intermediary. 1C publishes events to queue, site subscribes and processes. Guaranteed delivery, buffering when one side is unavailable.
What we sync and how
Catalog (products, categories, characteristics). Largest part. Full export on first run, delta updates thereafter. On CommerceML import: parse XML via PHP SimpleXML or XMLReader (for large files — only XMLReader, else memory limit exceeded). Match products by ID from 1C, stored in separate DB field. If product deleted in 1C — hide on site, don't delete (order history may reference it).
Inventory and prices. Separate PackageOffers in CommerceML, updates more frequently than catalog. Critical to do atomically: don't update inventory one by one, do it in transaction. Otherwise user can see inconsistent state during update. Frequency: once an hour for calm mode, every 5–15 minutes for active trading.
Orders. Two-way exchange. Site → 1C: new order with nomenclature, quantity, prices, customer contact data. 1C → site: order status (paid, assembled, shipped, delivered). For order transfer — either same CommerceML (Documents section) or direct REST call when order created on site.
Typical problems we solve
Product duplicates. 1C operator created position with typo in article number, then fixed it. On site — two products. Solution: matching by GUID from 1C (not by article number), GUID is immutable.
Cyrillic in XML and encodings. 1C historically works with Windows-1251. CommerceML file may come in CP1251, PHP expects UTF-8. mb_convert_encoding() or iconv() in first lines of parser — mandatory.
Timeouts with large exports. Catalog of 100,000 items — this is 50–200MB XML. PHP default execution time 30s won't cut it. Solution: CLI command (Laravel Artisan or Symfony Console), run via cron, no HTTP timeout. Or chunked processing via XMLReader with partial commits to DB.
Images. 1C may send images as Base64 inside XML (inflates file by 1.3x) or as file links. Second option is preferable. Download asynchronously, convert to WebP, put in media library.
Case study: spare parts e-commerce, 85,000 SKU. Synchronization via CommerceML every 30 minutes. Problem: full export took 18 minutes, new export started while old one was still running. Solution: lock via Redis (SET nx ex), delta export (only changed items in last 2 hours via filter in 1C), process via queue with 20 parallel workers. Sync time: 18 minutes → 2.5 minutes, no conflicts.
Process and timelines
Audit 1C configuration (version, configuration type, export capabilities) → design data mapping → develop receiver on site and sender in 1C → test on real data → set up schedule → monitor first exchanges.
Participation of 1C programmer from client side — mandatory or we engage verified specialist.
| Scenario | Timeline |
|---|---|
| CommerceML, catalog + inventory, WooCommerce | 2–4 weeks |
| Two-way order exchange | +2–3 weeks |
| Custom 1C configuration, REST API | 4–8 weeks |
| Enterprise: multiple 1C bases, data bus | 2–4 months |
Cost calculated individually.







