Integration of 1C-Bitrix with eSputnik

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
    1175
  • 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
    747
  • 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

1C-Bitrix Integration with eSputnik

eSputnik is a Ukrainian CDP (Customer Data Platform) with mature ecommerce tools: omnichannel automation chains, product recommendations, abandoned cart recovery, and dynamic email content driven by the product catalogue. It is well suited to stores with large catalogues and complex trigger scenarios.

eSputnik API Overview

eSputnik provides REST API v1. Authentication is Basic Auth (account login and password, not an API key). Base URL: https://esputnik.com/api/v1/.

The key difference from other ESPs is the event model as the primary trigger mechanism. Instead of managing mailings directly, you send events (order placed, cart updated, page viewed) and eSputnik builds automations on top of them.

Contact Synchronisation

class ESputnikClient {
    private string $login;
    private string $password;
    private string $baseUrl = 'https://esputnik.com/api/v1/';

    public function upsertContact(array $contactData): array {
        $http = new \Bitrix\Main\Web\HttpClient();
        $auth = base64_encode($this->login . ':' . $this->password);
        $http->setHeader('Authorization', 'Basic ' . $auth);
        $http->setHeader('Content-Type', 'application/json');
        $http->setHeader('Accept', 'application/json');

        $payload = [
            'contacts' => [[
                'channels' => [
                    ['type' => 'email', 'value' => $contactData['email']],
                ],
                'fields'   => [
                    ['id' => 1, 'value' => $contactData['first_name'] ?? ''],
                    ['id' => 2, 'value' => $contactData['last_name'] ?? ''],
                    ['id' => 3, 'value' => $contactData['phone'] ?? ''],
                ],
            ]],
        ];

        return json_decode($http->post($this->baseUrl . 'contact', json_encode($payload)), true);
    }
}

Field numbers (id: 1, 2, 3) correspond to fields configured in the eSputnik account. Verify them under Contacts → Additional fields for the specific account.

Sending Ecommerce Events

Events are the core strength of eSputnik. Send an event for every meaningful user action:

public function sendEvent(string $email, string $eventTypeKey, array $params): void {
    $http = new \Bitrix\Main\Web\HttpClient();
    // ... auth headers

    $payload = [
        'eventTypeKey' => $eventTypeKey,
        'keyValue'     => $email,
        'params'       => array_map(fn($k, $v) => ['name'=>$k,'value'=>$v],
                          array_keys($params), $params),
    ];

    $http->post($this->baseUrl . 'event', json_encode($payload));
}

// Event: order placed
$esp->sendEvent($email, 'OrderCreated', [
    'orderId'    => $orderId,
    'orderTotal' => $orderTotal,
    'currency'   => 'USD',
    'items'      => json_encode($orderItems), // JSON string with items
]);

// Event: product added to cart
$esp->sendEvent($email, 'CartUpdated', [
    'cartTotal' => $cartTotal,
    'items'     => json_encode($cartItems),
]);

Case Study: Dynamic Product Recommendations in Emails

Situation. A sports nutrition store with 15,000 active buyers. Goal: personalised recommendation emails based on purchase history.

Implementation. eSputnik accepts a product feed in XML/JSON format and builds recommendations using collaborative filtering. The feed is generated from the 1C-Bitrix catalogue and published at a protected URL:

// /bitrix/components/custom/esputnik.feed/component.php
$products = CIBlockElement::GetList(
    ['SORT' => 'ASC'],
    ['IBLOCK_ID' => CATALOG_IBLOCK_ID, 'ACTIVE' => 'Y', 'CATALOG_AVAILABLE' => 'Y'],
    false, ['nTopCount' => 10000],
    ['ID', 'NAME', 'DETAIL_PAGE_URL', 'PREVIEW_PICTURE', 'PROPERTY_PRICE_RRP', 'PROPERTY_BRAND']
);

// Generate XML in Google Shopping format (accepted by eSputnik)
header('Content-Type: application/xml');
// ...

In the eSputnik email editor, the Recommendations block automatically inserts personalised products for each recipient at the moment the email is opened (real-time rendering).

Result: Email CTR with recommendations increased from 2.1% to 6.8% over three months.

Contact Groups and Segmentation

eSputnik supports segmentation by contact fields and by events. The following fields are passed from 1C-Bitrix for segmentation:

  • Date of last order → re-engagement chains.
  • Total purchase amount → VIP segment.
  • Categories of purchased products → topical mailings.
Task Effort
API client + contact synchronisation 4–5 h
Ecommerce events (order, cart, page view) 6–8 h
Product feed for recommendations 4–6 h
Trigger chain setup in eSputnik 4–8 h