1C:Enterprise Integration with Website
Website integration with 1C is a task whose complexity is often underestimated. 1C is not just a database, but a complex accounting system with its own business process logic, configurations that vary significantly between clients, and infrastructure limitations (often running on a local enterprise network).
Architectural Integration Options
Option 1: 1C as Master Data 1C stores current data (balances, prices, inventory), the website synchronizes periodically. Suitable when 1C is the primary accounting system and the website is just a storefront.
Option 2: Bidirectional Synchronization Orders are created on the website and transmitted to 1C. Data updates flow from 1C to the website. Requires careful conflict resolution logic.
Option 3: Website as Master for Orders The website manages orders, 1C receives them for accounting and production/shipment. Catalog data comes from 1C.
Methods of Connecting to 1C
1C Web Services (SOAP/REST) — 1C publishes an HTTP service through a web server (Apache/IIS). The website accesses it directly. Requires publishing 1C to an external address or VPN.
Intermediate Bus (Broker) — recommended approach for production. RabbitMQ or Redis Queue between the website and a 1C agent. The agent is a separate process (Node.js, Go, Python) that reads the queue and calls 1C's COM object or HTTP service.
Website → RabbitMQ (exchange: site_to_1c) → 1C agent → 1C
1C → RabbitMQ (exchange: 1c_to_site) → PHP Worker → Website
CommerceML (1C→website) — XML format for exporting a catalog from 1C. See CommerceML integration description for details.
1C:Connector for Websites — ready-made module for 1C-Bitrix. For other CMS, no ready solution exists; custom development is required.
Nomenclature Synchronization
The following are exported from 1C: article number, name, description, characteristics (color, size), unit of measurement, VAT, images (links or base64), barcodes.
Export format: JSON via 1C REST API or XML via CommerceML protocol.
// Processing received nomenclature
foreach ($nomenclature as $item) {
Product::updateOrCreate(
['sku_1c' => $item['code']],
[
'name' => $item['name'],
'description' => $item['description'],
'price' => $item['price'],
'stock' => $item['stock']
]
);
}
Stock and Price Synchronization
Stock and prices change more frequently than nomenclature. They require more frequent synchronization (every 15–30 minutes). Optimal approach is incremental export: only changed items since last synchronization.
-- In 1C: export only changed since last sync
SELECT Nomenclature.Code, StockTotals.QuantityBalance
FROM AccumulationRegister.GoodsInWarehouses.Balance AS StockTotals
WHERE StockTotals.Period > &LastSynchronization
Order Transmission to 1C
An order is transmitted to 1C after confirmation and payment. Format depends on 1C configuration. For "Trade Management" — the "Customer Order" object:
{
"Number": "SITE-12345",
"Date": "2024-03-15T10:30:00",
"Counterparty": {
"TIN": "7712345678",
"Name": "IP Ivanov"
},
"Goods": [
{
"Article": "ART-001",
"Quantity": 2,
"Price": 1500.00,
"Amount": 3000.00,
"VATRate": "20%"
}
],
"DocumentAmount": 3000.00,
"Comment": "Courier delivery"
}
Directories: Counterparties, Warehouses, Organizations
Before transmitting an order, it may be necessary to create or search for a counterparty in 1C by TIN or email. This is a separate request to the 1C service. If the counterparty is not found, a new one is created.
Error Handling and Monitoring
1C is a system with limited fault tolerance. Typical errors:
- 1C is locked by another user (exclusive mode)
- Referential integrity violation (product in order doesn't exist in 1C)
- Timeout when processing large data volumes
All operations are logged in sync_log with request details and errors. Alerts on error series go to Telegram/email.
Security
1C should not be directly accessible from the internet. Recommended:
- VPN or dedicated network between website server and 1C
- Message broker as the single point of connection
- IP-whitelist for 1C REST service
Development Timeline: 6–10 weeks depending on 1C configuration, data volume, and chosen integration method.







