Blog

I'm calm about Black Friday. Here's why.

6 min read Artie
Shopify Shopify Functions Ecommerce Custom Development

Short answer: Black Friday goes smoothly when the hard thinking is done well before the day. This year I built custom discount rules for my clients that handle their specific pricing, can be scheduled in advance, and can be previewed before they go live. Across the clients I look after, I’m expecting almost AU$1 million in sales over the Black Friday period. That’s an estimate based on last year’s results, with sales trending up year on year, not a final result yet. What I can already say is that this has been the calmest run-up I’ve had.

Why is Black Friday so stressful for stores?

Most Black Friday pain comes from the same place: the discount rules are more complicated than the tools used to run them.

A real sale rarely looks like “20% off everything”. It looks like this: some product ranges get a deeper discount, some are excluded entirely, the percentage differs by country, buying more unlocks a better rate, and certain combinations of products get their own deal. Shopify’s built-in discounts cover a lot, but not all of that.

So people patch. A stack of discount codes, a spreadsheet of who gets what, a few manual price changes at midnight, and someone watching the store all weekend in case something is wrong. It works until it doesn’t, and the day it doesn’t is the most expensive day of the year.

What do I mean by a custom discount function?

A Shopify Function is a small piece of code that runs inside Shopify’s own checkout. A discount function looks at the cart, applies your rules, and tells Shopify what each item should cost. Because it runs inside checkout, it isn’t a separate app bolted on the side, and there’s no extra page for shoppers to wait on.

The rules are written for the business. That means the sale follows how the business actually trades, rather than the business bending to fit the tool.

What does that look like in practice?

I’m keeping the details of each client’s setup to myself, but here are the kinds of things these discounts now do on their own:

  • Different rates for different products. A range can have its own percentage, with specific products carved out when they need different treatment.
  • Different rates for different markets. A shopper paying in one currency can get a different offer from a shopper paying in another, so each region can be priced for what makes sense there.
  • Rewards for buying more. Buy a little and get one rate, buy more and get a better one, with the cart working it out as items are added.
  • Combination deals. Two or three kinds of product in the same cart can trigger their own discount.
  • Sensible exclusions. Items that should never be discounted, such as gift cards, are left alone without anyone having to remember.

Each of these used to be a decision someone had to make and apply by hand. Now it’s a rule that’s written once, checked, and left to run.

Why does that make Black Friday smoother?

The rules are set weeks ahead

The sale is configured in advance, with a start and an end time built in. Nobody has to be awake at midnight to switch it on or off. That alone takes a surprising amount of pressure out of the weekend.

I can see it working before shoppers do

The hardest part of any sale is knowing the right price will show up at checkout. I build in a way to preview a scheduled sale before it’s live, so the team can click through the store and see exactly what a shopper will see. Problems get found on a quiet Tuesday, not in front of customers.

The price on the page matches the price at checkout

Nothing erodes trust faster than a crossed-out price that doesn’t match the total. I make sure the sale price shown on product pages and collection pages follows the same rules as checkout, so shoppers see what they’ll pay. The checkout is always the final word, and the page display is just a faithful preview of it.

It fails safe

If a setting is half-finished, the discount applies nothing instead of guessing. I’d much rather a sale not apply and get flagged than quietly give away the wrong margin. A missing discount is easy to fix. A wrong one across thousands of orders is not.

Someone who isn’t a developer can run it

Each discount has a settings screen inside the Shopify admin. The people running the store can adjust percentages, groups and dates themselves, without waiting on me. I wrote the rules once, but the day-to-day control sits with them.

It’s tested, so it doesn’t surprise anyone

Discount rules are the kind of thing that look fine until a cart hits an odd combination. These are tested against those odd carts ahead of time, so the edge cases are found before Black Friday does it for me.

Is this worth it for a smaller store?

Not always. If your sale is a flat percentage on a collection, Shopify’s own discounts or a good app will do the job, and you should use them. I’ve written about when an app makes sense and when a custom build does, and about free shipping rules by collection.

Custom starts to pay for itself when:

  • Your pricing differs by product range, market or quantity in ways the standard options can’t express.
  • You’re already running the sale with spreadsheets, manual changes or a pile of codes.
  • A single wrong price on your biggest day would cost real money.
  • You’d rather spend the weekend watching sales than fixing prices.

If you’re still relying on Shopify Scripts for any of this, note that they’re being retired, and I’ve covered what that means and how to move to Functions.

When should you start preparing for next year?

Now, honestly. The best time to build this is the quiet months, when there’s room to test properly and nobody is waiting on it. The stores that feel calm in November are usually the ones that did the work in winter and spring.

If your sales rules have outgrown your tools, tell me what your checkout needs to do and I’ll help you work out the simplest way to get there.

Frequently asked questions

What is a Shopify discount function?

A Shopify Function is a small piece of code that runs inside Shopify's own checkout. A discount function decides which items in a cart get a discount and by how much, using rules written for your business instead of the fixed options in the admin.

Do I need Shopify Plus to run custom discount logic?

It depends on how the function is delivered. According to Shopify, stores on any plan can use public apps that contain Functions, while custom apps containing Function APIs are for Plus stores. Check Shopify's current documentation for your plan before you design around it.

Can a discount be scheduled to start and stop on its own?

Yes. Shopify's automatic discounts have a start and end date, so a sale can go live and finish without anyone logging in at midnight.

Why not just use a discount app?

If your rules are standard, an app is usually the quickest route. If your rules differ by product group, market or quantity in ways apps can't express, a custom build lets the discount match the way you actually trade.


Richie Tyler, Artie

I've been building websites and systems for businesses that sell things since 2005.