> ## Documentation Index
> Fetch the complete documentation index at: https://docs.amlok.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Records, events, and reconciliation

> Represent source versions and economic activity without double-counting sales or cash flows.

The research representation separates a source record from the economic event it describes. This distinction is essential for a system that combines banking, payments, commerce, and accounting. Several observations can corroborate one sale without becoming several sales.

## Proposed research record

| Field family | Required information |
| - | - |
| Identity and scope | Pseudonymous workspace and subject, source system/account, source record ID and version. |
| Time | Event time, settlement time where applicable, first known time, ingestion time, correction time. |
| Financial meaning | Amount, original currency, debit/credit convention, record type, pending/posted/reversed state. |
| Interpretation | Original descriptor, normalized text, category candidates, entity candidates, unresolved fields. |
| Evidence | Raw-object digest/reference, source page or response location, transformation version. |
| Rights and quality | Allowed purposes, access scope, completeness, freshness, missingness, consent state. |

This is a research schema specification, not a new API resource. Map it to the existing [data model](https://docs.amlok.io/data-model/start-here.md) and versioned API through an implementation review.

## Two forms of deduplication

**Ingestion deduplication** identifies repeat deliveries of the same source record version. A retry does not become new activity. An updated version remains linked to its predecessor.

**Economic reconciliation** links distinct source records that describe the same underlying activity. An order, invoice, payment, settlement, and deposit are retained as evidence with different roles. They are not collapsed into one raw record or summed as independent revenue. This also differs from [Signal's processing-volume count](https://docs.amlok.io/pricing/complexity-tiers.md): a newly processed source version can count toward workload without creating new economic revenue.

## Reconciliation procedure

Generate candidates using provider references, invoice/payment IDs, currencies, amounts, timing, and known settlement schedules. Account for one-to-many and many-to-one relationships. Exact documented identifiers take precedence over fuzzy similarity. Use constraints for fees, taxes, refunds, reserves, partial payments, chargebacks, settlement delay, and currency conversion. Persist unmatched residuals with reasons.

Do not force balance by inventing a transaction or changing an amount. A discrepancy can be normal timing, a missing source, an accounting choice, or a data error. It is not automatically fraud.

## Reconciliation in an original public record

BCE's 2025 annual financial report separates committed credit capacity from drawings, letters of credit and commercial paper. The inspected totals, in CAD millions, reconcile as follows:

```text theme={null}
Net available capacity = 6,393 - 1,409 - 71 - 2,550 = 2,363
```

Each term has a distinct role; neither total capacity nor remaining capacity is cash already received. The [source findings](https://docs.amlok.io/research/public-record-findings.md) retain the original report, date, table location and units. This is a real financial-table calculation, not a linked merchant settlement ledger.

For permissioned payment data, apply the same discipline to customer charges, refunds, fees, reserves and bank payouts. Retain each source record and its role. Accounting revenue recognition depends on the relevant policy and fulfillment evidence; a deposit is not automatically additional sales.

## Revisions and unavailable data

Maintain the original and corrected source versions. Recompute affected features with a new evidence snapshot; do not rewrite historical outputs as though the correction was known earlier. Distinguish zero, missing, unavailable, stale, revoked, and not-applicable values. Source disconnection must produce a data-quality state rather than a fabricated income collapse.

Validate sign conventions and reversals explicitly. Use fixed-point or decimal arithmetic for financial calculations and store the original precision. Do not use binary floating-point output as an unexplained monetary rounding policy.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.