Loyalty · 01 / 26

Loyalty: A Frequent Flyer Program Platform

A complete, generic AI (artificial intelligence) platform for a frequent flyer program: missing-miles claims, member service, fraud protection and consent-aware offers, with architecture, AI gateway, Databricks, Prisma AIRS, Microsoft Foundry and LangSmith, end to end.

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

Architecture of the loyalty platform Flights and partner transactions feed a deterministic earn engine that applies earning, tier and expiry rules and posts to the points ledger. A claims agent resolves missing-miles claims with evidence and a service copilot answers questions from the program terms; both hand unclear cases to the review desk. Fraud scoring steps up or holds risky logins and redemptions, and offer decisioning checks eligibility and budgets and always consults the consent service. Model calls pass through an AI gateway and enterprise systems through a tool gateway. Traces and evaluations land in the lakehouse. EARN Flights and partners segments · cards · hotels Earn engine miles · tiers · expiry rules Points ledger balances · history CLAIMS AND SERVICE Claims agent documents + tools Service copilot program terms (RAG) Review desk agents · analysts PROTECT AND GROW Fraud scoring step-up · holds Offer decisioning eligibility · budgets Consent service preferences · limits PLATFORM AI gateway scans · routing · budgets Tool gateway (MCP) scopes · policy · audit Lakehouse traces · evals · UC post credit hold check deterministic service gateway or engine agent human decision
Four layers: earn, claims and service, protect and grow, and the shared platform. Models and enterprise systems are reached only through the two gateways.

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.

StepWhat happensBehind the scenes
ClaimA 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.
ExtractThe 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.
VerifyThe 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.
CalculateThe 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.
DecideThe 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.
PostThe 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.
LearnThe 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.

Requirements and targets

These are the requirements the design was built against. The targets are planning figures for this demo, not measured results.

AreaRequirementIllustrative target
Earning accuracyMiles and status credit computed by the rules, never by a modelZero ledger postings without a rule or an approval
ClaimsMissing-miles claims verified against flight and ticket dataAt least 80% of claims resolved without a person
SpeedTime from claim to creditMedian under one hour for rule-approved claims
Member serviceRule answers cite the program termsEvery rule answer carries a citation, or says none was found
FraudRisky logins and redemptions stepped up or held, not closedStolen-miles losses down by half; wrongful holds under 0.5%
OffersEligibility, budget, frequency and consent checked before any send100% of sends carry a valid consent check
FairnessOffer allocation reviewed for unjustified disparityQuarterly review with no unexplained gap above tolerance
SecurityDocuments, messages and tool traffic scannedScan on 100% of model and tool traffic
PrivacyTravel history and identity data minimised and maskedNo raw travel history in analytics tables
AuditEvery credit, hold and send traceableComplete trace for 100% of ledger changes

Suggested reading order

  1. Business user stories

    Start with who the platform serves and what each of them needs.

  2. ADRs (Architecture Decision Records)

    Read the decisions that set the shape of the platform.

  3. Sequence diagrams

    Follow the key flows step by step across the components.

  4. Diagram gallery

    See the most pertinent diagrams from every page in one place.

  5. Design documents

    Data model, tool contracts, integration map and non-functional requirements.

  6. AI gateway

    See how developers reach models through one governed front door.

  7. Databricks

    See where data, features, knowledge, serving and evaluation live.

  8. Prisma AIRS

    See how every document, message and tool call is scanned.

  9. Foundry

    See the platform on Microsoft's agent platform.

  10. LangSmith

    See the platform on LangGraph with tracing and evaluation.

  11. Telemetry

    See how every unit of work is traced and measured, with queries operators use.

  12. Assurance

    Threat model, evaluation plan and governance: how it is shown to be safe and fair.

  13. 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