1C-Bitrix integration with Competera (price monitoring)

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
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1173
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    745
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Integrating 1C-Bitrix with Competera (Price Monitoring)

Competera is a dynamic pricing and competitor monitoring platform. Its core consists of machine learning algorithms that analyse competitor data and demand elasticity to generate price recommendations. The integration goal with 1C-Bitrix is to receive these recommendations and either apply them automatically or present them to the category manager for manual approval.

Competera API

Competera provides a REST API. Base URL: https://api.competera.io/v1/. Authentication via an API key in the X-Api-Key header. Key endpoints:

  • GET /products — product catalogue in Competera
  • POST /products/upload — upload/update catalogue
  • GET /repricing/recommendations — pricing recommendations
  • POST /prices/upload — upload current store prices
  • GET /competitors/prices — competitor prices for your products

Synchronizing the 1C-Bitrix Catalogue to Competera

Competera requires your product catalogue: SKU, name, EAN, current price, cost price (optional). Format — CSV or JSON.

An agent exports changes once per day (or on product update):

function SyncCatalogToCompetera(): string
{
    $products = \CIBlockElement::GetList(
        ['ID' => 'ASC'],
        ['IBLOCK_ID' => CATALOG_IBLOCK_ID, 'ACTIVE' => 'Y'],
        false,
        ['nPageSize' => 1000],
        ['ID', 'NAME', 'PROPERTY_ARTICLE', 'PROPERTY_BARCODE']
    );

    $rows = [['sku', 'name', 'ean', 'price', 'cost', 'category']];
    while ($product = $products->GetNext()) {
        $price = \CCatalogProduct::GetOptimalPrice($product['ID'])['PRICE']['PRICE'] ?? 0;
        $cost  = \CIBlockElement::GetProperty(CATALOG_IBLOCK_ID, $product['ID'], [], ['CODE' => 'COST_PRICE'])->Fetch()['VALUE'] ?? 0;
        $rows[] = [
            $product['PROPERTY_ARTICLE_VALUE'],
            $product['NAME'],
            $product['PROPERTY_BARCODE_VALUE'],
            $price,
            $cost,
            $product['SECTION_NAME'],
        ];
    }

    $csv = implode("\n", array_map('str_getcsv', $rows));
    $competera->post('/products/upload', ['file' => $csv, 'format' => 'csv']);

    return __FUNCTION__ . '();';
}

Retrieving Recommendations and Applying Prices

GET /repricing/recommendations returns an array with recommended prices, reasons for change, and the algorithm's confidence score:

{
  "recommendations": [
    {
      "sku": "ART-12345",
      "current_price": 4990.00,
      "recommended_price": 4750.00,
      "reason": "competitor_undercut",
      "confidence": 0.87,
      "competitor_min": 4720.00
    }
  ]
}

The application logic depends on settings:

foreach ($recommendations as $rec) {
    $product = ProductRepository::findBySku($rec['sku']);
    if (!$product) continue;

    $autoApply = (bool)\Bitrix\Main\Config\Option::get('competera', 'auto_apply_' . $product['SECTION_ID'], false);
    $minConfidence = (float)\Bitrix\Main\Config\Option::get('competera', 'min_confidence', 0.8);

    if ($autoApply && $rec['confidence'] >= $minConfidence) {
        // Apply automatically
        \CCatalogProduct::Update($product['ID'], ['PRICE' => $rec['recommended_price']]);
        \CCatalogProduct::SetPrice($product['ID'], BASE_PRICE_TYPE_ID, $rec['recommended_price']);
        PriceChangeLog::write($product['ID'], $rec['current_price'], $rec['recommended_price'], 'competera_auto');
    } else {
        // Queue for manager approval
        CompeteraPendingTable::add([
            'PRODUCT_ID'    => $product['ID'],
            'CURRENT_PRICE' => $rec['current_price'],
            'RECOMMENDED'   => $rec['recommended_price'],
            'CONFIDENCE'    => $rec['confidence'],
            'REASON'        => $rec['reason'],
            'STATUS'        => 'pending',
        ]);
    }
}

Recommendation Approval Interface

In the 1C-Bitrix admin panel — a "Competera Recommendations" page with a table:

Product SKU Current price Rec. price Change Competitor min Confidence Action
Philips BHD... hair dryer ART-12345 4990 4750 −4.8% 4720 87% [Apply] [Reject]

Clicking "Apply" calls the price update API in 1C-Bitrix and updates the status in bl_competera_pending. Clicking "Reject" sets the status to rejected and the recommendation is not applied.

Timeline

Phase Duration
Competera API client + authentication 1 day
Catalogue and price synchronization 2 days
Recommendations retrieval + application logic 2 days
Manager approval interface 2 days
Logging and testing 1 day
Total 8–10 days