Skip to main content
Craft → BrazeIntegration guide

Connecting Craft CMS to Braze

Craft is a developer-oriented CMS, usually built bespoke by an agency, which means the implementation is whatever that agency decided and nothing is standard. Braze is mobile-first lifecycle messaging, which means it resolves to a user rather than to a click and its most valuable channels — push and in-app — exist nowhere near a browser. The join between them succeeds or fails on one thing: whether the Braze external user ID reaches the Craft Commerce order before the conversion happens, because Braze can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Craft Commerce to Braze: external_id when guests check out

Use the Craft user UID as Braze's external_id, not email or database ID, confirming how your Commerce version stores guests. Post purchases from the order-complete listener to Braze's user track endpoint with that ID, order reference and line items, choosing one purchase source. Give each Craft environment its own Braze workspace or no key.

Braze needs a stable external_id, and the obvious candidate on a Craft build is the Craft user's UID. That works for account holders, but many Commerce stores allow guest checkout. In recent Commerce versions customers are stored as user elements even when they never set a password, so a guest still has a UID; confirm how your version and build behave, because older builds handled guests differently.

Pick one rule and use it in every system: the user UID, not the email (which customers change) and not the database ID (which can differ between environments). Post purchases from the order-complete listener to Braze's user track endpoint with that ID, the order reference and line items. If the brand's app also logs purchases through the Braze SDK, decide which source owns the purchase event; doing both sends two push notifications.

Craft's multi-environment setup is the other hazard. Staging sites built from a production database copy hold real customer emails and user UIDs. If the staging .env carries production Braze keys, a test order on staging writes to a real customer's profile and can trigger a real push to their phone. Give each environment its own Braze workspace, or no key at all.

Craft → Braze · what breaks

Why this join usually fails — Craft → Braze

  1. 01

    The Braze external user ID never reaches Craft

    Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look.

  2. 02

    Every install is bespoke

    There is no standard Craft setup, so an approach that worked on another Craft site may have nothing to attach to on this one. Read the build before quoting.

  3. 03

    Duplicate events sending duplicate push notifications

    A duplicate here is visible to your customer on their lock screen, twice, and the second one is the reason they turn push off permanently. This is a more expensive mistake than a double-counted conversion in an ad platform, because the damage is not recoverable.

  4. 04

    Nothing reconciles afterwards

    Braze shows events on the user profile within moments. Check the profile, not the API response, and specifically check whether an anonymous device profile has been created alongside the real one.

Craft → Braze · the fix

What working looks like — Craft → Braze

  • The Braze external user ID on every order

  • Conversions arriving in Braze

    The event lands on the user profile, triggers whatever campaigns depend on it, and becomes available for segmentation across push, email and in-app.

  • Reconciled against the source

    Craft CMS's own records are the reference, not either dashboard.

Craft → Braze · architecture

How Craft and Braze actually connect

  1. 1

    Craft CMS holds the truth

    Craft installs are bespoke by nature. Establish how this particular build models a completed order before assuming anything transfers from another Craft site.

  2. 2

    Braze needs a click to match

    Braze needs the external user ID and a well-named event with its properties. An event with no external ID lands on an anonymous device profile that may never merge with the real user.

  3. 3

    The identifier is the bridge

    The Braze external user ID, captured at the visit and carried into the Craft Commerce order.

  4. 4

    The event source decides reliability

    Fire from the event listener in PHP rather than a Twig template, which may be cached.

  5. 5

    Deduplication at the destination

    Braze does not deduplicate for you. A purchase sent from both your app SDK and your server produces two events, two campaign triggers and potentially two push notifications to a customer who bought once.

Craft → Braze · normal or broken

Working vs. broken, side by side — Craft → Braze

Normal, not a fault

  • The Braze external user ID present on the order

    Visible on the record itself in Craft CMS, not merely captured somewhere on the site.

  • Sent from the Craft Commerce order-complete event

  • Deduplicated correctly

    Braze does not deduplicate for you. A purchase sent from both your app SDK and your server produces two events, two campaign triggers and potentially two push notifications to a customer who bought once.

  • Reconciles with the source

    Braze's count and Craft CMS's records agree within a few percent over a closed window.

Actually broken

  • The Braze external user ID missing on most records

    Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look.

  • Sent from the browser

    There is no standard Craft setup, so an approach that worked on another Craft site may have nothing to attach to on this one. Read the build before quoting.

  • Counted twice, or not at all

    A duplicate here is visible to your customer on their lock screen, twice, and the second one is the reason they turn push off permanently. This is a more expensive mistake than a double-counted conversion in an ad platform, because the damage is not recoverable.

  • Nobody has reconciled it

    The dashboard shows a number and no one has compared it to Craft CMS.

Craft → Braze · diagnose

Diagnostic order — Craft → Braze

  1. 01

    Count orders carrying the Braze external user ID

  2. 02

    Follow one real conversion end to end

  3. 03

    Read how this specific build handles order completion

    Assumptions carried from another Craft project are the main source of wasted time here.

  4. 04

    Send a test purchase and read the user profile's event stream

    One event or two? Check whether the SDK is already sending the same event before adding a server source, and check that the external ID matches the signed-in user rather than creating a new profile.

  5. 05

    Read the match rate, not the success message

    Braze shows events on the user profile within moments. Check the profile, not the API response, and specifically check whether an anonymous device profile has been created alongside the real one.

Craft → Braze · prove

How it gets proven — Craft → Braze

Against Craft CMS's own records, not against either platform's dashboard.

Source of truth

Craft Commerce's order records in your own database, filtered to completed.

  • The Braze external user ID confirmed present on a live order.
  • The user profile confirmed to show one event per conversion, with device and user profiles correctly merged.
  • Order custom field confirmed populated on an order placed as an anonymous visitor through cache.

Craft → Braze · free audit

What we check in the free audit

  • Count orders carrying the Braze external user ID
  • Follow one real conversion end to end
  • Read how this specific build handles order completion
  • Send a test purchase and read the user profile's event stream
  • Read the match rate, not the success message

Checked against

Craft Commerce's order records in your own database, filtered to completed.

Get my free conversion tracking audit

Free30 minutesNo obligation

Craft → Braze · when not to buy

When you don't need this — Craft → Braze

  • If Braze already reports conversions that reconcile against Craft CMS's records within a few percent, this join is working and there is nothing to buy.
  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the Braze external user ID.
  • If the original agency is still engaged, the fastest path is usually specifying the field and having them add the hook.
  • If you have no mobile app and no push channel, Braze is a large piece of infrastructure for a job an email platform already does.

Craft → Braze · what we deliver

What gets built — Craft → Braze

  • Identifier capture into Craft

    Capture the identifier and store it as a custom field on the order through a Craft event listener, server-side.

  • Event source: the Craft Commerce order-complete event

    Fire from the event listener in PHP rather than a Twig template, which may be cached.

  • Dispatch to Braze

    The Braze user track endpoint, posted server-side from your order or billing system with the external user ID and event properties.

  • Reversals where they exist

    Refunds and cancelled orders are recorded against the order.

Written guarantee

95%+ tracking accuracy

Measured against Craft Commerce's order records in your own database, filtered to completed.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Craft → Braze questions, answered

The Craft user UID, applied consistently in the app, the website and server-side events. Avoid emails and environment-specific database IDs.

Free · 30 min

Get Craft and Braze joined properly

Free30 minutesNo obligation