Purpose and scope
This is the logical data model for the loyalty 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-006 concrete. The points ledger and member master stay the systems of record; the platform keeps decisions, evidence, features and copies it needs to explain a credit or a hold.
Core entities
| Entity | Key fields | Owner | Notes |
|---|---|---|---|
| Member | member_id, name, contacts, identity document reference | Member master | Platform holds a reference and masked copies |
| Account | balance, tier, status, holds | Points ledger | Balance is changed only through ledger entries |
| Ledger entry | type, miles, qualifying, source, basis, rule version, approver | Points ledger | Append-only; reversals are new entries |
| Flight segment | segment id, date, route, class, flown flag | Flight operations | Reveals movements, so restricted |
| Partner transaction | batch id, partner, amount, member identifier | Partner intake | Matched on identifiers, then masked |
| Claim | member, evidence pointers, extracted fields, decision, basis | Claims | Evidence is pointers, not copies |
| Redemption | award, miles, price rule, step-up result | Redemption service | Price from rules only |
| Offer | rules, budget, template, send log | Marketing | Send log includes the consent result |
| Consent | channel, purpose, timestamp, source, withdrawal | Consent service | System of record for permission |
| Fraud case | scores, factors, hold, reviewer, outcome | Fraud team | Holds expire and are reviewed |
| 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, masked by role and kept for the shortest time.
| Data | Class | In prompts | In logs and traces | In analytics | Retention |
|---|---|---|---|---|---|
| Flight and travel history | Restricted | Only the segment under review | Never | Masked by role | 7 years for finance, then anonymised |
| Identity documents, dates of birth | Restricted | Never | Never | Masked by role | Life of the account plus legal period |
| Contacts: email, phone, address | Restricted | Only when a draft needs them | Never | Masked by role | Life of the account |
| Payment tokens | Restricted | Never | Never | Not held | Per payment provider |
| Raw claim images and emails | Restricted | Extracted text for the item only | Never | Pointer only | 90 days, then deleted |
| Consent records | Confidential | No | Outcome only | Yes, masked ids | Life of the account plus legal period |
| Balances, ledger entries, tiers | Confidential | Summary for the step | Aggregates only | Yes, masked ids | 7 years |
| Program terms and rules | 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 ledger table in the silver layer shows how the model becomes columns, with identity masked and the basis, rule version and approver recorded for every change.
-- Silver layer: ledger entries, with identity masked and the basis recorded for every change
CREATE TABLE loyalty_prod.silver.ledger_entries (
entry_id STRING NOT NULL,
member_id STRING NOT NULL, -- SENSITIVE: masked except for approved roles
entry_type STRING NOT NULL, -- earn | burn | adjust | expire | reverse
miles BIGINT NOT NULL,
qualifying BIGINT, -- tier-qualifying miles, if any
source STRING NOT NULL, -- flight | partner | claim | goodwill | redemption
source_ref STRING, -- segment id or partner batch, not personal data
basis STRING NOT NULL, -- rule | approved_by_person | goodwill_approved
rule_version STRING,
approver_id STRING,
idempotency_key STRING NOT NULL,
created_at TIMESTAMP NOT NULL
) USING DELTA
TBLPROPERTIES ('delta.enableChangeDataFeed' = 'true');Where data moves
| From | To | What | Control |
|---|---|---|---|
| App, web and contact centre | Platform | Claims, images, questions | Authentication, scan, tokenise identifiers |
| Platform | AI (artificial intelligence) gateway and models | Only the fields a step needs | Minimise, scan, no provider retention |
| Platform | Tool gateway and ledger | Structured arguments | Scopes, basis and approval check, audit |
| Platform | Collector | Spans, metrics and events with identifiers | Sensitive attributes dropped or hashed |
| Collector | Lakehouse | Telemetry and masked copies | Unity Catalog masks, row filters |
| Lakehouse | Models and evaluation | Masked features and cases | Role-based access, no raw documents |
Deletion, correction and access
Find
Every record carries the member identifier or its hash, so all copies can be found, including masked and derived ones.
Delete or anonymise
Raw documents, contacts and identity data are deleted. Ledger and finance records are kept for the legal period and anonymised after it.
Propagate
Deletion events reach the lakehouse tables, feature tables, the terms index sources, evaluation sets and training data.
Prove
The audit record shows what was deleted, when and by whom, without the deleted content.
Retention periods are illustrative. Set them with legal counsel for each jurisdiction.
Build this for your business
This example is a loyalty platform for an airline, but the same pattern, deterministic financial rules, a governed gateway, runtime security, consent-aware personalisation and measured quality, fits any program that holds a customer balance and makes offers. We can scope a pilot on your own systems.
Book a discovery call