Setting up exchange between 1C:Apteka and 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages

Configuring Exchange Between 1C:Pharmacy and 1C-Bitrix

An online pharmacy on Bitrix is a project with strict regulatory requirements: labeling, certificates, prescription restrictions. When integrating with 1C:Pharmacy, all of this must be factored in at the data exchange level. A standard CommerceML module exists, but the industry-specific nature requires customizations.

Data Structure in 1C:Pharmacy

The pharmacy software's item directory stores significantly more attributes than a standard product catalog:

  • INN (International Nonproprietary Name)
  • Dosage form (tablets, capsules, syrup...)
  • Dosage (500 mg, 1 g...)
  • Manufacturer and country of origin
  • Prescription requirement flag
  • Batch and expiry date (batch-level tracking)
  • Barcode (EAN-13, Datamatrix for labeling)

Most of these attributes must be transmitted to the website. Standard CommerceML transmits only the name, SKU code, and price. Everything else goes through AdditionalAttributes or a custom export modification.

Labeling and Honest Mark

Pharmaceutical products are subject to mandatory labeling (the "Honest Mark" system, GIS MDLP). When selling through an online pharmacy, you must:

  1. Pass the Datamatrix code from the package into the order
  2. After shipment — record the disposal in MDLP

The labeling code is stored in 1C:Pharmacy in an information register per unit of goods. In Bitrix, when placing an order, it is necessary to pass not just a product code, but a specific batch and labeling code — this breaks the standard cart architecture.

Practical solution: the Bitrix store works as a "storefront" (displaying availability and prices), while actual reservation linked to labeling codes happens in 1C:Pharmacy upon order confirmation. Exchange flow: order from Bitrix → 1C:Pharmacy, response — confirmation with specific serial numbers, or rejection (if the required batch has already been sold).

Prescription Medications

Prescription medications cannot be sold online without a prescription. At the integration level, this means:

  • When exporting items from 1C:Pharmacy, the PrescriptionRequired = Yes/No flag is transmitted
  • In Bitrix, this is an infoblock property that controls the display of the "Buy" button
  • For prescription medications — only a "Reserve" button or informational display without the ability to add to cart

This is implemented via a condition in the Bitrix catalog component template:

if ($arItem['PROPERTIES']['IS_PRESCRIPTION']['VALUE'] === 'Yes') {
    // Show only the "Check Availability" button
} else {
    // Standard "Add to Cart" button
}

Stock Levels and Expiry Dates

Pharmacies sell products with batch-level tracking — one item can have multiple batches with different expiry dates. For the website, it is usually sufficient to transmit the total stock level. But if the expiry date is critical for the buyer (e.g., the nearest batch expiry date is shown on the product page) — stock levels must be transmitted per batch.

CommerceML does not natively support per-batch stock levels. This is implemented via AdditionalAttributes in the product XML: adding an ExpiryDate attribute with the minimum expiry date from available batches.

Exchange Configuration: Key Parameters

In the 1C:Pharmacy website exchange node:

  • Item filter: "Items for Sale" only (exclude internal kits, semi-finished products)
  • Price type: retail (for the website) or wholesale (for B2B pharmacy chains)
  • Warehouses: retail floor / online order warehouse only
  • Attribute transmission: INN, dosage form, dosage, prescription flag

Case Study: Pharmacy Chain + Aggregator

A regional pharmacy chain (40 locations) connected to the Apteka.ru aggregator. The aggregator requires a specific export format (not CommerceML). The chain's own Bitrix website operates in parallel.

Solution: two export streams were configured from 1C:Pharmacy:

  1. CommerceML → own Bitrix website (standard exchange + attribute customizations)
  2. Custom XML (aggregator format) → generated by a separate scheduled task in 1C, uploaded to FTP

Both exports update stock levels every 15 minutes — critical for pharmacy inventory, where popular items sell out quickly.