Process ledger fact¶
Lifecycle events, reinterpreted everywhere¶
An order moves through a lifecycle: placed, discounted, paid, shipped, returned. Those events arrive in different tables, at different grains, with different states. Every report that needs net sales rebuilds it by joining and filtering them.
One report forgets returns and overstates. Another reads the order's current status and, without meaning to, rewrites last month's history whenever an order changes.
Figures that never quite reconcile¶
- Net figures differ by report, and each difference takes an afternoon to explain.
- History moves when current state moves, so last month's number is not stable.
- KPIs end up carrying modelling logic that belongs underneath them.
- The pressure grows to precompute every KPI into one wide table, which then becomes hard to change or reuse.
One row per business event¶
Model a coherent business process as a ledger of atomic events at an explicit grain, where each event carries additive, signed observations with its provenance. Compose metrics and KPIs from that stable foundation instead of embedding the logic in each report.
The picture¶
An order line, start to finish¶
Illustrative example
Order line L1 is placed for 40.00, discounted by 4.00, shipped, then returned for the remaining 36.00. The ledger holds four rows. Net sales for L1 is the sum of the value changes: zero. No report needs to know the rules of returns to get it right.
Return rate is returns divided by gross sales. It is a ratio, so it is composed from the sums for whatever period and dimension are asked for, never added up from per-order rates.
When the business decides that net sales should exclude shipping charges, that is a change to the metric's definition. The ledger does not need to be rebuilt.
In detail¶
When it fits¶
Use it where several lifecycle events form one analytical process that people want to count, sum and reconcile over time: orders, payments, claims, subscriptions, stock movements.
Guardrails¶
- Do not collapse different grains merely to make one table convenient.
- Avoid nulls where the business provides a meaningful known value.
- Use zero only where the measure is genuinely not applicable or the additive identity is semantically correct.
- Keep changeable KPI composition separate from stable process facts.
Alongside other shapes¶
A ledger answers what happened, when, and what it added up to. A lifecycle snapshot answers where is each order now. Both can exist; the snapshot can be derived from the ledger rather than maintained as a second truth.
Not this
- Not one universal table. The aim is a reliable foundation from which many metrics can be composed.
- Not a place for targets or presentation logic.
Unresolved
- Which events genuinely belong to the same process, and which only look related?
- Who owns a ledger for a process that crosses several domains?
Join the argument
Agree, challenge or add evidence
Architecture improves when its assumptions are challenged. Say which kind of contribution you're making:
- Challenge I disagree because…
- Evidence We've seen this too…
- Question How would this work when…?
- Alternative Another way to approach this…
- Extension This also implies…
Please keep clients, employers and colleagues unidentifiable. Strong contributions may be quoted and credited on this site. Read the contribution guidelines and the privacy notice.
Comments are provided by giscus and stored on GitHub. Posting requires a GitHub account.