← SIMRANJAISWAL.INTHE ENGINE ROOM · 07 · DISPUTES

Every dispute has a clock

A disputed invoice is money that has stopped moving and a conversation nobody owns. "Pricing will look at it" is not an owner; "soon" is not a deadline. This engine gives every dispute a cause, a team and a working-day clock, escalates the ones that pass it, and counts the cash each resolution lets go. It runs below, in your browser, on 300 disputes — twice: once with the clock, once with the same disputes and nobody watching.

◆ LIVE ENGINE · RUNS IN YOUR BROWSER · PYTHON REFERENCE PUBLIC
0DISPUTES IN THE REFERENCE RUN · RAISED OVER 120 DAYS
0OWNER TEAMS · SLA 3 · 5 · 7 · 4 · 3 · 5 WORKING DAYS
0CASH UNLOCKED EARLIER BY DAY 120 · CLOCK MINUS NO CLOCK · ₹ LAKH
0MEDIAN DAYS TO RESOLVE, SAVED · CLOCK vs NO CLOCK
01 · THE JOB

In the collections cases, disputes were where invoices went to wait. Not because anyone refused to pay — because a query raised on a Tuesday had no owner by Friday, and by the time it did, the invoice was sixty days old and the customer had moved on.

A dispute is the one state of an invoice where chasing makes things worse. The customer has said "this is wrong"; until someone on your side says "here is the answer", every reminder is an insult and every day is free for them. In the procurement startup's ledger and the logistics receivables, the disputed pile was small in count and large in age — the same handful of invoices, months old, each waiting for a team that did not know it was waiting for them. The fix was not a nicer email. It was a clock. Route the dispute by its cause to the team that can answer it, give that team a deadline in working days, escalate the moment the deadline passes, and count the cash the answer releases. The Dispute Clock is that, written down as rules — TRACE and SEAL of the Leak Ledger — and run against the world without it.

02 ·THE ENGINELOGGED → TRIAGE → SIX LANES → AN ANSWER, WITH A CLOCK ON EVERY LANE
EVERY DISPUTE IS LOGGED, OPENED BY THE TRIAGE DESK (OLDEST FIRST, SIX A DAY), ROUTED BY CAUSE TO ONE OF SIX OWNER LANES, AND RESOLVED AS A CREDIT, A RE-INVOICE OR UPHELD · THE CLOCK STARTS WHEN THE OWNER GETS IT · PAST THE SLA, THE OWNER'S MANAGER GETS IT TOO · CASH UNLOCKS ON THE DAY OF THE ANSWER.

There is no judgement in the engine about who is right. It does not decide the dispute; it decides who must decide it and by when, and it refuses to let the question sit in nobody's queue. The cause code is the routing key, the SLA is a number printed per lane, escalation is a rule and not a favour, and the measure is not "disputes closed" but cash unlocked by day — because a dispute resolved as a credit still releases the rest of the invoice, and an invoice upheld after ninety days has already cost most of what it was worth.

03 ·THE RULESWHAT "OWNED", "LATE" AND "RESOLVED" MEAN, EXACTLY
STEPRULEWHAT IT DOES
LOGGEDA dispute arrives on a day with an invoice amount and a cause: PRICE, QUANTITY, QUALITY, PO_MISMATCH, TAX or OTHERThe cause is the routing key. No cause, no route — the desk assigns one.
TRIAGEThe desk opens up to 6 disputes per working day, oldest first; each takes 1–2 working days to confirm the cause and hand overThe queue in front of the desk is the first place disputes hide. Its capacity is a slider.
ROUTEPRICE → PRICING (SLA 3 wd) · QUANTITY → OPS (5) · QUALITY → QA (7) · PO_MISMATCH → SALES (4) · TAX → FINANCE (3) · OTHER → the desk itself (5)One team, one deadline, printed. The SLA multiplier scales all six.
THE CLOCKThe owner's time to answer is drawn around its SLA — exp(normal(log SLA, 0.45)) working days, times the multiplierA shorter clock is a faster owner: the deadline shapes the behaviour, which is the whole bet.
ESCALATEStill open at the deadline → the owner's manager is paged; from then the resolution hazard doubles (the remaining time is halved, rounded up)Counted, per team. A lane that escalates every second dispute has the wrong SLA or the wrong staffing — the table says which.
RESOLVECREDIT (a partial credit, 5–100% of the invoice), RE_INVOICE or UPHELD, with probabilities per cause (PRICE .55 / .15 / .30 · QUANTITY .60 / .20 / .20 · QUALITY .50 / .10 / .40 · PO_MISMATCH .10 / .70 / .20 · TAX .20 / .60 / .20 · OTHER .30 / .30 / .40)Cash unlocked on the day of the answer = invoice − credit. A re-invoice and an upheld invoice both release the full amount.
NO CLOCKThe same 300 disputes, the same draws: desk capacity 2 a day, no deadline, no escalation, every owner duration × 2.2The baseline. Its "within SLA" is measured against the clock it never had, so the two columns compare.
Tie-out300 = resolved by day 120 + with an owner + still in triage, for each policy; cash unlocked = Σ (amount − credit) over the resolvedIf the sum breaks, nothing is published. It never should; the strip shows the check.
# the clock — the sentence an ops lead can disagree with (engine.py)
dur = max(1, rhu(d["raw"] * mult))                    # the owner's duration, working days
sla = max(1, rhu(SLA[d["cause"]] * sla_mult)) if clock else SLA[d["cause"]]
esc = clock and escalation and dur > sla
esc_day = add_wd(w, sla) if esc else None            # the deadline: SLA working days after handover
actual = sla + (dur - sla + 1) // 2 if esc else dur  # past it, the remainder is halved (rounded up)
r = add_wd(w, actual)                                # resolved; amount - credit lands this day
04 ·RUN ITTHE CLOCK, LIVE, ON DISPUTES YOU CONTROL
NO CLOCK IS FIXED: DESK 2 / DAY · NO DEADLINE · DURATIONS ×2.2
SEED
300 DISPUTES ARE DRAWN FROM THE PRINTED RULES AND WALKED THROUGH THE CLOCK, AND THROUGH NO CLOCK, IN YOUR BROWSER. NOTHING LEAVES THIS PAGE.
CASH UNLOCKED EARLIER BY DAY 120

Run the clock to see what it releases.

WHERE THE 300 ARE ON DAY 120

Three things to try. Press NO CLOCK: the sliders become the world without one — a two-a-day desk, no deadline, nobody paged — and the big number goes to zero, because now both worlds are the same one. Press DOUBLE THE TRIAGE DESK and almost nothing moves: at six a day the desk was never the bottleneck, the owner's clock was. Then drag the SLA multiplier to ×0.5 and watch escalations fall while the cash comes sooner — a tighter clock is not more paging, it is faster answers. And switch escalation off with the SLA left alone: the deadline still exists, nobody enforces it, and the p90 tells you what a deadline is worth without a consequence.

05 ·WHAT IT FINDSTHE REFERENCE RUN · SEED 42

Cash unlocked, with the clock and without

CUMULATIVE ₹ RELEASED BY RESOLVED DISPUTES · DAYS 1–150 · THE SAME 300 DISPUTES
THE CLOCKNO CLOCK· THE GAP AT DAY 120 IS THE BIG NUMBER

Days to resolve

ALL 300 DISPUTES, RUN TO COMPLETION · LOGGED → RESOLVED, CALENDAR DAYS

Still open on day 120, by age

DISPUTES NOT YET RESOLVED · DAYS SINCE LOGGED

By cause: who owns it, how long it takes, what it costs

By lane: the queue and the clock

06 ·WATCHHOW IT RUNS WHEN NOBODY IS LOOKING
WHENWHAT HAPPENSWHO SEES IT
09:00 dailyNew disputes are logged from the mailbox and the portal; the desk opens the oldest first, confirms the cause, routes each to its lane. A dispute with no cause after two working days is a desk failure, not a customer one.The desk. The customer gets one line: who owns it and by when.
HourlyEvery dispute with an owner is checked against its clock. Past the SLA → the owner's manager is paged with the invoice, the cause and the days late. Nobody has to notice; the clock notices.The manager, once. A lane that pages daily is staffed wrong or clocked wrong.
09:05 dailyPublish the open list: one row per dispute — owner, cause, days with owner, days to deadline, invoice value held. Tie-out first: logged = resolved + with owner + in triage, or no publish.Collections, so they stop chasing what is disputed; sales, so they see their lane.
WeeklyTwo lines on one chart: cash unlocked this week, value still held by age. SLAs are revisited only when a lane's hit rate moves — not when someone complains about the paging.Leadership — the WATCH stage of the Leak Ledger.
07 · THE TAKEAWAY

A dispute is not a difficult customer; it is an unanswered question with a value attached. Give the question an owner and a clock and most of them get answered in a week, and the money behind them moves. Leave it to goodwill and the same questions age quietly in six inboxes until the invoice is too old to matter. The engine does not make the answer better. It makes the answer arrive.

THE DISPUTES ARE SYNTHETIC AND DRAWN FROM THE RULES PRINTED IN engine.py (SEED 42; DESK, SLA MULTIPLIER AND ESCALATION AS SHOWN ON THE SLIDERS; THE NO-CLOCK WORLD FIXED AT 2 A DAY, ×2.2, NO ESCALATION). NO CLIENT DATA. THE ENGINE LOGIC IS THE SHAPE OF THE DISPUTE HANDLING BEHIND THE COLLECTIONS WORK ON THIS SITE; OUTCOME FIGURES IN THOSE CASES ARE AS REPORTED THERE, NOT HERE. "HAZARD ×2" IS MODELLED AS HALVING THE REMAINING DRAWN DURATION. THE BROWSER ENGINE IS A LINE-FOR-LINE PORT OF THE PYTHON AND REPRODUCES results.json EXACTLY ON THE REFERENCE SETTINGS — THE STATUS LINE ABOVE SAYS SO WHEN IT DOES.

Disputes sitting in six inboxes? A dispute clock is a two-to-three-week SEAL: your cause codes, your lanes, your SLAs — with a desk queue, an escalation that pages, and a weekly line that shows the cash it released.

Start with a TRACE → engine.py README results.json The case it came from →