INTERACTIVE DEMO — SYNTHETIC DATA
Product Page Automation
A storefront product page is a deterministic function of the internal workbooks. These are the three decisions that make it one — rebuilt from the project's specification, not ported.
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.
PROVENANCE — NOT A PORTThe production tool is not in this repository, so the three decisions below were rebuilt from the project’s specification rather than ported from its code. The engineers credited above built that production system; what runs on this page is a reconstruction of the rules they implemented, and it is tested against the specification rather than against the original.
DECISION 1Which variants exist
One skeleton, five production types. They differ only in flags, stock location and size filtering — which is why this is a rule table and not five code paths that drift apart. Change the type and watch the variant set recompute.
The type names are reconstructed; the four behaviour columns are the specified part.
| TYPE | TAG | POLICY | LOCATION | SIZE RULE |
|---|---|---|---|---|
| to-produce | CONTINUE | TO_PRODUCE | full-template | |
| in-production | CONTINUE | TO_PRODUCE | full-template | |
| in-stock | DENY | MAIN + OUTLET | stocked-only | |
| restock | DENY | MAIN + OUTLET | stocked-only | |
| sample | DENY | SAMPLE_ROOM | sample-run |
Only sizes with stock at either warehouse become variants, and real per-warehouse quantities are written.
VARIANT SET FOR MRD-2207 / DEEP TEAL · 4 VARIANTS · 129.00 EACH
| SIZE | SKU | BARCODE | GRAMS | QTY → LOCATION |
|---|---|---|---|---|
| XS | MRD2207-DTL-XS | 2000220700018 | 380 | 12 → MAIN |
| M | MRD2207-DTL-M | 2000220700032 | 420 | 40 → MAIN |
| L | MRD2207-DTL-L | 2000220700049 | 445 | 7 → MAIN |
| XL | MRD2207-DTL-XL | 2000220700056 | 470 | 3 → MAIN |
DECISION 2Where the quantity lands
The mutation is sent, and the storefront hands back its variants in its own order — and here it did not hand back size M at all. The tool now has to put each quantity on the right variant.
The rule the system runs on: every quantity is looked up by SKU, so the storefront's ordering cannot matter.
THE TOOL INTENDED
- MRD2207-DTL-XS12
- MRD2207-DTL-M40
- MRD2207-DTL-L7
- MRD2207-DTL-XL3
THE STOREFRONT RETURNED
- MRD2207-DTL-L
- MRD2207-DTL-XL
- MRD2207-DTL-XS
WHAT WAS WRITTEN
- SIZE XS12 units — intended for size XS (MRD2207-DTL-XS)
- SIZE L7 units — intended for size L (MRD2207-DTL-L)
- SIZE XL3 units — intended for size XL (MRD2207-DTL-XL)
SKIPPED WITH A NOTE · storefront returned no variant for MRD2207-DTL-M — 40 units not written, logged and skipped
Every quantity landed on its own size. A variant the storefront did not return is skipped with a note rather than having its quantity handed to whichever variant happened to be next.
DECISION 3Create, update, or leave alone
A lookup sheet is consulted before anything is written. No row means create, as a draft. A row hands back the product id. A row the snapshot calls live is skipped rather than quietly rewritten — which matters a great deal, given what an update re-sends.
| STYLE-COLOUR | SNAPSHOT | ACTUALLY | DECISION |
|---|---|---|---|
| MRD-2207 / DEEP TEAL | — absent — | CREATEnot in the lookup snapshot — create as a draft | |
| MRD-2207 / BONE | DRAFT | UPDATEsnapshot says draft — update the existing page | |
| MRD-3110 / SLATE | ACTIVE | snapshot says the page is live — skipped, not rewritten | |
| MRD-3110 / EMBER | DRAFT | ACTIVE | UPDATEsnapshot says draft — but the page went live after the snapshot was taken |
| MRD-4025 / MOSS | ACTIVE | snapshot says the page is live — skipped, not rewritten |
The lookup is a snapshot, refreshed by its own hourly job. MRD-3110 / EMBER went live 47 minutes ago and the snapshot still says draft, so the run would rewrite a page customers are currently looking at. That window is real, it is up to an hour wide, and it is written into the caveat register rather than left to be discovered.
THE SHARP EDGEAn update re-sends the whole page
A page is a deterministic function of the sheets. That is the point of the tool and it is also its cost: an update re-sends handle, SEO, description, tags and images, so a correction made anywhere other than the sheet does not survive the next run. Six hand edits are sitting in the storefront admin below.
| FIELD | IN THE ADMIN NOW | WHAT THE RUN SENDS |
|---|---|---|
| handle | deep-teal-merino-crew-neck | mrd-2207-deep-teal |
| SEO title | Deep Teal Merino Crew — free shipping over 500 | MRD-2207 Deep Teal | MERIDIAN |
| SEO description | Hand-written by merchandising after the January search review. | Deep Teal. Merino crew neck. Sizes XS–XL. |
| description | …plus a care paragraph a customer-service lead added in March. | Per-style description, rebuilt from the master data sheet. |
| tags | in-stock, staff-pick, gift-guide | in-stock |
| images | flat-lay first (reordered by hand) | sheet order — on-figure first |
6 of 6 fields would be replaced by this run. Press it and watch a merchandiser’s afternoon disappear.
THE REGISTERKnown caveats, written down
The production README carries a numbered register of sixteen known caveats. Requiring it be written down rather than remembered was a decision, and it is the most useful artefact the project has.
That file is not in this repository, so this is not a transcript of it. These 14 are the register this rebuild can stand behind — 9 of them demonstrated on this page, the rest following from the specification it was written from. Claiming sixteen and showing an approximation would be the exact failure the register exists to prevent.
- An update re-sends handle, SEO title, SEO description, description, tags and images. A hand edit made in the storefront admin is overwritten on the next run.SHOWN HERE
- The create-or-update lookup is an hourly snapshot. A page can go draft → active between refreshes, and the run will not know.SHOWN HERE
- Inventory is matched to a variant by SKU. Position-matching a quantity list against the order the storefront returned once put quantity on the wrong size.SHOWN HERE
- A variant the storefront does not return is skipped with a note. The quantity is not written, and the run says so.SHOWN HERE
- A style with zero stock at every warehouse is skipped with a message, not created as an empty page.SHOWN HERE
- Under the placeholder types every quantity is identical, so a mis-assignment is indistinguishable from a correct one until real quantities differ.SHOWN HERE
- Creation always writes a draft. Nothing in the tool publishes a page.SHOWN HERE
- A size with no row in the UPC list gets no variant, because a variant with no SKU cannot be matched on the next run.SHOWN HERE
- A page the snapshot calls live is skipped rather than rewritten — which also means a genuine correction to a live page cannot be pushed by this tool.SHOWN HERE
- The six upstream sources are read once and cached for the life of the run, so a sheet edited mid-run is not picked up.
- Images are attached by their existing storefront file identifier, so a file that has been deleted or replaced upstream will not re-upload itself.
- The resume ledger must live on a mounted volume. On a container's ephemeral filesystem the resume state dies with the container.
- Scheduling is a login-only LaunchAgent on a workstation. Nobody logged in means nothing ran, and it fails quietly.
- A Sheets values:append that returns 5xx after the server applied it cannot be blind-retried — there is no idempotency token, and a retry duplicates the row.
WHY THIS ONE IS A REBUILD
Most demos on this site run production code, ported out of the system they came from. This one cannot: the production tool is twenty-eight Python modules that read six workbooks and sheets, and it is not in this repository — only a fix/ fragment holding a checkpoint ledger and a retry wrapper, neither of which contains any of the logic above.
So the three decisions were rebuilt from the project’s own specification. There is no original to diff against and no digest to pin against it. That is a weaker claim than a ported demo makes, and it belongs on the page rather than in a footnote — /demos labels this one REBUILT FROM SPECIFICATION for the same reason.
THE STYLE ON THIS PAGE
- MRD-2207
- DEEP TEAL
- MERIDIAN — fictional
- 129.00
Every code, weight, barcode and quantity is invented. The barcodes sit in the GS1 200-prefix range, which is reserved for internal use and cannot collide with a real product.