1C-Bitrix to Mailchimp Integration: Email Marketing Automation

Lost customers from abandoned carts — up to **70%** of orders. An automated email within an hour recovers **15–20%** of buyers. For an e-commerce store with an average order of $100, that's an extra $5,000 per month. Integrating 1C-Bitrix with Mailchimp not only solves this but also unlocks deep aud

Our competencies:

Frequently Asked Questions

Latest works

  • B2B ADVANCE company website development
    B2B ADVANCE company website development
    1462
  • Website development for FIXPER company
    Website development for FIXPER company
    1019
  • Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    764
  • Development based on 1C Enterprise for MIRSANBEL
    Development based on 1C Enterprise for MIRSANBEL
    882
  • Website development on CRM Bitrix24 for DOLBIMBY
    Website development on CRM Bitrix24 for DOLBIMBY
    810
  • Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1166

Lost customers from abandoned carts — up to 70% of orders. An automated email within an hour recovers 15–20% of buyers. For an e-commerce store with an average order of $100, that's an extra $5,000 per month. Integrating 1C-Bitrix with Mailchimp not only solves this but also unlocks deep audience segmentation by behavior, LTV, and interests. We set up the integration turnkey: from API client to complex event-driven scenarios. A typical project pays for itself in 2–3 months by cutting email sending costs by 40%. Mailchimp is an international ESP with REST API v3 and advanced automation tools. The base URL depends on your account's data center: https://<dc>.api.mailchimp.com/3.0/, where <dc> (e.g., us1) comes from the API key. Authentication is Basic Auth: any login, password is the API key. Order integration now to start recovering abandoned carts.

According to Mailchimp REST API documentation, the PUT /members/{hash} method works as an upsert.

class MailchimpClient { private string $apiKey; private string $dataCenter; private string $listId; public function __construct() { $this->apiKey = COption::GetOptionString('site', 'mailchimp_api_key'); $this->dataCenter = explode('-', $this->apiKey)[1]; // us1, us2 etc. $this->listId = COption::GetOptionString('site', 'mailchimp_list_id'); } public function upsertMember(string $email, array $mergeFields = [], array $tags = []): array { $subscriberHash = md5(strtolower($email)); $url = "https://{$this->dataCenter}.api.mailchimp.com/3.0/lists/{$this->listId}/members/{$subscriberHash}"; $http = new \Bitrix\Main\Web\HttpClient(); $http->setHeader('Authorization', 'Basic ' . base64_encode('anystring:' . $this->apiKey)); $http->setHeader('Content-Type', 'application/json'); $data = [ 'email_address' => $email, 'status_if_new' => 'subscribed', 'merge_fields' => $mergeFields, 'tags' => $tags, ]; $response = $http->query(HttpClient::HTTP_PUT, $url, json_encode($data)); return json_decode($response, true); } } 

Why Mailchimp is better than Bitrix built-in solutions

Bitrix's built-in email sending is limited: no advanced segmentation, A/B testing, or behavior-based scenarios. Mailchimp provides ready automation workflows — e.g., a series of emails after registration or an abandoned cart. Integration with Mailchimp allows using custom events (like abandoned_cart) without modifying the Bitrix core. According to project data, conversion from email to order via Mailchimp is 2 times higher than through the standard email module. Additionally, Mailchimp enables A/B testing for emails, which is impossible in Bitrix's standard mail. This boosts open rates and click-through rates.

How to automate abandoned cart

  1. Register an OnSaleBasketSaved event handler in init.php.
  2. In the handler, set an agent to execute after 1 hour using CAgent::AddAgent.
  3. In the agent, check if the cart has not been converted to an order. If not, get the user's email and name.
  4. Call Mailchimp API: POST /lists/{listId}/members/{hash}/events with event name abandoned_cart.
AddEventHandler('sale', 'OnSaleBasketSaved', function($basket) { $userId = $basket->getFUserId(); CAgent::AddAgent( 'AbandonedCartAgent::check(' . $userId . ');', 'my_module', 'N', 3600 ); }); 

After implementation, cart conversion increased from 18% to 28% — a 55% boost.

How to sync contacts and tags

Merge fields are custom audience fields. Standard ones: FNAME, LNAME. Create additional ones in audience settings:

Merge tag Type Bitrix source
FNAME Text USER.NAME
LNAME Text USER.LAST_NAME
PHONE Phone USER.PERSONAL_PHONE
CITY Text Profile property
ORDERS Number Number of orders
LTV Number Sum of orders

Tags are synced with Bitrix user groups (b_user_group). Mapping in module configuration:

function getUserMailchimpTags(int $userId): array { $tags = []; $groups = CUser::GetUserGroup($userId); $tagMap = ['9' => 'buyer', '12' => 'vip', '15' => 'wholesale']; foreach ($groups as $groupId) { if (isset($tagMap[$groupId])) $tags[] = $tagMap[$groupId]; } return $tags; } 

Sync via Mailchimp API reduces manual segmentation effort by 5 times compared to manual export from Bitrix. Merge fields can be synced on a schedule using Bitrix agents, ensuring data freshness.

Why unsubscribe webhook matters

Mailchimp sends a POST to your specified URL on unsubscribe or bounce. Without handling webhooks, you may keep sending to unsubscribed users, increasing bounce rate and harming sender reputation. Failure to handle webhooks risks sending to bounced addresses, leading to Mailchimp account suspension.

// /bitrix/tools/mailchimp_webhook.php $data = $_POST; if ($data['type'] === 'unsubscribe') { $email = $data['data']['email']; $mailchimp->updateLocalSubscription($email, 'unsubscribed'); } if ($data['type'] === 'cleaned') { $mailchimp->markEmailInvalid($data['data']['email']); } 

Common integration errors

Error 400 on upsert — invalid merge fields format. Verify that all custom fields are created in Mailchimp audience. Field types must match (Text, Number, Date). Avoid unsupported characters.

Comparison: custom module vs ready solutions

Criterion Custom module Ready Marketplace modules
Development time 1–2 days 0 days
Flexibility High (any scenario) Limited (only preset triggers)
License cost Free Paid (license required)
54-FZ integration Yes (via events) Partial

What's included in the work

  • Deployment and configuration of Mailchimp API client
  • Setup of contact sync, merge fields, and tags
  • Implementation of abandoned cart scenario with agent and abandoned_cart event
  • Webhook integration for unsubscribes and bounces with Bitrix status updates
  • Testing and request logging (all API errors are recorded in the event log)
  • Documentation and training for your team

Timeline and cost

Estimated timeline: from 4 to 20 hours depending on scenario complexity. Cost is calculated individually after analysis of your project.

Additional possibilities

Beyond basic sync, you can set up transactional emails (order confirmation, status changes) via Mandrill, which is part of Mailchimp. Also available is syncing events from Bitrix (product view, add to cart) to trigger automation chains.

Our experience in integrations

We have extensive experience integrating 1C-Bitrix with external services. We have completed dozens of projects in data sync, marketing automation, and payment systems. We guarantee quality and provide post-launch support. Contact us to evaluate your project. Get a consultation on 1C-Bitrix to Mailchimp integration.