Scripts is gone. What a Functions migration actually involves.
Why this is not a find-and-replace
Scripts were Ruby, edited in the admin, run on every cart change with few limits. Functions are compiled to WebAssembly, deployed as part of an app, and run inside checkout under strict budgets for execution time and instruction count. Logic that looped over large carts, looked things up at runtime or accumulated years of special cases usually cannot be translated line by line. It has to be redesigned to fit.
Step one: find out what you actually have
Most Plus stores we audit have more scripts than anyone remembers, often written by a previous agency. The inventory lists each script, what it does in plain language, who in the business depends on it, when it last changed an order, and which apps overlap with it. A third of scripts typically turn out to be dead or duplicated by an app.
Step two: write the rules down before writing code
Each surviving rule becomes a one-page specification with test cases: this cart, this customer, this market, this result. Marketing and finance approve it. This is also the moment to decide what stacks with what, because Functions declare their discount combinations explicitly and Scripts often left that implicit.
Step three: build Functions that fit the limits
Discount, delivery customisation and payment customisation Functions cover the three script types. Thresholds, tiers and eligible collections move to metafields so marketing can change them without a deploy. Anything that needs external data is precomputed and stored where the Function can read it cheaply.
Step four: replay, do not hope
We export the last twelve months of orders and run their carts through the new Functions, comparing totals line by line. Every difference is either a bug or a decision you took in step two. The migration is finished when the diff is explained, not when the code compiles.
Step five: release market by market
Functions go live for one market or segment first, with discount usage and payment success watched daily, then the rest. Documentation per Function and a short session for the promotions team close the project.
What to do this week
- Confirm what is actually applying at checkout today. The free readiness audit includes a Scripts dependency check.
- Ask whoever runs promotions which rules they rely on. Compare that list with the inventory.
- Decide whether a discount app covers your standard patterns, and keep custom Functions for the rules that are genuinely yours.


