Purpose and scope
This is the logical data model for the platform: the entities it creates, what each holds, who may see it and how long it is kept. It makes the privacy decisions in ADR-004, ADR-005 and ADR-010 concrete. The loyalty and payment systems stay the systems of record; the platform keeps consents, templates, gate events and anonymous aggregates. Face images are never kept.
Core entities
| Entity | Key fields | Owner | Notes |
|---|---|---|---|
| Member | opaque id, app link | Loyalty platform | Platform holds an opaque id only |
| Consent | purpose, scope, date, status | Privacy office | One per purpose; withdrawable; the root of every other record |
| Face template | encrypted vector, key id, consent id | Template vault | Never leaves the vault in clear; deleted with the consent |
| Liveness result | pass or fail, model version | Enrolment service | No image kept |
| Store and zone | store id, zones, opt-in flag, signage | Store operations | Only opt-in zones allow matching |
| Edge device | gate version, health, last self-check | Security | A failed self-check stops recognition |
| Count record | zone, time slice, count | Analytics | Suppressed below a minimum group size |
| Match proposal | score band, outcome, zone | Platform | No face data; score banded |
| Confirmation | second factor, time | Payments | Required for any action |
| Rights request | type, due date, outcome | Privacy office | Handled by a person |
| Deletion event | scope, done at, reconciled | Platform | Evidence of deletion |
| Audit record | event, actor, tool, args hash, outcome, trace_id | Platform | Append-only |
Classification matrix
Four classes drive every control. Restricted data is limited to what a step needs, encrypted, masked by role and kept only as long as consent lasts.
| Data | Class | In prompts | In logs and traces | In analytics | Retention |
|---|---|---|---|---|---|
| Face images and video frames | Restricted | Never | Never | Never | Not kept; discarded in memory |
| Face templates | Restricted | Never | Never | Never | Until withdrawal or 24 months inactive |
| Consent records | Restricted | Structured status only | Ids and status | Masked ids | Life of the consent plus the legal period |
| Member identity and payment data | Restricted | Never | Never | Masked by role | Per loyalty and payment rules |
| Match proposals and confirmations | Confidential | Counts only | Ids and banded scores | Pseudonymised | 30 days |
| Anonymous counts and dwell | Internal | Yes, aggregates | Yes | Yes | Per business need |
| Edge device health | Internal | No | Yes | Yes | 13 months |
| Rights requests | Restricted | Structured facts for the draft | Ids only | Masked | Legal period |
| Protocols and notices | Internal | Yes, as cited clauses | Yes | Yes | Versioned, kept |
| Trace and security events | Internal | No | Yes, no content | Yes | 13 months |
A table, as built
The template register in the silver layer shows how the consent rule becomes columns: every template references an active consent, and deletion is tracked in the vault, the caches and the backups.
-- Silver layer: template register reconciliation, with no images and no names
CREATE TABLE retail_prod.silver.template_register (
template_id STRING NOT NULL, -- opaque id, not the member id
consent_id STRING NOT NULL, -- must reference an active consent
purpose STRING NOT NULL, -- checkout | greeting
created_at TIMESTAMP NOT NULL,
consent_status STRING NOT NULL, -- active | withdrawn | expired
deleted_at TIMESTAMP,
vault_deleted BOOLEAN,
cache_purged BOOLEAN,
backup_expired BOOLEAN,
status STRING NOT NULL -- ok | pending_delete | orphan | incident
) USING DELTA
TBLPROPERTIES ('delta.enableChangeDataFeed' = 'true');Where data moves
| From | To | What | Control |
|---|---|---|---|
| Camera | Edge appliance | Frames | In memory only; never written to disk |
| Edge appliance | Matcher | A frame, only if the gate allows | Gate checks zone, consent and purpose |
| Edge appliance | Store analytics | Counts per zone and slice | Suppression below a minimum group size |
| App | Consent register | Consents and withdrawals | Authenticated; separate per purpose |
| Platform | AI (artificial intelligence) gateway and models | Structured facts for documentation only | No images or templates; scan; no provider retention |
| Platform | Retail gateway | Structured arguments | Scopes, signed approvals, audit |
| Collector | Lakehouse | Telemetry and aggregates | Identifiers dropped or hashed; masks |
Withdrawal, correction and access
Find
Every record carries the opaque consent id, so all copies can be found, including caches and backups.
Delete
Withdrawal deletes the template and its key, purges edge caches and lets backups expire within the stated time.
Propagate
Deletion events reach the register, the lakehouse tables and evaluation sets.
Prove
The audit record shows what was deleted, when and by whom, without the deleted content.
Retention periods are set by law and differ by country. Set them with counsel. The figures here are placeholders.
Build this for your business
This example is speculative and not a recommendation to deploy, but the same pattern, consent first, a deterministic privacy gate, a governed gateway, runtime security, advisory-only AI and measured fairness, fits any service that handles sensitive personal data. We can scope a pilot on your own systems.
Book a discovery call