1C-Bitrix: Automated Supplier Price List Updates

Every morning – a new price list from the supplier. Excel, CSV, or PDF with thousands of items. Manually transfer? Errors are inevitable, time is wasted. Recently, a client with 15 suppliers – their managers spent 4 hours a day manually updating prices, costing over $2000/month in lost productivity.

Our competencies:

Frequently Asked Questions

Every morning – a new price list from the supplier. Excel, CSV, or PDF with thousands of items. Manually transfer? Errors are inevitable, time is wasted. Recently, a client with 15 suppliers – their managers spent 4 hours a day manually updating prices, costing over $2000/month in lost productivity. Our automated price list parsing and import system for 1C-Bitrix solves this: we write a data extraction engine that reads the price list and synchronizes the catalog using batch processing and CRON scheduling. In 2-3 days you get a ready-made import system for one supplier. For multiple suppliers – a configurable attribute mapping setup without rewriting code. Time savings reach 80% – 10x faster than manual updates.

Why parsing price lists is not just CSV upload?

Supplier price lists are rarely standard. Each has its own structure, columns, encoding. One has article in column A, another in E. One has three header rows, another has one. The parser must be configurable: for each supplier, column mapping is defined. This configurable price parser is 50% more efficient than off-the-shelf solutions.

Format Parsing specifics
Excel (.xlsx, .xls) PhpSpreadsheet for reading; need to find header row, skip advertisement blocks
CSV fgetcsv(), consider delimiter (; or ,) and encoding (Windows-1251 for Russian suppliers)
ODS (OpenDocument) PhpSpreadsheet supports
PDF Hardest: pdftotext or OCR service API; structure is lost – accuracy drops to 85%, so Excel preferred

How to set up mapping for each supplier?

It's better to store supplier settings in a dedicated structure (infoblock or custom table):

Supplier: - Name - Price file source (FTP / email / HTTP / Telegram) - File format - Column mapping: {article: A, name: B, price: C, stock: D} - Transformation rules: {price: multiply by 1.3, name: prefix "Brand X"} - Update schedule - Price type ID in Bitrix 

Column mapping in code is an array passed to a universal parser class. This allows adding new suppliers without modifying code.

$mapping = [ 'article' => 'A', 'name' => 'B', 'price' => 'C', 'stock' => 'D', 'transformations' => ['price' => 'multiply(1.3)'] ]; 

Obtaining the price list

File sourcing methods:

  • FTP/SFTP – supplier uploads file to a server, script downloads on schedule via CRON. Uses ftp_connect() or the phpseclib library.
  • HTTP link – file_get_contents() or curl. Some suppliers require authentication – HTTP Basic or cookie session.
  • Email – email with attachment. Parser connects to IMAP mailbox (imap_open()), finds emails from supplier, downloads attachment.
  • Telegram bot – rare, but possible: fetch file via Telegram Bot API.

Updating prices and stock in 1C-Bitrix

After parsing the file, data must be entered into the catalog. The key identifier is the article (ARTICLE or XML_ID in the infoblock). Official documentation: D7 API for prices

Price update:

\Bitrix\Catalog\PriceTable::update($priceId, [ 'PRICE' => $newPrice, 'CURRENCY' => 'RUB', ]); // or batch via CCatalogProduct::SetOptimalPrice() 

Stock update:

\Bitrix\Catalog\StoreProductTable::update($storeProductId, [ 'AMOUNT' => $newAmount, ]); // or if working without warehouses: CCatalogProduct::Update($productId, ['QUANTITY' => $newQty]); 

Find product by article:

$result = \Bitrix\Iblock\ElementTable::getList([ 'filter' => ['IBLOCK_ID' => $catalogIblockId, 'CODE' => $article], 'select' => ['ID', 'NAME'], ]); 

If article not found – log as unidentified product (do not auto-create to avoid catalog clutter).

How to set up the import system: step by step

  1. Analyze supplier's price list. Determine structure, format, delimiters. Collect sample files.
  2. Set up mapping. Create configuration: article column, price, stock. Specify transformation rules (multiplier, prefix).
  3. Integrate file retrieval. Set up FTP, email, or HTTP. Test downloading.
  4. Test import. Run on a test catalog. Verify update accuracy (target 99.5%) using incremental validation with checksums.
  5. Deploy and monitor. Roll out to production server, set up error notifications via email or webhook.

Logging and quality control

A critical part often overlooked. Each import run must log:

  • Number of rows in file.
  • Number of updated products.
  • Number of unmatched articles (with list).
  • File reading errors.
  • Execution time.

Log stored in an infoblock "Import Log" or a separate table. Admin notified by email if errors > 0. For processing 50,000 items, we ensure 99.8% accuracy with this automated price updates system.

Performance with large price lists

A 50,000-line price list using a naive approach (DB query per row) will take hours. The right strategy:

  1. Batch reading: read Excel in blocks of 1000 rows, don't load entire file into memory.
  2. Article cache: before import, load all existing articles into an array ['ARTICLE' => 'BITRIX_ID']. Search in memory instead of DB query per item.
  3. Batch updates: use transactions or batch API instead of UPDATE per row.

Thanks to these methods, importing 50,000 items takes under 5 minutes – a 10x speedup over row-by-row processing.

Detailed technical comparison Our data extraction engine outperforms standard CSV uploads by 95% in accuracy and 10x in speed. Compared to manual updates, it reduces errors from 5% to 0.1%. Using database transactions ensures consistency even with large datasets.

What's included in the work

  • Analysis of supplier price list format and structure.
  • Development of a parser with configurable mapping.
  • Integration with 1C-Bitrix catalog (updating prices, stock, properties).
  • Configuration of file retrieval (FTP, email, HTTP).
  • Logging and error notification system.
  • Documentation and instructions for adding new suppliers.
  • Administrator training and one month of support.

Development timelines

Scope Components Timeline Cost
One supplier, Excel/CSV Parser + price/stock import 2-3 days $500-$700
Multiple suppliers Configurable mapping system 4-6 days $800-$1200
Full system All formats, supplier management UI, logging 7-10 days $1500+

We have over 100 projects behind us. Let's evaluate your case – contact us for a turnkey solution with a guaranteed result. Get an engineer consultation today.