INTERACTIVE DEMO — SYNTHETIC DATA

What Counts As A Sale

The same ledger, four documented mistakes, four different answers. Only one setting reconciles with the storefront's own report — and that is the entire argument for writing the definition down.

Every record on this page is fabricated. No production system, customer, employee or credential is involved.

The production system behind this demo was engineered by Prada Dipa — LinkedIn profile, opens in a new tab and Luthfi Aditya — LinkedIn profile, opens in a new tab. I managed and directed it — requirements, technical review, QA and rollout.

READ ABOUT THE SYSTEM

THE WRITTEN DEFINITION

Four clauses. Each one has a documented alternative that is wrong in a specific way — switch any of them and watch the reconciliation below.

LINES COUNTED
REFUNDS BOOK ON
BUCKETED IN
CHANNEL FILTER

0 CLAUSES ALTERED

RECONCILIATION AGAINST THE STOREFRONT

The storefront publishes its own net sales figure. So does this computation. Where the two disagree, somebody is about to make a decision on a number that is not true.

Net sales per month under the current definition, beside the storefront’s own published figure.
MonthThis definitionStorefrontDelta
2026-01$6,810$6,8100
2026-02$7,190$7,1900
2026-03$5,660$5,6600
QUARTER$19,660$19,6600

Every month reconciles exactly. That agreement is the deliverable — the dashboard, the report runner and the storefront now answer the same question the same way.

FOUR ANSWERS FROM ONE LEDGER

Each of these is one clause changed and nothing else. All five read the same 24 orders and the same 11 refunds.

THE REFUND LEDGER

The returns desk clears its queue in a batch at 06:10 local time, which is 23:10 the previous day in UTC. Bucket in UTC and every one of these eleven refunds is dated a day early. Bucketed in UTC+07:00, none of them is.

Every refund, the order it belongs to, and the month the current definition books it into.
RefundOrderProcessedBooks intoon processed dateAmount
REF-2001merchandiseORD-10022026-02-05local2026-02$860
REF-2002merchandiseORD-10032026-01-21local2026-01$640
REF-2003merchandiseORD-10042026-02-01local2026-02$430
REF-2004merchandiseORD-10062026-02-11local2026-02$1,780
REF-2005shippingORD-10062026-02-11localnot counted$60
REF-2006merchandiseORD-1005wholesale2026-02-17local2026-02$6,400
REF-2007merchandiseORD-10102026-03-02local2026-03$1,220
REF-2008merchandiseORD-10132026-03-06local2026-03$1,120
REF-2009merchandiseORD-10142026-03-19local2026-03$780
REF-2010merchandiseORD-10172026-03-24local2026-03$1,390
REF-2011merchandiseORD-10182026-03-30local2026-03$560

WHAT THE LINE FILTER ADMITS

Every line billed on the quarter’s online orders. A storefront hands you all of them; only the first is a product sale.

  • Merchandise$28,440
  • Shipping$900
  • Tax$2,844
  • Duty$205
  • Tips$120
  • Gift cards$350

WHERE A CHANGE GOES

Every source is split the same three ways, with hard boundaries. The payoff is that no one has to decide where a change belongs.

The API changed
connector — raw I/O, pagination and auth, no business logic
A business rule changed
transform — pure; selects columns and coerces types, no I/O
Write semantics changed
loader — one transaction: upsert parents, delete and reinsert children

WHO CAN SEE THE NUMBER

A figure this contested is also a figure not everyone should have. Two rules, both server-side.

  • Every API route re-fetches the user row on each request rather than trusting the session cookie's claims — so a deactivation bites on the next call, not at the next login.
  • The external-partner role is scoped to traffic, marketing and reviews, and is refused sales figures outright.

STATIC ARCHITECTURE — NOT SIMULATED HERE