Connecting Drupal Commerce to Attentive
Drupal Commerce is self-hosted commerce inside a CMS built for complex content, which means the store is one part of a much larger site you fully control. 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 Drupal 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
Drupal Commerce to Attentive: add a phone field before anything else
Default Drupal Commerce collects no phone number, so first add a telephone field. Collect SMS consent through Attentive sign-up units or a separate unticked, timestamped checkbox, never from order data. Then send placed orders from the order placement hook to Attentive's events API with phone and line items, once per transition, referenced by order number.
Attentive keys everything on a phone number, and a default Drupal Commerce install does not collect one. The customer profile's address field has no phone line, so stores that want SMS add a telephone field to the customer profile type or the order. Check yours first; an Attentive integration fed from orders that carry no phone number posts events nobody can receive.
Consent is the second gate. A phone number entered for delivery is not permission to text marketing. Collect SMS consent through Attentive's own sign-up units or a separate, unticked checkbox on the Drupal checkout form that you store with a timestamp, and only use the order event to drive messages for people Attentive already holds as subscribed. Do not create subscribers from order data.
Then send the placed order from the order placement hook to Attentive's events API with the phone number and line items, so post-purchase and cross-sell journeys read real products rather than the confirmation page. The common failure is double sends: if a confirmation-page script and the server both post the purchase, or a retried hook posts it again, the customer gets two texts. Use the order number as the reference and send once per state transition, not once per page render.
Drupal Commerce → Attentive · what breaks
Why this join usually fails — Drupal Commerce → Attentive
- 01
The subscriber's phone number never reaches Drupal Commerce
Drupal's internal page cache and any reverse proxy in front of it serve stored renders, so anything relying on dynamically rendered values fails intermittently. Multilingual and multi-site installs add further paths where the capture code may simply not run.
- 02
Configurable workflow states nobody agreed on
Drupal Commerce lets each install define its own order states. Two people reporting on the same store routinely count different states and never reconcile.
- 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.
- 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.
Drupal Commerce → Attentive · the fix
What working looks like — Drupal Commerce → 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
Drupal Commerce → Attentive · architecture
How Drupal Commerce and Attentive actually connect
- 1
Drupal Commerce holds the truth
You own the database, so the truth is exactly as good as the query. Pin down which order states count as revenue before comparing anything — Drupal's workflow states are configurable per install, so no two sites agree by default.
- 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
The identifier is the bridge
The subscriber's phone number, captured at the visit and carried into the Drupal Commerce order.
- 4
The event source decides reliability
Fire server-side from the hook rather than the checkout completion template, which is cacheable and may not execute anything.
- 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.
Drupal Commerce → Attentive · normal or broken
Working vs. broken, side by side — Drupal Commerce → Attentive
Normal, not a fault
The subscriber's phone number present on the order
Sent from the Drupal Commerce order placement hook
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
Actually broken
The subscriber's phone number missing on most records
Drupal's internal page cache and any reverse proxy in front of it serve stored renders, so anything relying on dynamically rendered values fails intermittently. Multilingual and multi-site installs add further paths where the capture code may simply not run.
Sent from the browser
Drupal Commerce lets each install define its own order states. Two people reporting on the same store routinely count different states and never reconcile.
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
Drupal Commerce → Attentive · diagnose
Diagnostic order — Drupal Commerce → Attentive
- 01
Count orders carrying the subscriber's phone number
- 02
Follow one real conversion end to end
- 03
List the order states in use and agree which count as revenue
Do this before any technical work — it resolves more Drupal Commerce disputes than any code change.
- 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.
- 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.
Drupal Commerce → Attentive · prove
How it gets proven — Drupal Commerce → Attentive
Source of truth
Drupal's commerce_order records in your own database, filtered to completed states.
- 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 field data confirmed populated on an order placed through a fully warmed cache as an anonymous visitor.
Drupal Commerce → 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
- List the order states in use and agree which count as revenue
- Verify that events for non-consented customers cannot trigger a send
- Read the match rate, not the success message
Checked against
Drupal's commerce_order records in your own database, filtered to completed states.
Free30 minutesNo obligation
Drupal Commerce → Attentive · when not to buy
When you don't need this — Drupal Commerce → Attentive
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the subscriber's phone number.
- If your Drupal site is content-only with commerce elsewhere, work at the commerce system instead — this is the wrong layer.
- 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.
Drupal Commerce → Attentive · what we deliver
What gets built — Drupal Commerce → Attentive
Identifier capture into Drupal Commerce
Capture the identifier and persist it as order field data through a hook on order placement, server-side, so it never depends on what the cache served.
Event source: the Drupal Commerce order placement hook
Fire server-side from the hook rather than the checkout completion template, which is cacheable and may not execute anything.
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
Order state transitions to refunded or cancelled are recorded and can drive reversals.
Written guarantee
95%+ tracking accuracy
Measured against Drupal's commerce_order records in your own database, filtered to completed states.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Drupal Commerce → Attentive questions, answered
Check Attentive's integration list and drupal.org for a current module; most Drupal stores connect through Attentive's API from the order placement hook. Either way, you need a phone field on the order first.
Not for marketing unless they gave SMS consent separately. Collect it through Attentive's sign-up units or a dedicated checkbox and store when it was given.
Almost always because the subscriber's phone number never reached the Drupal Commerce order. Drupal's internal page cache and any reverse proxy in front of it serve stored renders, so anything relying on dynamically rendered values fails intermittently. Multilingual and multi-site installs add further paths where the capture code may simply not run. Measure coverage before debugging the dispatch.
Attentive resolves to a subscriber by phone number. There is no click identifier and no cookie in the messaging channel at all. The phone number is also regulated personal data under US telemarketing rules, which means the identifier itself carries obligations that a gclid does not.
The Drupal Commerce order placement hook. Fire server-side from the hook rather than the checkout completion template, which is cacheable and may not execute anything.
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.
More on Drupal Commerce → Attentive
- Drupal Commerce → Google AdsConnecting Drupal Commerce to Google Ads
- Drupal Commerce → MetaConnecting Drupal Commerce to Meta Conversions API
- Drupal Commerce → GA4Connecting Drupal Commerce to GA4
RELATED GUIDES
Where Drupal Commerce → Attentive fits in the rest of your tracking
- Statamic → AttentiveConnecting Statamic to Attentive
- Craft → AttentiveConnecting Craft CMS to Attentive
- Concrete CMS → AttentiveConnecting Concrete CMS to Attentive
- Drupal Commerce → IterableConnecting Drupal Commerce to Iterable
- Drupal Commerce → KlaviyoConnecting Drupal Commerce to Klaviyo
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Sitecore → AttentiveConnecting Sitecore to Attentive
- Sanity → AttentiveConnecting Sanity to Attentive
Free · 30 min
Get Drupal Commerce and Attentive joined properly
Free30 minutesNo obligation
