A self-switching Black Friday sale, built and shipped in two and a half days
I took over a live Shopify store four days before Black Friday and led the sale from planning to rollback: five timed site states, bundle-only pricing on a non-Plus store, free gifts, a password-locked early access and Cyber Monday. Order value came in at about 25 times the week before. Many AI coding agents built it in parallel through a coordination system I designed, and every change was proven before customers saw it.

đź”’ Protected by NDA
- Result
- ~25x
- Client
- UK travel accessories brand
- Type
- Agency project
- When
- Nov to Dec 2026
Before and after
Measured on the project. Bars in each row share one scale.
order value in the 5-day sale against the 5 days before
orders: 1,993 in the sale against 94 in the 5 days before
of sale orders used the bundle pricing I built
automated checks at every sale switch time, desktop and phone
The problem
The brand sells colourful packing cubes. Its Black Friday plan changed the site five times in five days: a password-only early access on Thursday, the public sale on Friday, a new bundle on Saturday, Cyber Monday with free gift packaging, and back to normal on Tuesday at 08:00. The brief arrived on Monday afternoon and everything had to be built and tested by Wednesday. The git branch was the live theme, so every push changed the shop at once. It wasn't Shopify Plus, so there was no scheduled theme publishing and only one product discount per cart line. Requirements were spread across chat, a Figma page with 47 comments, a client PDF and old docs. And the bundles weren't products: a bundle added its separate cubes to the cart, so a "15% off bundles" discount could never apply.
What I did
- Rebuilt the full context in about an hour: the project history, every Figma frame and comment and the client PDF, written up as one brief with the facts, risks and open questions. Conflicts like ÂŁ40 against ÂŁ45 thresholds were found on day one.
- Designed a git-native coordination system so many AI coding agents could build in the same repo at once without collisions, and planned 17 parallel tasks.
- Moved all work to an unpublished staging theme and made "never touch live" a rule enforced by tooling, not by memory.
- Built every sale section on timers: merged days early with show-from and hide-from times, all following one shared UK clock. A preview clock showed the site at any moment of the sale.
- Proved from the store's data that the planned bundle discount could never reach the cart, then built tamper-resistant bundle pricing and free gifts as a Shopify Functions discount.
- Ran the live sale: fixed checkout, Apple Pay, pop-up and stock issues the same day each was reported, then rolled the store back and proved it matched its pre-sale state.
Results
- Order value in the 5-day sale was about 25 times the 5 days before (the store's own order data, cancelled orders excluded).
- 1,993 orders in the 5-day sale against 94 in the 5 days before, about 21 times a normal week.
- 1,114 orders on early-access day alone, behind a password page.
- 69% of sale orders (1,385) used the bundle pricing I built. Orders shipped to 53 countries, with shipping rates switched on the minute.
- 170+ tasks shipped through the coordination system with zero merge conflicts, and 115 of 115 automated checks passed at every sale switch time.
- The store was rolled back in 13 minutes on Tuesday morning, then verified by 7 independent checks.
đź”’ Protected by NDA
Nine days, hour by hour
- Mon 23, afternoonRebuilt the full context in about an hour and wrote one brief with the facts, risks and open questions.
- Mon 23, eveningDesigned the coordination system and planned 17 parallel tasks. All work moved to an unpublished staging theme.
- Mon 23, nightBuilt the sale on timers: a shared schedule helper, then heroes, perks row, password page, header button and pop-up.
- Tue 24Built “Pick your bundle” in four day-specific versions, and proved the planned discount could never reach the cart.
- Wed 25Bundle pricing with Shopify Functions, 50+ QA items triaged, and the broken early-access email fixed for about 2,000 people.
- Thu 26, 08:34Go-live. Discounts and shipping switched at 09:00 sharp. 1,114 orders that day.
- Thu 26 to Mon 30Running the live sale: gift abuse closed, checkout, Apple Pay, pop-up and stock issues fixed the same day.
- Tue 1 Dec, 08:00Every timer switched the site back. Manual steps done in 13 minutes, then 7 independent checks.
One theme, six states, zero midnight deploys
Every state is the same published theme. The sections switch themselves on and off by UK time. These were recorded on the live site using the preview clock I built.






đź”’ Protected by NDA
đź”’ Protected by NDA

đź”’ Protected by NDA
A coordination system so many agents could build at once
With two and a half days, one person working one task at a time wasn't enough. I designed a tool so many AI coding agents could work in the same repo at the same time.
- Shared state lives on its own git branch. Every change is one commit pushed with --force-with-lease, a compare-and-swap, so a task, file or port can never be handed out twice.
- Claims cover files, folders, globs and things outside git: discounts, email forms, the theme editor.
- One task is one branch and one worktree. Merges to staging go one at a time: lock, rebase, re-check claims, validate JSON, merge.
- Proof gates: review and merge refuse a task without labelled before and after screenshots and a Figma diff under 1%.
- Stress-tested at 100 concurrent agents: 100 tasks, 100 unique claims, 0 duplicates, 0 lost writes.
- Honest limit: state writes are serialised, so a burst of 100 simultaneous calls takes about 9 minutes to settle. Agents start a few seconds apart, and it's written in the guide.
# every agent, every task
$ coord start BF11 # atomic claim + own worktree
✓ BF11 taken by agent-d · ../wt-BF11
$ coord claim BF11 sections/sale-bundles*
âś“ claimed
$ coord claim BF11 templates/index.json
✗ taken by BF18A (agent-c) · pick other work
$ coord/figma-diff BF11 bundles --width 1440
✓ 0.93% ≤ 1% PASS
$ coord review BF11 && coord integrate BF11 --push
✓ rebased on staging · claims OK · JSON OK · merged
# stress test, throwaway remote
$ coord/test.sh --agents 100
19/19 checks pass · 100 tasks · 100/100 logs · 0 lost"Never touch live", enforced by tooling
A rule people follow under deadline pressure is a rule that gets skipped. So I made it impossible to break by accident.
- All work merged into an unpublished staging theme. Going live meant publishing it, so rollback was one click.
- A git pre-push hook blocks unclaimed files and any push to the live branch.
- A pre-command guard for AI agents rejects anything that would change the live store: pushes, theme publishing, writes to the live theme, Admin API mutations and hook bypasses. 26 test cases, and it stopped a real push to live.
- Store changes were confirmed first. The client's existing discounts, products and shipping stayed blocked unless confirmed for that one change.
- A snapshot before every risky fix: git tags, a zip of the live theme, an export of every discount function and a restore guide.
Ship early, switch by timer
The usual plan is "push the new sections at 9am": late releases, merge conflicts at the worst moment, and no theme scheduling without Shopify Plus. Instead every sale section was merged days early with a show-from and hide-from time. One schedule helper is shared by every section, so the whole site follows one clock, and cached pages re-check the time every minute. A bug the tests caught before launch: a whitespace-only date was "invalid" in the browser but "empty" in Liquid, so the server and the browser would have disagreed about what to show.
| Test | Result |
|---|---|
| Schedule unit tests: window edges, GMT against BST, time zones | 11 / 11 |
| Switch test at every switch time, desktop and phone, the night before launch | 115 passed, 0 failed |
| Click test: real gift flow, cart lines and colour changes | 44 passed |
| Bundle section checks at every sale moment | 26 / 26 |
| Sale pop-up behaviour in a local LiquidJS harness | 20 / 20 |
đź”’ Protected by NDA
1:1 with Figma, measured instead of eyeballed
I built a pixel-diff tool with no dependencies: Node drives Chrome over the DevTools protocol, captures one section at the exact width, freezes animations, hides overlays, aligns within 4 px and ignores anti-aliasing. Review refuses anything over 1% unless the reason is written down. The first baseline read about 99% different; I traced that to measurement error (a pop-up backdrop, a marquee mid-scroll) and fixed the tool first.
| Section | Pixel difference from Figma |
|---|---|
| “Pick your bundle”, six iterations (the rest is store data) | 69.6% → 10.3% |
| Password page | 27.8% → 0.85% |
| Personalise panel, after spacing and label fixes | 21.3% → 3.8% |
| Header “Early access” button, desktop | 0.28% |

đź”’ Protected by NDA
Bundle-only pricing on a store without Plus
- The finding: each bundle's price was exactly the sum of its cubes, bundles had no SKU, and the site added the cubes to the cart. The planned "15% off the bundles collection" discount would never have applied. I confirmed it with real add-to-cart tests on every bundle page, then laid out the options.
- The build: a Shopify Functions discount. Every cube added from a bundle carries a hidden label, and the function prices labelled lines.
- Tamper-resistant by design: anyone can edit hidden cart labels, so no amount is ever read from one. Amounts are set per product in the rule, so at worst tampering gives a loose cube the bundle price.
- Gifts inside the function: off Plus a line can carry one product discount, so the free bag dropped out once the 15% applied. I moved the free bag into the same function with a cart-level guard.
- A gift-abuse path was reported on the first evening. I pulled all 895 orders read-only, found the root cause, built a cap and replayed every order through it: only the 57 over-gifted orders changed. 21 of 21 unit tests.

đź”’ Protected by NDA

đź”’ Protected by NDA

đź”’ Protected by NDA
Caught before customers did
- The early-access email looked perfect on desktop, but on a real phone it showed the email platform's starter template. I fixed the flow and the campaign for about 2,000 recipients the night before launch, then checked all 8 flows and 14 emails the same way.
- A ÂŁ45 minimum on a product discount only counted the discounted item itself, so it could never trigger. Rebuilt as Buy X Get Y, with spend counted from a hidden collection.
- Two customers had paid for a "free" bag because nothing removed it when cubes left the cart. The fix reads what Shopify actually discounts, so it kept working when the sale rules changed.
- Also fixed: two pop-ups overlapping, a choice snapping back only on 1024 to 1366 px laptops, a tablet layout break, an Apple Pay button that had never worked, sold-out colours that could still be picked, and a 4 px header overlap on 360 px phones.

đź”’ Protected by NDA

đź”’ Protected by NDA

đź”’ Protected by NDA

đź”’ Protected by NDA

đź”’ Protected by NDA
Running a live sale
Every store change was confirmed first, tested on a copy where possible, and logged with a one-click way back.
| When (UK) | What I did |
|---|---|
| Thu 08:12 | Built a late must-have 20 minutes before go-live: a free luggage tag on every order over ÂŁ45. 13 unit tests and a real cart test, merged before the publish. |
| Thu 08:34 | Theme published. Password lock set up, leaving off a default that would have locked any product later added to the collection. |
| Thu ~08:45 | The lock app wrapped the page in a paragraph tag and broke its styles. Fixed in under 15 minutes with a reversible setting. |
| Thu 09:00 | Discounts and EU and international shipping switched on the minute, checked with real checkouts. |
| Thu evening | Gift abuse reported. All 895 orders pulled read-only, root cause found, cost measured, a cap built and replay-tested. |
| Fri to Sun | Bundle orders reaching the warehouse as one unnamed item: traced to 2 of 2,894 orders and fixed. The Saturday bundle launched on its own timer. |
| Sun 23:47 | “Keep selling when out of stock” was on for 39 variants. Switched off on the 17 with real stock by script, with before and after proof. |
Rollback, with proof
At 08:00 on Tuesday every timer switched the site back by itself. I did the manual steps, then proved the store matched its pre-sale state, area by area.
| Time | Step |
|---|---|
| 08:00 | Theme timers switched back: normal ticker, hero and Shop All. Bundles back to full price. |
| 08:02 | Bundle and gift-packaging discount functions off, checked through the API after every click. |
| 08:11 | The client's free-bag offers set back to “combine with nothing”. |
| 08:13 | Loyalty pop-up back on. Sale collections unpublished, early-access link redirecting home. |
| 09:29 | 7 independent read-only checks, all passed: discounts, shipping (14 of 14 rates), carts (10 of 10), theme against pre-sale on 12 pages, catalogue and orders. |
| 14:49 | Order sweep: all 8 orders since the switch-off at full price with normal shipping. |

đź”’ Protected by NDA

đź”’ Protected by NDA
Lessons
- Read the data, not the plan. The biggest problem, a bundle discount that could never apply, came from reading the store, not the spec.
- Make the rules executable. Proof screenshots, Figma diffs, claims and "never touch live" held under pressure because tools enforced them.
- Test where the user is. Desktop previews hid a broken email, the Figma width hid a 360 px overlap and 1440 px QA hid a laptop-only bug.
- Next: merge each bundle into one cart line with a Shopify cart transform, which works without Plus, so gifts link to a bundle ID instead of label guessing.
More like this
Next case study
UK men's haircare brand
A haircare store rebuilt from Figma, then a Shopify Plus wholesale store

Jewellery brand, UK and NL warehouses
Stock sync monitor for a Shopify and 3PL warehouse setup

Own product, open source on GitHub
Giftwell: a gifting checkout built with Checkout Extensibility and Functions
Need something like this?
Tell me what's slow, broken or missing. I'll reply within a day with what I'd fix first.
[email protected]