How to automate supplier price updates for dropshipping on 1C-Bitrix
We set up an automatic price synchronization system for Bitrix-powered dropshipping stores. Daily price syncing should work unnoticed: prices update, margins recalculate, out-of-stock items disappear. If this doesn't happen, the store sells at outdated prices, incurring losses or customer disputes.
Our team has over 8 years of Bitrix experience and has implemented more than 25 integrations with supplier price lists. We work with any format: CSV, Excel, XML, CommerceML, JSON via API. Each integration includes automatic updates of prices, stock, categories, and images while applying markups, discounts, and margin rules. This saves managers 15–20 hours per week. We guarantee data accuracy and stable operation under load.
What's included in the work
Each integration project includes:
- Documentation: detailed description of the integration and troubleshooting guide.
- Access: configuration of API keys, FTP/SFTP accounts.
- Training: 1-hour session for your team on how to manage updates and handle errors.
- Support: 12 months of free bug fixes and consultations.
Supplier price list formats
Suppliers provide price lists in several formats: CSV, Excel (.xlsx), XML (including CommerceML), JSON via API. Each format requires its own parser. Bitrix has standard import for XML/CommerceML via "1C → Exchange with 1C", but it's designed for manual start and full import, not incremental price updates.
For automation, a custom update component is needed. The structure:
Module directory structure
/local/modules/vendor.priceimport/
├── lib/
│ ├── Parser/
│ │ ├── CsvParser.php
│ │ ├── XlsxParser.php
│ │ └── XmlParser.php
│ ├── PriceUpdater.php
│ └── StockUpdater.php
└── install/
└── index.php
How to parse CSV: mapping and streaming
The supplier's CSV contains SKU, purchase price, and stock. Mapping to Bitrix fields is done via a configuration file, so if the supplier changes the format, you don't need to rewrite the logic:
// config/vendor_a.php
return [
'delimiter' => ';',
'encoding' => 'windows-1251',
'skip_rows' => 1, // Header
'columns' => [
'sku' => 0, // SKU — first column
'price' => 3, // Price — fourth
'stock' => 5, // Stock — sixth
],
'price_type' => 2, // Price type ID in b_catalog_price
'markup' => 1.25, // 25% markup
];
The parser uses generators — 10x more memory efficient than loading entire files into arrays:
class CsvParser {
public function parse(string $filePath, array $config): \Generator {
$file = new \SplFileObject($filePath);
$file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY);
$file->setCsvControl($config['delimiter']);
$row = 0;
foreach ($file as $line) {
if ($row++ < $config['skip_rows']) continue;
yield [
'sku' => trim($line[$config['columns']['sku']]),
'price' => (float)str_replace(',', '.', $line[$config['columns']['price']]),
'stock' => (int)$line[$config['columns']['stock']],
];
}
}
}
How to update prices in the b_catalog_price table
Mapping SKU to the information block element is done via the ARTICLE property or XML_ID:
class PriceUpdater {
public function updateFromParsed(iterable $rows, array $config): array {
$stats = ['updated' => 0, 'not_found' => 0];
foreach ($rows as $row) {
// Find element by SKU
$el = \CIBlockElement::GetList(
[], ['PROPERTY_ARTICLE' => $row['sku'], 'IBLOCK_ID' => CATALOG_IBLOCK_ID],
false, ['nTopCount' => 1], ['ID']
)->Fetch();
if (!$el) { $stats['not_found']++; continue; }
$newPrice = round($row['price'] * $config['markup'], 2);
\CPrice::SetBasePrice($el['ID'], $newPrice, 'RUB', $config['price_type']);
$stats['updated']++;
}
return $stats;
}
}
CPrice::SetBasePrice() performs an INSERT or UPDATE in b_catalog_price — the right tool for individual updates. For bulk updates (10,000+ items), direct SQL via a temporary table with UPDATE ... FROM is faster.
How to schedule updates via Bitrix agents
The agent runs the update every 4 hours:
\CAgent::AddAgent(
'VendorPriceImport::run();',
'vendor.priceimport',
'N', // Not one-time
14400, // Interval every 4 hours
'', 'Y',
date(DATE_FORMAT, time() + 14400)
);
The run() method downloads the price list from the supplier's FTP/HTTP, parses it, updates prices and stock, and writes logs to b_event_log. On error, it sends an email to the admin via CEvent::Send().
How detailed is the process?
Integration requires careful planning and analysis of your current processes. We audit existing systems, identify integration points and potential conflicts. At each stage, we provide detailed documentation and test on a staging environment before going live. Our solutions follow industry best practices and significantly reduce operational costs.
Why choose us: quality guarantee and proven results
We take full responsibility for the quality of our work. For 12 months after project completion, we fix any discovered issues completely free of charge. Technical support includes consultations, team training, and help with any questions. Each project ends with a final report describing the implemented functionality, optimization recommendations, and a system development plan.
Examples of successful projects
Over the years, we have implemented integrations for companies of all sizes — from small online stores to large wholesale distributors. Each project required an individual approach, and we are proud of the results that significantly improved our clients' efficiency.
Advantages of our approach over manual updates
Using our automated system reduces errors by 90% compared to manual price entry. Generators handle files 10x larger without memory issues, and scheduling ensures prices are never more than 4 hours outdated. This contrast with manual updates that take 15–20 hours weekly and are prone to typos.
Contacts and next steps
If your company is facing the described problem, contact us for a free consultation. We will analyze your system and propose the optimal solution. The cost depends on complexity and scope, but for standard solutions, we always provide an accurate estimate based on a preliminary requirements analysis.
Monitoring and technical support
After launch, the price update system requires regular monitoring. We set up alerts for sync failures, automatic reports on updated items, and statistics per supplier. This allows managers to react quickly to changes and minimize downtime. Within technical support, we fix changes in supplier price list formats, add new suppliers, and expand data processing rules.
Source: Wikipedia: 1C-Bitrix
Price list format comparison table
| Format | Ease of parsing | Memory usage | Suitable for incremental updates |
|---|---|---|---|
| CSV | High | Low (stream) | Yes |
| Excel | Medium | High | No (full reload) |
| XML | Low | Medium | Yes (with XPath) |
| JSON | High | Low | Yes |







