Demo
One customer, kept in step across three systems
An invented online course company sells course seats to other companies, and each customer company turns up in three places: the billing system, the website’s accounts and the help desk’s contacts. Match the records that arrive to one customer, watch changes reach a help desk that keeps failing, sync billing to two targets without undoing a person’s correction, and see a customer’s billing page in each of its five states.
This is a simulation. No AI model runs on this page and no system is called: the three systems, the help desk that fails every third call and the payment provider are all pretend, and the company, its 39 customer companies, their addresses on reserved test domains, plans and invoices are invented. Time is a pretend clock that moves only when you press a button. Nothing you do leaves your browser or is kept, and reloading the page starts again.
1. Matching records to one customer
The registry already holds 36 customers from day 1, each with a billing number, a primary address and some user addresses. On day 2, 11 records arrive from the three systems. Each one climbs down the ladder and stops at the first rung that finds anyone. One customer found is a match. Two found goes to a person. Nothing found makes a new customer. A name is shown to help people, but the ladder never matches on a name.
The ladder, top rung first
- Already linked (certain). The record’s own id is already linked to a customer, by an earlier match or a person’s decision.
- Billing number (certain). The record carries a billing number the registry holds.
- Primary address (high). The address is exactly one customer’s primary address.
- User address (high). The address is exactly one customer’s user address.
- Only customer on the domain (medium). Exactly one customer uses the address’s domain. Free-mail domains never count.
Free-mail domains here: inbox.test. Many unrelated companies use them.
Not run yet. Every record is waiting.
Review queue
Nothing is waiting for a person.
The 11 records from day 2 and what the ladder decided
B-1003, Billing system, Not run yet
Company: Harbor; address admin at harbor.test; billing number B-1003.
A billing record the registry already knows.
B-1007, Billing system, Not run yet
Company: Aspen; address finance at aspen.test; billing number B-1007.
Aspen changed its primary address in billing.
W-1, Website accounts, Not run yet
Company: Cedar; address office at cedar.test; billing number none.
No billing number: website sign-ups do not carry one.
M-1, Help desk contacts, Not run yet
Company: Lantern; address training at lantern.test; billing number none.
No billing number, and the address is one of the users, not the primary.
W-2, Website accounts, Not run yet
Company: Juniper; address courses at juniper.test; billing number none.
An address nobody has seen, on a domain only one customer uses.
W-3, Website accounts, Not run yet
Company: Summit; address sales at peak.test; billing number none.
A new address on a domain two companies share.
M-2, Help desk contacts, Not run yet
Company: Fern; address books at inbox.test; billing number none.
A free-mail address that two companies both use.
W-4, Website accounts, Not run yet
Company: Sparrow; address studio at inbox.test; billing number none.
A new company on the free-mail domain.
B-1037, Billing system, Not run yet
Company: Kestrel; address accounts at kestrel.test; billing number B-1037.
A billing number the registry has never seen.
M-3, Help desk contacts, Not run yet
Company: Wren; address hello at wren.test; billing number none.
A help desk contact from a company nobody knows yet.
M-4, Help desk contacts, Not run yet
Company: Marigold; address coach at marigold.test; billing number none.
A user address, arriving from the help desk.
The registry: 36 customers
- R-01 Maple: billing B-1001; primary accounts at maple.test; users training, team. In the registry since day 1.
- R-02 Cedar: billing B-1002; primary office at cedar.test; users learning, manager. In the registry since day 1.
- R-03 Harbor: billing B-1003; primary admin at harbor.test; users team, coach. In the registry since day 1.
- R-04 Lantern: billing B-1004; primary finance at lantern.test; users manager, training. In the registry since day 1.
- R-05 Juniper: billing B-1005; primary accounts at juniper.test; users coach, learning. In the registry since day 1.
- R-06 Quarry: billing B-1006; primary office at quarry.test; users training, team. In the registry since day 1.
- R-07 Aspen: billing B-1007; primary admin at aspen.test; users learning, manager. In the registry since day 1.
- R-08 Heron: billing B-1008; primary finance at heron.test; users team, coach. In the registry since day 1.
- R-09 Otter: billing B-1009; primary accounts at otter.test; users manager, training. In the registry since day 1.
- R-10 Marigold: billing B-1010; primary office at marigold.test; users coach, learning. In the registry since day 1.
- R-11 Willow: billing B-1011; primary books at inbox.test. In the registry since day 1.
- R-12 Fern: billing B-1012; primary books at inbox.test. In the registry since day 1.
- R-13 Ridge: billing B-1013; primary accounts at peak.test; users team, coach. In the registry since day 1.
- R-14 Summit: billing B-1014; primary office at peak.test; users manager, training. In the registry since day 1.
- R-15 Birch: billing B-1015; primary admin at birch.test; users coach, learning. In the registry since day 1.
- R-16 Meadow: billing B-1016; primary finance at meadow.test; users training, team. In the registry since day 1.
- R-17 Orchard: billing B-1017; primary accounts at orchard.test; users learning, manager. In the registry since day 1.
- R-18 Beacon: billing B-1018; primary office at beacon.test; users team, coach. In the registry since day 1.
- R-19 Compass: billing B-1019; primary admin at compass.test; users manager, training. In the registry since day 1.
- R-20 Anchor: billing B-1020; primary finance at anchor.test; users coach, learning. In the registry since day 1.
- R-21 Thistle: billing B-1021; primary accounts at thistle.test; users training, team. In the registry since day 1.
- R-22 Clover: billing B-1022; primary office at clover.test; users learning, manager. In the registry since day 1.
- R-23 Lagoon: billing B-1023; primary admin at lagoon.test; users team, coach. In the registry since day 1.
- R-24 Poplar: billing B-1024; primary finance at poplar.test; users manager, training. In the registry since day 1.
- R-25 Falcon: billing B-1025; primary accounts at falcon.test; users coach, learning. In the registry since day 1.
- R-26 Badger: billing B-1026; primary office at badger.test; users training, team. In the registry since day 1.
- R-27 Saffron: billing B-1027; primary admin at saffron.test; users learning, manager. In the registry since day 1.
- R-28 Cobalt: billing B-1028; primary finance at cobalt.test; users team, coach. In the registry since day 1.
- R-29 Granite: billing B-1029; primary accounts at granite.test; users manager, training. In the registry since day 1.
- R-30 Pebble: billing B-1030; primary office at pebble.test; users coach, learning. In the registry since day 1.
- R-31 Tundra: billing B-1031; primary admin at tundra.test; users training, team. In the registry since day 1.
- R-32 Canyon: billing B-1032; primary finance at canyon.test; users learning, manager. In the registry since day 1.
- R-33 Glacier: billing B-1033; primary accounts at glacier.test; users team, coach. In the registry since day 1.
- R-34 Prairie: billing B-1034; primary office at prairie.test; users manager, training. In the registry since day 1.
- R-35 Harvest: billing B-1035; primary admin at harvest.test; users coach, learning. In the registry since day 1.
- R-36 Indigo: billing B-1036; primary finance at indigo.test; users training, team. In the registry since day 1.
2. The outbox and a flaky help desk
Every change to the registry writes an event to an outbox in the same step as the change, so a change is never saved without its event or sent without being saved. A worker then sends the events to the help desk.
- Each pass claims up to 3 events that are due, skipping any another worker holds, and lets go of the claim before calling the help desk.
- A claim held for 3 minutes by a worker that stopped is taken back.
- The pretend help desk fails every third call. A failed event is tried again after 1, 2 and then 4 minutes, and after 4 failed tries it stops and raises an alert.
Worker clock: minute 0
Try: run a pass to see the third call fail and wait a minute; run two more to see the stopped worker’s claim taken back; then take the help desk down and keep running passes to see the waits grow until an alert.
Events
E-1, Claimed
Beacon: update its seats in the help desk.
Claimed by worker 2 at minute 0. That worker then stopped.
E-2, Waiting
Cobalt: update its plan in the help desk.
Waiting to be sent.
E-3, Waiting
Falcon: update its contact in the help desk.
Waiting to be sent.
E-4, Waiting
Granite: update its seats in the help desk.
Waiting to be sent.
Worker log
Each pass will appear here.
3. Sync from billing, one way, to two targets
Billing is the source of truth. Each run reads all 37 billing records and works out a fingerprint of the fields it copies. A target is sent only the records whose fingerprint it has not received, and each target keeps its own, so one target failing never holds the other back. A send that fails all its tries is marked failed and raises an alert; it goes again when the record changes or a full sync sends every record. Billing is never written to.
Try: run it, change billing records and run again; let an agent correct a contact and run again; take the website store down, change billing and run; bring it back and run again (the failed sends wait); then run a full sync.
Not run yet. Neither target has received anything.
Sync log
Each run, note and alert will appear here.
The 37 billing records and what each target has
- B-1001 Maple: Starter, 5 seats, contact office manager. Fingerprint 953401. Website not sent yet; help desk not sent yet.
- B-1002 Cedar: Team, 30 seats, contact training lead. Fingerprint 394408. Website not sent yet; help desk not sent yet.
- B-1003 Harbor: Academy, 110 seats, contact head of people. Fingerprint 023851. Website not sent yet; help desk not sent yet.
- B-1004 Lantern: Starter, 20 seats, contact owner. Fingerprint 872969. Website not sent yet; help desk not sent yet.
- B-1005 Juniper: Team, 25 seats, contact office manager. Fingerprint 480085. Website not sent yet; help desk not sent yet.
- B-1006 Quarry: Academy, 105 seats, contact training lead. Fingerprint 499131. Website not sent yet; help desk not sent yet.
- B-1007 Aspen: Starter, 15 seats, contact head of people. Fingerprint 431547. Website not sent yet; help desk not sent yet.
- B-1008 Heron: Team, 40 seats, contact owner. Fingerprint 396361. Website not sent yet; help desk not sent yet.
- B-1009 Otter: Academy, 100 seats, contact office manager. Fingerprint 067219. Website not sent yet; help desk not sent yet.
- B-1010 Marigold: Starter, 10 seats, contact training lead. Fingerprint 106872. Website not sent yet; help desk not sent yet.
- B-1011 Willow: Team, 35 seats, contact head of people. Fingerprint 415710. Website not sent yet; help desk not sent yet.
- B-1012 Fern: Academy, 115 seats, contact owner. Fingerprint 210768. Website not sent yet; help desk not sent yet.
- B-1013 Ridge: Starter, 5 seats, contact office manager. Fingerprint 819655. Website not sent yet; help desk not sent yet.
- B-1014 Summit: Team, 30 seats, contact training lead. Fingerprint 304874. Website not sent yet; help desk not sent yet.
- B-1015 Birch: Academy, 110 seats, contact head of people. Fingerprint 089469. Website not sent yet; help desk not sent yet.
- B-1016 Meadow: Starter, 20 seats, contact owner. Fingerprint 723532. Website not sent yet; help desk not sent yet.
- B-1017 Orchard: Team, 25 seats, contact office manager. Fingerprint 201585. Website not sent yet; help desk not sent yet.
- B-1018 Beacon: Academy, 105 seats, contact training lead. Fingerprint 957555. Website not sent yet; help desk not sent yet.
- B-1019 Compass: Starter, 15 seats, contact head of people. Fingerprint 806528. Website not sent yet; help desk not sent yet.
- B-1020 Anchor: Team, 40 seats, contact owner. Fingerprint 653204. Website not sent yet; help desk not sent yet.
- B-1021 Thistle: Academy, 100 seats, contact office manager. Fingerprint 122952. Website not sent yet; help desk not sent yet.
- B-1022 Clover: Starter, 10 seats, contact training lead. Fingerprint 004316. Website not sent yet; help desk not sent yet.
- B-1023 Lagoon: Team, 35 seats, contact head of people. Fingerprint 304612. Website not sent yet; help desk not sent yet.
- B-1024 Poplar: Academy, 115 seats, contact owner. Fingerprint 170407. Website not sent yet; help desk not sent yet.
- B-1025 Falcon: Starter, 5 seats, contact office manager. Fingerprint 312383. Website not sent yet; help desk not sent yet.
- B-1026 Badger: Team, 30 seats, contact training lead. Fingerprint 621150. Website not sent yet; help desk not sent yet.
- B-1027 Saffron: Academy, 110 seats, contact head of people. Fingerprint 190322. Website not sent yet; help desk not sent yet.
- B-1028 Cobalt: Starter, 20 seats, contact owner. Fingerprint 547762. Website not sent yet; help desk not sent yet.
- B-1029 Granite: Team, 25 seats, contact office manager. Fingerprint 206322. Website not sent yet; help desk not sent yet.
- B-1030 Pebble: Academy, 105 seats, contact training lead. Fingerprint 007639. Website not sent yet; help desk not sent yet.
- B-1031 Tundra: Starter, 15 seats, contact head of people. Fingerprint 203214. Website not sent yet; help desk not sent yet.
- B-1032 Canyon: Team, 40 seats, contact owner. Fingerprint 690641. Website not sent yet; help desk not sent yet.
- B-1033 Glacier: Academy, 100 seats, contact office manager. Fingerprint 670706. Website not sent yet; help desk not sent yet.
- B-1034 Prairie: Starter, 10 seats, contact training lead. Fingerprint 495929. Website not sent yet; help desk not sent yet.
- B-1035 Harvest: Team, 35 seats, contact head of people. Fingerprint 833537. Website not sent yet; help desk not sent yet.
- B-1036 Indigo: Academy, 115 seats, contact owner. Fingerprint 892467. Website not sent yet; help desk not sent yet.
- B-1037 Kestrel: Starter, 5 seats, contact office manager. Fingerprint 750392. Website not sent yet; help desk not sent yet.
4. A customer’s billing page
What a signed-in customer sees on the website. The server finds the payment provider’s customer for the sign-in and keeps the answer for 4 minutes, so most loads never wait for the provider. Every button that moves money opens the provider’s own hosted page, so card details never touch the site. It is day 30.
Pretend clock: minute 0
On a trial
Trial of the Team plan, 5 days left
The trial started on day 21 and ends on day 35. It is day 30. Nothing is charged unless a plan is chosen.
Purchases
- Team plan, 30 seats, Subscription, Trial until day 35
The button stands in for a page at the payment provider. Press it to see where it would go.
How the page loaded
Badger’s billing page at minute 0: looked up at the payment provider and kept in the cache.
- 1. Browser to Website server: The page asks for the signed-in customer’s billing state (Badger).
- 2. Website server to Cache: Looks for Badger’s state, kept for up to 4 minutes.
- 3. Cache to Website server: Nothing kept yet.
- 4. Website server to Payment provider: Finds the provider’s customer for this sign-in and reads the plan, trial and invoices.
- 5. Payment provider to Website server: On a trial, with 0 invoices.
- 6. Website server to Cache: Keeps it for 4 minutes.
- 7. Website server to Browser: Sends the state; the page draws “On a trial”.
Plans in this invented company: Starter $40 a month, Team $180 a month, Academy $600 a month.
What the demo shows
- A matching ladder that refuses to guess. Records are matched on ids and addresses in a fixed order of confidence, never on a name. When a rung finds two customers, as with two companies on one domain or one free-mail address shared by two companies, the record goes to a person instead of being merged.
- Decisions that stick. A person’s choice links the record’s id, so running the same batch again matches it on the top rung and creates nothing new.
- An outbox instead of two writes. Each registry change and its event are saved in one step. The worker skips claims another worker holds, takes back a claim a stopped worker left, never holds a claim while it waits on the help desk, retries with growing waits and stops with an alert after a few failures.
- Only what changed is sent. A fingerprint of each record, kept per target, means a run sends only the records that changed, and one target failing never holds the other back.
- Human corrections win without writing back. A signed notice from the help desk becomes an override for one field, later runs keep it and leave a mismatch note, and a notice with a bad signature is refused.
- Failures reach people. A send that fails its tries is marked failed and raises an alert naming the records, instead of drifting quietly or retrying forever. A later change or a full sync sends it again.
- No card data on the site. The billing page reads the state through a short cache and hands every payment action to the provider’s hosted pages.