Skip to main content
Craft → AttentiveIntegration guide

Connecting Craft CMS to Attentive

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. Attentive is SMS, where the identifier is a phone number, the consent rules are legal rather than advisory, and a mistake reaches the customer's pocket within seconds. The join between them succeeds or fails on one thing: whether the subscriber's phone number reaches the Craft Commerce order before the conversion happens, because Attentive can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Craft Commerce to Attentive: phone numbers the checkout may skip

First check how many Craft Commerce orders carry a phone number. Let Attentive's sign-up unit in the base layout collect subscribers and consent. From the order-complete listener, post purchases to Attentive's events API with the phone normalized to international format, order reference, items and total, only for existing subscribers, checking a sent flag.

Attentive keys everything on a phone number, and plenty of Craft Commerce checkouts never collect one, because the agency built the address form from Craft's address fields and phone was optional or absent. Before any integration work, check what share of completed orders carry a phone number at all. If it is low, Attentive's sign-up unit on the site is your subscriber source and order events will mostly have nobody to land on.

Subscriber capture belongs to Attentive's own sign-up unit, which goes in the base layout template and runs client-side, so static caching does not break it. Order events are server-side: from the order-complete listener, post the purchase to Attentive's events API with the normalized phone number, the order reference, items and total. Craft stores the phone exactly as typed, with spaces and brackets, so normalize it to international format before sending.

A checkout opt-in checkbox built into a Twig template is not consent unless its wording and records meet the SMS rules; leave consent collection to Attentive and send order events only for people Attentive already holds as subscribers. Retries from Craft's queue are the duplicate risk: a failed job that re-runs posts the purchase again, and the customer gets two post-purchase texts. Check a sent flag on the order before posting.

Craft → Attentive · what breaks

Why this join usually fails — Craft → Attentive

  1. 01

    The subscriber's phone number 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

    Consent state treated as a tracking detail rather than a legal one

    Sending an event is not the same as being allowed to message the person it describes. US SMS marketing is governed by express written consent requirements with statutory damages per message, and "the integration sent it" is not a defence. Consent state has to be checked at send time, in Attentive, not inferred from the fact that an event arrived.

  4. 04

    Nothing reconciles afterwards

    Attentive shows the event on the subscriber record and the journey it triggered. Check the subscriber's consent status alongside, because that is the field that decides whether anything should have happened.

Craft → Attentive · the fix

What working looks like — Craft → Attentive

  • The subscriber's phone number on every order

  • Conversions arriving in Attentive

    The event lands on the subscriber, triggers the journeys that depend on it, and becomes available for segmentation.

  • Reconciled against the source

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

Craft → Attentive · architecture

How Craft and Attentive 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

    Attentive needs a click to match

    Attentive needs the subscriber's phone number, the event name and its properties. It also needs the subscriber to have consented — an event about someone who never opted in cannot legally be messaged, whatever the event says.

  3. 3

    The identifier is the bridge

    The subscriber's phone number, 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

    Attentive does not deduplicate for you. A purchase sent twice can trigger a journey twice, and the customer receives two texts. Unlike an email, a duplicate SMS costs you money per send and irritates the recipient measurably more.

Craft → Attentive · normal or broken

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

Normal, not a fault

  • The subscriber's phone number 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

    Attentive does not deduplicate for you. A purchase sent twice can trigger a journey twice, and the customer receives two texts. Unlike an email, a duplicate SMS costs you money per send and irritates the recipient measurably more.

  • Reconciles with the source

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

Actually broken

  • The subscriber's phone number 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

    Sending an event is not the same as being allowed to message the person it describes. US SMS marketing is governed by express written consent requirements with statutory damages per message, and "the integration sent it" is not a defence. Consent state has to be checked at send time, in Attentive, not inferred from the fact that an event arrived.

  • Nobody has reconciled it

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

Craft → Attentive · diagnose

Diagnostic order — Craft → Attentive

  1. 01

    Count orders carrying the subscriber's phone number

  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

    Verify that events for non-consented customers cannot trigger a send

    Check the journey's entry conditions, not the event pipeline. The pipeline will happily deliver an event about someone who never opted in; the journey is what must refuse to act on it.

  5. 05

    Read the match rate, not the success message

    Attentive shows the event on the subscriber record and the journey it triggered. Check the subscriber's consent status alongside, because that is the field that decides whether anything should have happened.

Craft → Attentive · prove

How it gets proven — Craft → Attentive

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 subscriber's phone number confirmed present on a live order.
  • Events confirmed on subscriber records with consent state verified, and a test proving a non-consented profile does not trigger a send.
  • Order custom field confirmed populated on an order placed as an anonymous visitor through cache.

Craft → Attentive · free audit

What we check in the free audit

  • Count orders carrying the subscriber's phone number
  • Follow one real conversion end to end
  • Read how this specific build handles order completion
  • Verify that events for non-consented customers cannot trigger a send
  • 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 → Attentive · when not to buy

When you don't need this — Craft → Attentive

  • If Attentive 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 subscriber's phone number.
  • If the original agency is still engaged, the fastest path is usually specifying the field and having them add the hook.
  • If you do not have a consented SMS list, the integration is the least of the work. Building the list compliantly comes first, and no event pipeline substitutes for it.

Craft → Attentive · what we deliver

What gets built — Craft → Attentive

  • 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 Attentive

    The Attentive events API, posted server-side from your order system with the subscriber's phone number and the 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 → Attentive questions, answered

From a PHP listener on order completion, posting the purchase to Attentive's events API with a normalized phone number and the order reference. Check first that your checkout actually collects phone numbers.

Free · 30 min

Get Craft and Attentive joined properly

Free30 minutesNo obligation