How to Migrate Shopify Scripts to Functions (2026 Guide)

A practical, step-by-step walkthrough for moving discount, shipping, and payment logic off the dead Script Editor and onto Shopify Functions.
Every Shopify Plus merchant who ran Scripts is dealing with the same question right now: where did that logic go, and how do I get it back. The good news is the migration path is well defined. The bad news is most guides for it assume you have a developer on standby, which most stores don't.
This walks through the actual steps, including the route that doesn't require writing a single line of code.
What is the difference between Shopify Scripts and Shopify Functions?
Shopify Scripts ran custom Ruby code inside checkout, while Shopify Functions run compiled WebAssembly modules distributed through apps, and the two are not interchangeable. Scripts lived in the Script Editor and executed inline during checkout calculation. Functions live inside an installed app, get configured through the Shopify admin, and run server-side on Shopify's infrastructure in under 5 milliseconds, per Shopify's own Functions documentation. You can't copy-paste your way from one to the other. Everything needs rebuilding, either by a developer writing a new Function or by an app that already did that work for you.
Migration therefore breaks into three categories, matching what Scripts used to handle: product and order discounts, shipping rate logic, and payment method visibility. Most stores only ever used the first two, which is the part that matters for the rest of this guide. Shopify's enterprise blog post on Functions frames the shift the same way: fewer, more reliable extension points instead of open-ended script injection.
Step 1: Audit what was actually running
Before rebuilding anything, pull the Shopify Scripts customizations report from your admin, since it lists every customization that was active before the June 30, 2026 deprecation. Go to Apps → Script Editor → Replace Shopify Scripts. Shopify auto-generates this report and organizes it into Payment gateways, Shipping, and Product discounts sections, each with the original source file and a description of what it did, a process Shopify documents in full in its Scripts-to-Functions transition guide. Merchants working through this in Shopify's own community forum confirm this report is the fastest way to see what's actually still active versus what's just old and forgotten.
Export it as a CSV if more than one person needs to review it. Some of what's in there won't matter anymore, a seasonal promotion that already ended, a test Script nobody removed. Cross out anything you don't need to rebuild before moving to step two, because rebuilding logic nobody's using wastes the one resource you actually need to protect here: time before your next promotion goes out wrong.
Step 2: Decide between a custom Function and an app
A custom-built Shopify Function makes sense only when your logic doesn't fit any of the standard discount patterns, otherwise a Functions-based app from the App Store gets you there faster and free. Custom Functions require Shopify CLI, a language (Rust or JavaScript compiled to WebAssembly), and someone who understands GraphQL's structured input model, since Functions don't read cart data the way Ruby Scripts did. One migration checklist from an agency that's audited over 100 Plus stores recommends grouping old Scripts by theme first, then handling the "quick-win" group with an app before touching anything that needs custom code, which is exactly the order this guide follows.
For the other 80-90% of use cases, tiered pricing, BOGO, spend-threshold discounts, shipping rules by country or cart size, an app already has a Function built and deployed. You just configure it. Flowly: Discount Functions is one option built specifically to replicate what Scripts used to do: a visual canvas where you build the logic instead of coding it.
Step 3: Rebuild each rule on Flowly's canvas
Flowly rebuilds Scripts-style logic through three node types, Start, Condition, and Apply Discount, connected on a visual canvas that syncs directly onto a live Shopify discount when you save. Here's the mapping for a typical migration:
Open the app and click to build a new discount rule.
Add a Start node. Every rule needs exactly one.
Add Condition nodes matching what your old Script checked: cart subtotal, item count, line quantity, line price, product tag, product vendor, collection, variant SKU, delivery country, customer segment, customer tag, or order count. Chain multiples together with AND, OR, or NOT.
Add an Apply Discount node and choose the action: Percentage Off, Fixed Amount Off, Free Shipping, or Buy X Get Y.
Set the target: product line, order subtotal, or shipping option, matching whichever of the three discount classes your rule needs.
If the rule could overlap with another active discount, choose a selection strategy, First, All, Maximum, or Minimum, so you're not relying on Shopify to guess which one should win.
Save. An incomplete flow can't be saved, which catches broken logic before it ever reaches a live cart.
That last point matters more than it sounds. Old Scripts had no validation step. A bad edge case shipped straight to production and you found out from a customer service ticket. Flowly won't let an incomplete rule go live in the first place. Full documentation on how each node type behaves is in Flowly's docs hub, including the exact sync behavior between the canvas and the live Shopify discount object.
Step 4: Test before deactivating the old Script
Run a test order through the new rule before turning off the corresponding Script, since Flowly and the frozen Script can technically coexist during the transition window. Shopify's guidance in its transitioning-to-functions documentation recommends the same sequencing: build the replacement, confirm it behaves correctly, then deactivate what it's replacing. Post-mortems from merchants who skipped this step describe orders going through at the wrong price for weeks before a finance review caught it, which is the exact failure mode testing first avoids. Flowly applies discounts in real time as soon as a rule saves, so you'll see it live on a test cart within seconds, not after a deploy or a cache clear.
What does the migration timeline actually look like?
Most single-rule migrations from Script to Flowly take under 10 minutes once you know what the old Script was doing, with the audit step in Step 1 usually taking longer than the rebuild itself. For a store with a handful of discount and shipping Scripts, expect the whole project to run an afternoon, not a sprint. Stores with genuinely complex custom logic, multi-condition wholesale pricing tied to draft orders, for example, should budget more time and possibly a developer for the parts that don't fit a standard app. Shopify's own Functions overview is the right next stop if you land in that minority.
Shopify Scripts logic vs. its Flowly equivalent
Old Script logic | Flowly equivalent |
Tiered discount by cart subtotal | Condition: Cart Subtotal → Apply Discount: Percentage Off (Order class) |
BOGO on a specific collection | Condition: Collection → Apply Discount: Buy X Get Y (Product class) |
Free shipping for one country only | Condition: Delivery Country → Apply Discount: Free Shipping (Shipping class) |
VIP customer tag discount | Condition: Customer Tag → Apply Discount: Percentage Off |
Wholesale price break by quantity | Condition: Line Quantity → Apply Discount: Fixed Amount Off |
FAQ
Can Shopify Functions and Shopify Scripts run at the same time during migration?
They could before June 30, 2026, but not after. Since Scripts stopped executing entirely on that date, any store still relying on unmigrated Scripts logic is currently running without it, whether or not that's been noticed yet.
Do I lose my discount history when I migrate to a Functions app?
No. Discount rules built through a Functions app like Flowly sync onto the standard Shopify discount object, the same one Shopify's Discount Function API documents, so reporting and order-level discount data continue working exactly as before.
What happens if two discount rules could both apply to the same cart?
Shopify runs every active discount function independently, with a hard cap of 25 active discount functions per store, and no built-in awareness between them. That's why selection strategies exist: First, All, Maximum, or Minimum decide which candidate actually applies, or whether they stack, rather than leaving it to chance.
Is migrating to a Functions app permanent, or can I switch to custom code later?
You can switch anytime. Nothing about using an app locks your store out of building a custom Function later if your needs outgrow what a standard app covers.
If your Scripts customizations report is still sitting unread in your admin, that's the honest starting point. Download Flowly directly from the Shopify App Store and rebuild the first rule while the report is still open, or book a call with Subscribfy's team if your Scripts list is long enough that you'd rather talk through the migration plan first.

Book a meeting with our sales team now!
Create predictable revenue from the customers you already have.