Skip to main content
Magento → Marketing CloudIntegration guide

Connecting Magento to Salesforce Marketing Cloud

Magento is self-hosted and endlessly customisable, which means every installation is different and full-page caching is always in the way. Marketing Cloud is a different product from Salesforce CRM with a different identity model, which catches out almost everyone who assumes a contact in one is a contact in the other. The join between them succeeds or fails on one thing: whether the Subscriber Key reaches the Magento order before the conversion happens, because Marketing Cloud can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Magento orders into Marketing Cloud: pick a key guests have too

Choose the Marketing Cloud Subscriber Key before the first insert, since Magento's customer_id misses guests; most stores use a Sales Cloud Contact ID or normalized email. Send each placed order as a data extension row with Subscriber Key, increment_id, base_grand_total, currency, store view and status. Put credit memos in a separate data extension, and sync newsletter consent.

The decision that makes or breaks this pair is the Subscriber Key. Magento's customer_id exists only for registered customers, and many stores take a large share of orders as guests. Key Marketing Cloud on customer_id and guest orders either go nowhere or create a subscriber that never merges when the guest later registers. Most Magento stores end up keying on a Salesforce Contact ID when Sales Cloud is the customer master, or on a normalized email, and that choice has to be made before the first insert.

Send each placed order from the observer as a row in the data extension your post-purchase journey listens to: Subscriber Key, increment_id, base_grand_total, currency, store view and order status. Store view matters because one Magento install often runs several brands or languages, and the journey has to send the right one. Send credit memos to a separate data extension so a refunded order can exit a review-request journey before it sends.

Marketing consent lives elsewhere. Magento keeps newsletter status in its newsletter_subscriber table, not on the order, and a buyer who did not opt in can receive transactional order messages but not marketing journeys. Sync that status to the subscriber. For abandoned-cart journeys, note that guest quotes usually have no email until the shipping step, which limits who you can reach.

Magento → Marketing Cloud · what breaks

Why this join usually fails — Magento → Marketing Cloud

  1. 01

    The Subscriber Key never reaches Magento

    Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one.

  2. 02

    Full-page cache between the visitor and your code

    The page the customer saw is not the page your code assumed. This is the defining Magento tracking failure and it produces intermittent, hard-to-reproduce loss.

  3. 03

    Two identity models treated as one

    Marketing Cloud's Subscriber Key and CRM's Contact ID are separate concepts, and Contact Builder's configuration decides whether they relate at all. Getting this wrong does not produce an error — it produces a customer who exists twice, receives everything twice, and appears in reporting as two people.

  4. 04

    Nothing reconciles afterwards

    Check the subscriber record and the journey history, not the API response. A successful insert into an unwatched data extension looks identical to a successful one into the right extension.

Magento → Marketing Cloud · the fix

What working looks like — Magento → Marketing Cloud

  • The Subscriber Key on every order

  • Conversions arriving in Marketing Cloud

    The record lands in the data extension, the journey's entry criteria evaluate on its schedule, and sends follow.

  • Reconciled against the source

Magento → Marketing Cloud · architecture

How Magento and Marketing Cloud actually connect

  1. 1

    Magento holds the truth

    You own the database, so the truth is as good as the query. Pin down which order statuses count as revenue — processing, complete, or both — because that choice moves the number substantially.

  2. 2

    Salesforce Marketing Cloud needs a click to match

    The Subscriber Key, the data extension the journey listens to, and the fields its decision splits reference. An event landing in the wrong data extension will be stored correctly and trigger nothing.

  3. 3

    The identifier is the bridge

    The Subscriber Key, captured at the visit and carried into the Magento order.

  4. 4

    The event source decides reliability

    Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.

  5. 5

    Deduplication at the destination

    Marketing Cloud does not deduplicate journey entries for you. A record inserted twice can enter a journey twice, and because journeys span email, SMS and push the duplicate reaches the customer more than once.

Magento → Marketing Cloud · normal or broken

Working vs. broken, side by side — Magento → Marketing Cloud

Normal, not a fault

  • The Subscriber Key present on the order

  • Sent from the Magento order placement observer

  • Deduplicated correctly

    Marketing Cloud does not deduplicate journey entries for you. A record inserted twice can enter a journey twice, and because journeys span email, SMS and push the duplicate reaches the customer more than once.

  • Reconciles with the source

Actually broken

  • The Subscriber Key missing on most records

    Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one.

  • Sent from the browser

    The page the customer saw is not the page your code assumed. This is the defining Magento tracking failure and it produces intermittent, hard-to-reproduce loss.

  • Counted twice, or not at all

    Marketing Cloud's Subscriber Key and CRM's Contact ID are separate concepts, and Contact Builder's configuration decides whether they relate at all. Getting this wrong does not produce an error — it produces a customer who exists twice, receives everything twice, and appears in reporting as two people.

  • Nobody has reconciled it

Magento → Marketing Cloud · diagnose

Diagnostic order — Magento → Marketing Cloud

  1. 01

    Count orders carrying the Subscriber Key

  2. 02

    Follow one real conversion end to end

  3. 03

    Place a test order as an anonymous visitor through cache

    Not as an admin, which bypasses it. If the order data is missing on the cached path, caching is your cause.

  4. 04

    Confirm what Subscriber Key is actually set to in this org

    Before sending anything. It is a configuration decision made once, often years ago, and every integration built afterwards inherits it.

  5. 05

    Read the match rate, not the success message

    Check the subscriber record and the journey history, not the API response. A successful insert into an unwatched data extension looks identical to a successful one into the right extension.

Magento → Marketing Cloud · prove

How it gets proven — Magento → Marketing Cloud

Source of truth

Magento's sales order records in your own database, for the same window and order status set.

  • The Subscriber Key confirmed present on a live order.
  • Records confirmed on single subscriber records in the correct data extension, with the triggered journey verified in a non-production business unit first.
  • Order data confirmed populated on an order placed through a fully warmed cache.

Magento → Marketing Cloud · free audit

What we check in the free audit

  • Count orders carrying the Subscriber Key
  • Follow one real conversion end to end
  • Place a test order as an anonymous visitor through cache
  • Confirm what Subscriber Key is actually set to in this org
  • Read the match rate, not the success message

Checked against

Magento's sales order records in your own database, for the same window and order status set.

Get my free conversion tracking audit

Free30 minutesNo obligation

Magento → Marketing Cloud · when not to buy

When you don't need this — Magento → Marketing Cloud

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the Subscriber Key.
  • If your Magento build has heavy customisation by another team, scope their availability first — the build is usually blocked there.
  • If you are on Salesforce CRM but sending email through a simpler platform, adding Marketing Cloud brings an identity model to reconcile that you currently do not have to think about.

Magento → Marketing Cloud · what we deliver

What gets built — Magento → Marketing Cloud

  • Identifier capture into Magento

    Capture the identifier and persist it as order data through an observer on order placement, server-side, so it never depends on what the cache served.

  • Event source: the Magento order placement observer

    Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.

  • Dispatch to Marketing Cloud

    A server-side insert into the data extension the journey is configured against, keyed on Subscriber Key.

  • Reversals where they exist

    Credit memos are recorded against the original order and should reduce the reported figure.

Written guarantee

95%+ tracking accuracy

Measured against Magento's sales order records in your own database, for the same window and order status set.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Magento → Marketing Cloud questions, answered

Check the Adobe Commerce Marketplace and Salesforce AppExchange for a current one. Many stores build it instead: the order observer inserts rows into the journey's data extension.

Free · 30 min

Get Magento and Marketing Cloud joined properly

Free30 minutesNo obligation