Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Commerce Mautic Connect

Security covered Under active development 10 sites

Part of the Commerce ecosystem · 487 projects

This module synchronizes Drupal Commerce cart contents and customer purchasing data with Mautic. It enables abandoned cart recovery campaigns, customer segmentation based on purchasing behavior, coupon usage tracking, and cross-device cart restoration.

Commerce Mautic Connect sends what happens in a Drupal Commerce store to Mautic, so that campaigns can act on it there: the contents of every cart with an email address, for abandoned cart emails with a link that rebuilds the cart on any device, the coupon codes each customer used, their order totals for RFM segments, and the name, phone and country of their billing address. It uses the Mautic connection the site already has in Advanced Mautic Integration.

Features

  • ๐Ÿ›’ Abandoned carts in Mautic. Every change to a cart that has an email address, or whose visitor Mautic already tracks through its cookie, updates the Mautic contact with the cart as an email-ready HTML table, the time it last changed and its language. Placing the order or emptying the cart clears the cart on the contact, so the reminders stop.
  • ๐Ÿ”’ Recovery links that copy, never sign in. The cart table ends with a Recover My Cart button. Its signed link copies the items into the cart of whoever opens it, in any browser or on any device, never logs anyone in, leaves the original order with its customer, and expires after a lifetime you set, 7 days by default. The utm_* parameters it was opened with, such as the ones Mautic adds to the links of an email, carry over to the cart page, so analytics credits the visit to the email.
  • ๐ŸŒ In the customer's language. The cart table, the product links and the recovery link are rendered in the cart's language, and that language is stored on the contact, ready for language-filtered segments.
  • ๐Ÿท๏ธ Coupon tags. When an order is placed, the contact is tagged with every coupon code it used, behind a prefix you choose (coupon:SUMMER-20), so a segment can follow up on a promotion.
  • ๐Ÿ“Š Customer metrics for RFM. Total spent, number of orders, first and last order date and average order value are recalculated in the background when an order enters or leaves the states you count (completed and fulfillment by default), in one base currency, converted with Commerce Exchanger when it is installed.
  • ๐Ÿ‘ค Customer details. First name, last name, phone and country from the billing profile go to Mautic's own contact fields when an order is placed or paid, with the country written as the name Mautic's list expects.
  • ๐ŸŽจ A template you can override. The cart table comes from cart-email.html.twig, which a theme can override, and Template Preview renders it for a real cart, in any theme, before it reaches an email.
  • ๐Ÿ”Œ For site code and backfills. Drush commands sync open carts, coupon tags, metrics and details from past orders. getRecoveryUrl() issues a link for emails Drupal sends itself, a sync suspender keeps imports and data erasures from touching Mautic, and other modules can add settings tabs of their own as MauticFeature plugins.

Quick start

composer require drupal/commerce_mautic_connect
drush en commerce_mautic_connect
  1. At Configuration > Web services > Advanced Mautic Integration, fill in Mautic API URL, Mautic API user and Mautic API password, if the site does not have them yet.
  2. At Commerce > Configuration > Mautic Connect, on the Abandoned Cart tab, click Create Abandoned Cart Fields in Mautic under Operations: it creates the cart's fields and the one that holds the recovery link.
  3. Tick Enable Abandoned Cart Sync, set the Recovery link lifetime, and save.
  4. Open Template Preview on the same tab, pick a cart and click Preview Template in New Tab: that table and its button are what {contactfield=commerce_cart_items_html} puts in a Mautic email.

The Abandoned Cart tab, next to the tabs of the other three features. Each feature is enabled on its own.

Good to know

  • Each feature sends nothing until its tab is enabled. With Abandoned Cart on, the cart table, its recovery link, its last change time and its language go to Mautic on every change to a cart that has an email address or a tracked visitor; the other tabs send the coupon codes, the five metrics, and the billing name, phone and country. Contacts are found by email address, or through Mautic's tracking cookie, and created when none matches.
  • A recovery link works for whoever holds it, and it sits in the email, in the Mautic contact and wherever it is forwarded. Opening it gives a copy of the items, priced for the person who opened it, and nothing more; items that person may not see are left out.
  • Code that saves orders outside the shop, such as an import, a migration or a data erasure, should hold the sync suspender while it runs. Otherwise each order it saves can create or update a Mautic contact.
  • Customer metrics are calculated from a queue on cron, never during checkout.
  • The module's own template is a plain table with inline styles, which email clients render reliably; override it to match the design of your emails.

Additional requirements

Recommended modules/libraries

  • Mautic Audiences: lets the segments and tags this module fills decide what a visitor sees on the site, through block visibility conditions, a Views filter, Twig functions and tokens.
  • AI Mautic: lets an AI agent or an MCP client look up and change Mautic contacts, segments and tags, including the ones this module fills.
  • Commerce Exchanger: converts order totals to the base currency of the customer metrics, in a store that sells in more than one currency.

Similar projects

  • Commerce Abandoned Carts: sends the reminder from Drupal itself, on cron, to carts whose customer entered an email address at checkout. Pick it when the store does not use Mautic.
  • Commerce Cart Reminder: sends reminder emails from Drupal, with a link that restores the cart. Pick it for reminders without a marketing automation platform.

Community documentation

  • README: every setting, the Mautic segments and emails for abandoned carts, how recovery links behave, template overrides, the Drush commands, the sync suspender and the plugin API.

Supporting this module

Developed and maintained by Bloomidea. Bloomidea offers support and custom development for this module.

Drupal 10โ€“11 PHP ^8.1

Ask your assistant about Commerce Mautic Connect

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
10
Tracked since
Dec 2025
Latest release
1 week ago
Releases (12 mo)
10 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.6.0 Stable 10โ€“11 PHP ^8.1 Oct 2, 2026
1.5.0 Stable 10โ€“11 PHP ^8.1 Sep 30, 2026
1.x-dev Dev 10โ€“11 Aug 25, 2026
1.4.0 Stable 10โ€“11 Aug 25, 2026
1.3.1 Stable 10โ€“11 Jul 5, 2026
1.3.0 Stable 10โ€“11 Jul 5, 2026
1.2.0 Stable 10โ€“11 Jul 5, 2026
1.1.0 Stable 10โ€“11 Feb 24, 2026
1.0.0 Stable 10 Dec 11, 2025
1.0.x-dev Dev 10โ€“11 Dec 3, 2025