Case 01 · JudgementShipped · anonymised

A free gift with a code.

A one-line ask that Shopify does not do out of the box, answered with a small app the client owns and no monthly fee.

Threshold
€49 basket
Function tests
7 of 7
Monthly fee
None
Out of stock
Guarded
App owner
The client

The case, step by step

One question decided the build.

A front panel of three modules: me, the client’s app and the store, joined by patch cables. The store asks for a gift from a 49 euro basket, only on a typed code. I type seven questions; when the answers come back, the third lights blue: the code must work at checkout, where a theme cannot run. My agents draw in the app’s three parts: a discount function, a checkout extension and its settings. Seven tests pass. At the checkout the code is typed and the gift line appears; when the basket drops under 49 euros, the gift is removed and a notice shows in the cart. I press my V key, the store goes live, and the code adds the gift at zero, marked Offert in the cart, with no remove button.

MECLIENT’S APPSTOREQUESTIONSCHECKOUTCARTFUNCTIONEXTENSIONSETTINGSTESTSDECIDES ITTHEME ✗7/7 PASSOFFERTGIFT REMOVED ✗LIVE
MECLIENT’S APPSTORECHECKOUTCARTFUNCTIONEXTENSIONSETTINGSTHEME ✗TESTS 7/7OFFERTGIFT REMOVED ✗LIVE

The ask

The brief was one line: a free product when the customer enters the code, from a set basket value. A natural promotion, and not how Shopify works out of the box. The gift app already on the store could not do it either: its gift offers have no code trigger, and it gifts on a code only as a checkout upsell, never in the cart.

Two things could go wrong: a code that fails at checkout on launch day, or one more app billed every month for one promotion.

What I asked first

Before I promised anything, seven short questions to the client, each with my recommendation on its own line:

  1. Q1What happens when the basket drops below the threshold?
  2. Q2Can the customer remove the gift?
  3. Q3Must the code work when typed at checkout? Decided the build
  4. Q4Does it combine with the running free-shipping offer?
  5. Q5Which product?
  6. Q6Which dates?
  7. Q7How should the offer be promoted on the theme?

The code had to work at checkout, and a theme has no hand there.

A theme script on a native discount would have been the light route, but it could not meet that. So the answer was a small custom app the client owns, with the theme changes around it.

How it was built and proved

Agents built on a copy first: the app on a test store, the theme changes on an unpublished copy of the live theme. The app has three parts, all run by Shopify on a Plus store, so there is no server to host and no subscription:

  • A discount function: the gift at zero from the threshold.
  • A checkout extension that adds or removes the gift on the code.
  • A settings block on the discount page, so the threshold and the product live in the admin, not in code.

Each point had a check before I looked:

  • The discount function passed its seven tests: over, at and under the threshold, a gift line on the wrong product, no settings.
  • The theme check found no new offence.
  • On a real checkout: no code, no gift; code and threshold reached, gift at zero; basket dropped, gift removed with a notice; free shipping still combined.
  • A late ruling added the gift running out of stock, built as its own guard and tested before launch.

Nothing went live without my yes.

What shipped

The promotion works the way the brief said it in one line. Type the code above the threshold and the gift is in the order at zero; drop below it and the gift leaves, with a notice. In the cart, the gift line is marked as offered with its code, with no price and no remove button. Three placements announced the offer: the announcement bar, a homepage tile and a collection banner.

The client owns the app, and there is nothing to renew.

Bring me your next change.

My first reply is questions, not a quote.