Connecting Drupal Commerce to Snowflake
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. Snowflake's distinguishing feature is that two organisations can join data without either copying it to the other, which turns measurement between partners from a legal negotiation into a query. The join between them succeeds or fails on one thing: whether whatever join key both parties agree on, usually a hashed identifier reaches the Drupal Commerce order before the conversion happens, because Snowflake can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Drupal Commerce to Snowflake: unpack Drupal's field tables
Replicating Drupal Commerce tables into Snowflake is fine, but the first modeled table should flatten commerce_order and its separate field tables into one row per order with state, totals and stored identifiers. Take net revenue from commerce_payment joined to the order, define revenue states in one view, and merge on the Drupal order UUID so retried loads do not duplicate.
Drupal's database is not shaped like an orders table. A commerce_order row holds the base fields, while each configurable field, including any click identifier field you added, lives in its own table named for the entity and field, and adjustments for tax, shipping and promotions sit in their own field storage. Replicating the raw tables into Snowflake is fine, but the first modeled table should flatten them into one row per order with state, totals and stored identifiers.
Pin the state logic in that model. Drupal workflows differ per install, so the definition of a revenue order belongs in one view in Snowflake, not in each analyst's query. Payments are separate entities with their own states, including refunded and partially refunded, so net revenue should come from commerce_payment joined to the order, not from the order total.
Snowflake earns its sharing features when another party needs the data: an agency reconciling ad platform numbers, a retail or affiliate partner checking claims. Share the modeled orders view, hash emails consistently before they leave, and never share the raw user tables. Loads retried after a failure create duplicate rows unless you merge on order UUID, which every Drupal entity carries, so schedule that deduplication step and check it runs.
Drupal Commerce → Snowflake · what breaks
Why this join usually fails — Drupal Commerce → Snowflake
- 01
Whatever join key both parties agree on, usually a hashed identifier 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
A clean room that answers a question nobody agreed on
The technology makes the join possible; it does not make the definitions match. Two organisations measuring the same campaign will disagree about what a conversion is, which window applies and whose attribution model governs — and the query will return a confident number for whichever set of assumptions got written into the SQL.
- 04
Nothing reconciles afterwards
Snowflake will not tell you anything is wrong. Verify by querying against each party's own totals and checking for duplicate rows on the join key before trusting any aggregate.
Drupal Commerce → Snowflake · the fix
What working looks like — Drupal Commerce → Snowflake
Whatever join key both parties agree on, usually a hashed identifier on every order
Conversions arriving in Snowflake
The row lands in a table you own, joinable to your own data and — through a share or clean room — to a partner's, without either party moving raw records.
Reconciled against the source
Drupal Commerce → Snowflake · architecture
How Drupal Commerce and Snowflake 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
Snowflake needs a click to match
A schema both sides agree on, consistent types, and identifiers normalised identically before hashing. The failure mode is not rejection but silent divergence — a timestamp in the wrong zone or a trimmed-versus-untrimmed email produces answers that look plausible.
- 3
The identifier is the bridge
Whatever join key both parties agree on, usually a hashed identifier, 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
Nothing deduplicates for you. Loads are at-least-once, so a retried pipeline creates duplicate rows and the only protection is a deduplication step you write and actually schedule.
Drupal Commerce → Snowflake · normal or broken
Working vs. broken, side by side — Drupal Commerce → Snowflake
Normal, not a fault
Whatever join key both parties agree on, usually a hashed identifier present on the order
Sent from the Drupal Commerce order placement hook
Deduplicated correctly
Nothing deduplicates for you. Loads are at-least-once, so a retried pipeline creates duplicate rows and the only protection is a deduplication step you write and actually schedule.
Reconciles with the source
Actually broken
Whatever join key both parties agree on, usually a hashed identifier 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
The technology makes the join possible; it does not make the definitions match. Two organisations measuring the same campaign will disagree about what a conversion is, which window applies and whose attribution model governs — and the query will return a confident number for whichever set of assumptions got written into the SQL.
Nobody has reconciled it
Drupal Commerce → Snowflake · diagnose
Diagnostic order — Drupal Commerce → Snowflake
- 01
Count orders carrying whatever join key both parties agree on, usually a hashed identifier
- 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
Write down both parties' conversion definitions before writing any query
Definition mismatch, not technology, is what makes most partner measurement projects produce numbers neither side trusts.
- 05
Read the match rate, not the success message
Snowflake will not tell you anything is wrong. Verify by querying against each party's own totals and checking for duplicate rows on the join key before trusting any aggregate.
Drupal Commerce → Snowflake · prove
How it gets proven — Drupal Commerce → Snowflake
Source of truth
Drupal's commerce_order records in your own database, filtered to completed states.
- Whatever join key both parties agree on, usually a hashed identifier confirmed present on a live order.
- Row counts and revenue reconciled against each source system for a closed window, with duplicates checked on the join key and both definitions documented.
- Order field data confirmed populated on an order placed through a fully warmed cache as an anonymous visitor.
Drupal Commerce → Snowflake · free audit
What we check in the free audit
- Count orders carrying whatever join key both parties agree on, usually a hashed identifier
- Follow one real conversion end to end
- List the order states in use and agree which count as revenue
- Write down both parties' conversion definitions before writing any query
- 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 → Snowflake · when not to buy
When you don't need this — Drupal Commerce → Snowflake
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry whatever join key both parties agree on, usually a hashed identifier.
- If your Drupal site is content-only with commerce elsewhere, work at the commerce system instead — this is the wrong layer.
- If you have no partner to share data with and one cloud, a warehouse you already run does the same job. The sharing capability is what justifies this one.
Drupal Commerce → Snowflake · what we deliver
What gets built — Drupal Commerce → Snowflake
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 Snowflake
Batch or streaming loads from your order system, with the raw event retained alongside anything you derive from it.
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 → Snowflake questions, answered
Replicate the order, order item, payment and field tables, then build one flattened orders model with a single agreed definition of revenue states.
On payment entities, which have their own refunded and partially refunded states. Join payments to orders to get net revenue.
Almost always because whatever join key both parties agree on, usually a hashed identifier 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.
There is no vendor identifier. In a data share or clean room the key is negotiated: hashed email, order ID, a partner-supplied ID. Normalisation before hashing is the entire match rate, and a formatting difference between two organisations looks exactly like a poor-performing partnership.
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.
Snowflake will not tell you anything is wrong. Verify by querying against each party's own totals and checking for duplicate rows on the join key before trusting any aggregate.
More on Drupal Commerce → Snowflake
- 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 → Snowflake fits in the rest of your tracking
- Sitecore → SnowflakeConnecting Sitecore to Snowflake
- Sanity → SnowflakeConnecting Sanity to Snowflake
- Contentful → SnowflakeConnecting Contentful to Snowflake
- Drupal Commerce → BigQueryConnecting Drupal Commerce to BigQuery
- Drupal Commerce → SegmentConnecting Drupal Commerce to Segment
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Craft → SnowflakeConnecting Craft CMS to Snowflake
- Webflow → SnowflakeConnecting Webflow to Snowflake
Free · 30 min
Get Drupal Commerce and Snowflake joined properly
Free30 minutesNo obligation
