The scenario
Example Airways (fictional) runs a frequent flyer program with about nine million members in three status tiers. Members earn miles on the airline's flights and from partners such as a co-brand credit card, hotels and car rental, and spend them on award flights, upgrades and partner rewards. About 500,000 flight segments a day generate earning, and about 4,000 members a day claim miles they believe are missing. Contact centre agents answer questions about status and expiry from a large and changing rulebook, and fraud teams chase account takeover and award fraud after the loss.
The goal is a loyalty platform that credits the right miles faster, answers member questions from the program rules, stops fraud earlier without locking out genuine members, and makes offers only to members who have agreed to hear from the airline. Miles are a financial liability on the airline's books and a promise to the member, so a person decides anything outside the rules.
Everything here is fictional and illustrative: the airline, members, flights, balances, tolerances, thresholds and targets are invented. Vendor product names are real; code and configuration are sketches that show the shape of an integration. Check endpoints, parameter names and feature availability against each vendor's current documentation before you build.
Architecture
Earning, tiers, expiry and redemption pricing are deterministic: rules with tests, owned by the program office. Models read documents, explain rules from the program terms, draft messages and score risk. A person decides goodwill credits, fraud holds and anything the rules do not cover.
One missing-miles claim, with what happens behind it
A member claims miles with a photographed boarding pass. The right-hand column is what the platform does.
| Step | What happens | Behind the scenes |
|---|---|---|
| Claim | A Gold member flew JFK to LHR on 12 October and claims the missing miles. They photograph the boarding pass in the app. | The claim arrives with an image and the member's account. The image is scanned before a model reads it. |
| Extract | The assistant reads flight number, date, seat, booking class H and the ticket number from the boarding pass. | Document AI returns fields as JSON (JavaScript Object Notation) that must validate against the claim schema, with a confidence per field. |
| Verify | The flight is confirmed as flown by this member, in booking class H, and no other account has been credited. | Tool calls through the gateway read flight operations, the ticket record and the ledger. Facts come from systems, not the model. |
| Calculate | The earn engine applies the program rules: 3,451 base miles, a 50% Gold bonus, 5,177 miles in all and 3,451 qualifying miles. | A deterministic rules service computes the miles. The model never states a number the engine did not produce. |
| Decide | The credit is under the 10,000-mile limit for automatic credit, so the rules approve it. | Basis recorded as rule. Anything above the limit, or any mismatch, would go to a person. |
| Post | The miles post to the ledger and the member receives a short message, sent only because their preferences allow service messages. | Posting uses an idempotency key. The consent service is checked before the message is sent. |
| Learn | The claim, the evidence and the decision are stored for audit and, with names and numbers masked, join the evaluation set. | Full trace under one identifier. Corrections by agents become new test cases. |
The parts, and where each is covered
Earn and claims
Deterministic earning, with a claims agent that gathers evidence for missing miles and a rules engine that decides the credit.
Service copilot
Answers agents' and members' questions from the program terms, with citations, and never changes a balance.
Fraud protection
Scores logins and redemptions, steps up verification and places reviewable holds, rather than closing accounts.
Offers and consent
Decides who may receive which offer within budgets and fairness limits, and checks consent before anything is sent.
Platform
The AI gateway, tool gateway, lakehouse, security scanning and telemetry shared by every agent.
Assurance
Threat model, evaluation plan, governance and runbooks that make it safe to run on a financial liability.
Design and delivery documents
The documents an architecture review, a security review, a finance review and an operations team would ask for, each written for this platform.
- Business user stories: Personas, epics, acceptance criteria and a release plan.
- Architecture decisions: The eleven decisions behind the shape of the platform.
- Sequence diagrams: Missing miles, partner files, redemption with fraud checks, offers, account takeover and the service copilot.
- Diagram gallery: The pertinent diagrams in one place.
- Data model and classification: Entities, classification and retention, with travel history as restricted data.
- Tool and API (Application Programming Interface) contracts: The tool catalogue, OpenAPI and MCP (Model Context Protocol) definitions.
- Integration map: Ledger, reservations, flight operations, partners, consent and messaging.
- Non-functional requirements: Performance, availability, peak sale load and recovery.
- Threat model: Account takeover, award fraud, forged claims and consent breaches.
- Evaluation plan: Datasets, metrics, fairness checks and release thresholds.
- Responsible AI and governance: Oversight, consent, fairness and liability accounting.
- Cost and FinOps model: Cost per claim, case and scored event.
- Rollout and operating model: Phases, gates and responsibilities.
- Agile delivery plan: Two-week sprints, roadmap and capacity.
- Runbooks and incident playbooks: Miscredited miles, account takeover waves and consent breaches.
- References and further reading: Standards, documentation and papers.
Requirements and targets
These are the requirements the design was built against. The targets are planning figures for this demo, not measured results.
| Area | Requirement | Illustrative target |
|---|---|---|
| Earning accuracy | Miles and status credit computed by the rules, never by a model | Zero ledger postings without a rule or an approval |
| Claims | Missing-miles claims verified against flight and ticket data | At least 80% of claims resolved without a person |
| Speed | Time from claim to credit | Median under one hour for rule-approved claims |
| Member service | Rule answers cite the program terms | Every rule answer carries a citation, or says none was found |
| Fraud | Risky logins and redemptions stepped up or held, not closed | Stolen-miles losses down by half; wrongful holds under 0.5% |
| Offers | Eligibility, budget, frequency and consent checked before any send | 100% of sends carry a valid consent check |
| Fairness | Offer allocation reviewed for unjustified disparity | Quarterly review with no unexplained gap above tolerance |
| Security | Documents, messages and tool traffic scanned | Scan on 100% of model and tool traffic |
| Privacy | Travel history and identity data minimised and masked | No raw travel history in analytics tables |
| Audit | Every credit, hold and send traceable | Complete trace for 100% of ledger changes |
Suggested reading order
Business user stories
Start with who the platform serves and what each of them needs.
ADRs (Architecture Decision Records)
Read the decisions that set the shape of the platform.
Sequence diagrams
Follow the key flows step by step across the components.
Diagram gallery
See the most pertinent diagrams from every page in one place.
Design documents
Data model, tool contracts, integration map and non-functional requirements.
AI gateway
See how developers reach models through one governed front door.
Databricks
See where data, features, knowledge, serving and evaluation live.
Prisma AIRS
See how every document, message and tool call is scanned.
Foundry
See the platform on Microsoft's agent platform.
LangSmith
See the platform on LangGraph with tracing and evaluation.
Telemetry
See how every unit of work is traced and measured, with queries operators use.
Assurance
Threat model, evaluation plan and governance: how it is shown to be safe and fair.
Delivery
Cost model, rollout, agile plan and runbooks for running it.
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