CRM Sync gap fill: Shopify / Google → Xano
CRM Sync captures consent at the edge, before any tag loads, and writes it to a ledger in Xano, the system of record. Shopify and Google each hold part of the picture; neither holds all of it, and ECC holds none. For each consent gap:
| Gap | Shopify | CRM Sync | Xano | |
|---|---|---|---|---|
| Consent per purpose (analytics, ads, sale / share, email, SMS) | emailMarketingConsent and smsMarketingConsent on the customer (per channel); Customer Privacy API analytics / marketing / preferences / sale_of_data (per visitor). | Consent Mode v2: analytics_storage, ad_storage, ad_user_data, ad_personalization. | The banner writes one ledger row per purpose, never one combined flag. | purposegranted |
| Who decided, how and with which banner | marketingOptInLevel (single / confirmed opt-in); consentCollectedFrom on SMS consent. | The Consent Mode update that was sent, as evidence. | Every row carries source, banner_version, actor and a hash of the raw signal. | sourcebanner_versionactorevidence_sha256 |
| An exact, comparable time | consentUpdatedAt (ISO 8601, UTC). | - | recorded_at in UTC at the edge, plus seq. | recorded_atseq |
| Where consent was given, and under which regime | Customer Privacy API region for the visitor. | Consent Mode defaults set per region. | Region from the edge request and the Sec-GPC header, resolved to a regime before the banner shows. | regionregimegpc |
| Consent before there is a customer | Customer Privacy API consent for an anonymous visitor. | Consent Mode state per browser. | visitor_id on every row; an identity link to the Shopify customer and KUNNR on first order or sign-in. | subject_typevisitor_ididentity_link |
| Consent for one-time customers | The customer created or matched from the checkout email. | - | Subject keyed by email hash and Shopify customer ID; never by a one-time KUNNR. | email_sha256shopify_customer_id |
| Consent for B2B contact persons | B2B company contacts are customers in their own right. | - | subject_type contact, with the company as context. | subject_typecontact_id |
| A withdrawal that sticks | Customer marketing-consent update webhooks. | A Consent Mode update to denied on the page. | Appends a row, then publishes the withdrawal event; nothing overwrites a row. | idempotency_keyrecorded_atseq |
| Data subject requests: access, deletion, opt-out of sale | customers/data_request, customers/redact and shop/redact webhooks; dataSaleOptOut on the customer. | Remove the person from Customer Match lists. | Fans the request out (Shopify, Google, ECC, Xano) and collects a receipt from each. | dsr_requestdsr_receipt |
| Age or minor status | - | - | An age gate where required; unknown stays unknown. | minor |
| Retention per purpose | - | - | Sets expires_at from the regime’s rule when it writes the row. | expires_at |
| Permission to use a person for ads and audiences | marketing and sale_of_data from the Customer Privacy API. | Customer Match uploads carry consent (adUserData, adPersonalization: GRANTED / DENIED) per person. | Exports only subjects whose newest ad_user_data and ad_personalization rows are granted; Merchant Center products carry no personal data. | entitlement |
The Xano consent ledger
Append-only: rows are added, never updated. The newest row per subject and purpose (by recorded_at, then seq) is the current decision.
| Field | Type | Note |
|---|---|---|
id | int | Row ID. |
idempotency_key | text, unique | One per decision; a replay writes nothing. |
subject_type | enum customer / visitor / contact | |
visitor_id | text | Set before there is a customer. |
kunnr | text | KNA1-KUNNR when known; never a one-time account. |
shopify_customer_id | text | gid://shopify/Customer/… |
email_sha256 | text | Normalised e-mail, hashed: a key, not contact data. |
contact_id | text | B2B contact person. |
purpose | enum analytics / ads / ad_user_data / ad_personalization / sale_share / email / sms | |
granted | bool | |
source | enum banner / shopify / dsr / gpc / import | import rows never grant ads purposes. |
| text | ||
actor | text | Who or what wrote it: shopper, agent, support user, job. |
region | text | ISO 3166-2 at decision time. |
regime | enum us_optout / eu_optin / kr_pipa / … | |
gpc | bool | Sec-GPC seen. |
minor | bool, nullable | |
recorded_at | timestamp (UTC) | |
seq | int | Orders events in the same second. |
expires_at | timestamp, nullable | |
evidence_sha256 | text | Hash of the raw signal (banner payload, webhook body). |
Alongside it: identity_link (visitor → Shopify customer → KUNNR), dsr_request and dsr_receipt (one receipt per system a request fans out to), and an entitlement view computed from the newest rows: what a person may be sent, shown or exported to. Entitlements are derived, never uploaded or edited by hand.
Who writes what
| Writer | May write | May not |
|---|---|---|
| CRM Sync banner (edge) | Ledger rows (source banner, gpc) | Anything in ECC |
| Shopify webhooks | Ledger rows (source shopify), DSR requests | Ads purposes from an e-mail opt-in |
| DSR handler | Ledger rows (source dsr), DSR receipts | Delete ledger rows (they are the proof) |
| One-time import (CSV) | Ledger rows (source import) | Ads purposes, or anything newer than an existing row |
| ECC / middleware batch | Nothing: reads the entitlement view | Consent fields, in ECC or Xano |
| Merchant / Google export | Nothing: reads entitlements and products | Personal data into Merchant Center |