Skip to main content
Medusa → Marketing CloudIntegration guide

Connecting Medusa to Salesforce Marketing Cloud

Medusa is a Node commerce engine you extend in your own codebase, which makes the conversion event a piece of application code — and therefore something that can be tested rather than hoped for. 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 Medusa 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

Medusa to Marketing Cloud: Subscriber Key and guest checkouts

Decide Subscriber Key first; with guest checkouts, email is usually practical. On payment capture, insert a row into the post-purchase data extension with order ID, total, currency and product handles, plus the opt-in captured in metadata. Leave confirmations with Medusa's notification provider, and insert refund rows so journeys stop.

Decide what Subscriber Key means before any Medusa data moves. If it is set to the Medusa customer ID, every guest checkout arrives with no key at all; if it is set to email, a customer who changes their email in the storefront account becomes a second subscriber. Most Medusa stores take guest orders, so email is the practical key, but confirm what your Marketing Cloud org already uses, because Salesforce CRM records may have set it years ago.

The dispatch is a subscriber on payment capture that inserts one row into the data extension your post-purchase journey watches, keyed on Subscriber Key, with order ID, total, currency and the product handles the journey's splits reference. Marketing consent is not a Medusa core field, so capture the opt-in at checkout into customer or order metadata and pass it through; the journey must check it before sending anything promotional.

Watch for duplicate messaging. Medusa stores often already send order confirmations through a notification provider module. If Marketing Cloud also sends a confirmation from the same insert, customers get two receipts. Leave transactional mail where it is and use Marketing Cloud for the review request, cross-sell and replenishment journeys, and insert refund rows so those journeys stop for orders that came back.

Medusa → Marketing Cloud · what breaks

Why this join usually fails — Medusa → Marketing Cloud

  1. 01

    The Subscriber Key never reaches Medusa

    The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created.

  2. 02

    Firing on order placed rather than payment captured

    They are different events and the gap between them contains every failed and pending payment. Order-placed is the easier hook and the wrong one.

  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.

Medusa → Marketing Cloud · the fix

What working looks like — Medusa → 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

Medusa → Marketing Cloud · architecture

How Medusa and Marketing Cloud actually connect

  1. 1

    Medusa holds the truth

    Because you own the event handlers, the conversion can fire from the payment-captured event specifically rather than from whatever the frontend happened to render.

  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 Medusa order.

  4. 4

    The event source decides reliability

    Send orders at payment capture, at the paid total.

  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.

Medusa → Marketing Cloud · normal or broken

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

Normal, not a fault

  • The Subscriber Key present on the order

  • Sent from a Medusa subscriber on order payment capture

  • 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

    The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created.

  • Sent from the browser

    They are different events and the gap between them contains every failed and pending payment. Order-placed is the easier hook and the wrong one.

  • 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

Medusa → Marketing Cloud · diagnose

Diagnostic order — Medusa → Marketing Cloud

  1. 01

    Count orders carrying the Subscriber Key

  2. 02

    Follow one real conversion end to end

  3. 03

    Check which event your subscriber listens to

    One line of code, and it decides whether you are counting orders or counting money.

  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.

Medusa → Marketing Cloud · prove

How it gets proven — Medusa → Marketing Cloud

Source of truth

Medusa orders by payment status, emitted from your own subscriber code.

  • 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.
  • Payment-captured orders reconciled against imported conversions.

Medusa → Marketing Cloud · free audit

What we check in the free audit

  • Count orders carrying the Subscriber Key
  • Follow one real conversion end to end
  • Check which event your subscriber listens to
  • Confirm what Subscriber Key is actually set to in this org
  • Read the match rate, not the success message

Checked against

Medusa orders by payment status, emitted from your own subscriber code.

Get my free conversion tracking audit

Free30 minutesNo obligation

Medusa → Marketing Cloud · when not to buy

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

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the Subscriber Key.
  • If every payment method you accept is instant, the two events nearly coincide and the distinction costs more than it returns.
  • 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.

Medusa → Marketing Cloud · what we deliver

What gets built — Medusa → Marketing Cloud

  • Identifier capture into Medusa

    Write the identifier into cart metadata at first touch so it is carried onto the order automatically at completion.

  • Event source: a Medusa subscriber on order payment capture

    Send orders at payment capture, at the paid total.

  • 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

    Refunds emit their own event and should reverse.

Written guarantee

95%+ tracking accuracy

Measured against Medusa orders by payment status, emitted from your own subscriber code.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Medusa → Marketing Cloud questions, answered

Usually the normalized email, because guest checkouts have no customer ID. Check what your org already uses before choosing.

Free · 30 min

Get Medusa and Marketing Cloud joined properly

Free30 minutesNo obligation