Data and events
Principle P2 says every kind of data has one owner. This page makes that concrete: which service owns what, how the rest of the platform learns about changes, how sensitive each kind of data is, and how long it’s kept.
Event flows
Section titled “Event flows”- A signed agreement tells the funding service to pay out.
- A decision tells the notice service to send an approval or an adverse action notice, with the reason codes already decided.
- A funded loan tells the servicing adapter to create the loan in the servicing system.
Who owns what
Section titled “Who owns what”| Data | Owner (system of record) | Others get it by | Never |
|---|---|---|---|
| Application and applicant details | Application service | API (for the workbench), events (IDs and status only) | Copied into another service’s database |
| Identity verification result | Application service | API | Stored by the decision service beyond the decision record |
| Credit report | Decision service | Not shared; the workbench displays it through the decision service API, with every view logged | Published on the event stream |
| Decision, score, reasons, strategy versions | Decision service, copied immutably to the decision log | Events (outcome and reason codes) | Changed after the fact |
| Loan agreement | E-signature vendor; copy in the application service’s document store | API | Edited |
| Disbursements and ledger | Funding service | Events | Updated in place (corrections are new ledger entries) |
| Loan servicing records | Servicing system (unchanged) | Its own interfaces | Written by anything except the servicing adapter |
| Reporting data | Data platform, as copies | SQL for analysts | Treated as a system of record |
Core entities
Section titled “Core entities”| Entity | Owned by | Key fields | Notes |
|---|---|---|---|
| Application | Application service | application_id, channel (web or branch), status, amount_requested, term_months, submitted_at | Status is a state machine: started, submitted, decided, offered, signed, funded, withdrawn, expired |
| Applicant | Application service | applicant_id, name, date of birth, address, income, SSN (tokenized) | SSN is tokenized at intake; only the token moves between services |
| Decision | Decision service | decision_id, application_id, outcome, score, reason_codes, strategy_version, bureau_report_ref, decided_at | One decision per application per submission; idempotency key is the application ID plus submission number |
| Offer | Decision service | offer_id, decision_id, amount, APR, term_months, monthly_payment, expires_at | Generated by the pricing grid in the active strategy |
| Agreement | Application service | agreement_id, offer_id, signed_at, document_ref | Created by the e-signature webhook |
| Disbursement | Funding service | disbursement_id, loan_id, amount, rail (ACH), status, bank_trace_number | Status: requested, submitted, settled, returned |
| Ledger entry | Funding service | entry_id, disbursement_id, account, debit, credit, posted_at | Double entry; every movement sums to zero |
| Notice | Notice service | notice_id, application_id, type (approval or adverse action), reason_codes, sent_at, channel | Reasons copied from the decision, never recomputed |
Event catalog
Section titled “Event catalog”All events share an envelope, follow the CloudEvents (opens in a new tab) attribute names, and are versioned. Schemas are stored in the schema registry; a breaking change means a new version, published alongside the old one until consumers move.
| Event | Topic | Producer | Consumers | Key |
|---|---|---|---|---|
| ApplicationSubmitted.v1 | application-events | Application service | Data platform | application_id |
| AgreementSigned.v1 | application-events | Application service | Funding service, data platform | application_id |
| DecisionMade.v2 | decision-events | Decision service | Notice service, application service, data platform | application_id |
| LoanFunded.v1 | loan-events | Funding service | Servicing adapter, data platform | loan_id |
| DisbursementReturned.v1 | loan-events | Funding service | Application service, data platform | loan_id |
Example: DecisionMade.v2. Version 2 added the reason codes, following ADR-004.
{ "specversion": "1.0", "type": "com.examplelending.decision.DecisionMade.v2", "source": "decision-service", "id": "9f4c2a7e-1b3d-4e8a-9c61-2f5d8b0a7e13", "time": "2026-06-08T14:31:07Z", "subject": "application/APP-2026-0412977", "data": { "applicationId": "APP-2026-0412977", "decisionId": "DEC-2026-0388214", "outcome": "DECLINED", "reasonCodes": ["R03", "R11"], "strategyVersion": "personal-loans-2026.06.1", "decidedAt": "2026-06-08T14:31:06Z" }}The event carries no name, income, SSN or credit data. The notice service fetches the applicant’s contact details from the application service when it sends the notice. Reason codes map to plain-language reasons in a versioned table (for example, R03 “Debt obligations too high relative to income”, R11 “Limited credit history”), so the notice wording can be reviewed by compliance without touching the event.
Data classification
Section titled “Data classification”| Class | Examples | Controls |
|---|---|---|
| Restricted | SSN, bank account numbers, credit reports | Tokenized or encrypted with a dedicated key; access only through the owning service; every read logged; never in logs, events, test environments or the data platform |
| Confidential | Name, address, date of birth, income, decision details | Encrypted at rest and in transit; role-based access; masked in the data platform except for approved roles |
| Internal | IDs, statuses, reason codes, strategy versions | Standard access control |
Retention
Section titled “Retention”| Data | Kept for | Why | How it’s enforced |
|---|---|---|---|
| Decision records | 7 years | Regulation B requires at least 25 months; company policy covers disputes and examinations | Write-once retention lock (ADR-007) |
| Credit reports | 7 years, encrypted | Tied to the decision they supported | Lifecycle policy; deleted with a logged job |
| Applications that never completed | 13 months | No credit decision was made; minimize what’s kept | Scheduled purge job, reported monthly |
| Events on the stream | 14 days | Long enough to replay after an incident | Topic retention setting |
| Data platform copies | Follows the source’s retention | Copies mustn’t outlive the original | Purge jobs mirror source deletions |
| Application logs | 90 days | Troubleshooting | Log store retention |
Retention periods here are illustrative. Set yours with your compliance and legal teams.
Related pages
Section titled “Related pages”- Failure story: The outbox that shipped two packages
- Failure story: The replay that calculated a different invoice
- Architecture views
- Threat model, which relies on this classification
- Migration and cutover, including the data migration
- Event-driven architecture
- Messaging, on delivery guarantees
Written and edited by Abhinav Taduka, enterprise software architect.
New pages are added regularly. Follow Abhinav on LinkedIn to see them first.