What we have seen in Shopify Plus audits is this: discount and checkout logic often survives longer than the strategy that created it. A Script written for one promotional calendar becomes part of the store’s nervous system. Years later, nobody wants to touch it because nobody knows what might break.
Shopify Functions are the right replacement path for many of those rules, but the migration should not be treated as translation. It is a chance to remove old logic, simplify promotions, and rebuild only what the business still needs.
Keyword decision: primary keyword Shopify Functions migration; secondary intents include Shopify Scripts migration, Shopify Functions discounts, Shopify payment customisations, and Shopify Plus checkout logic. Search intent is technical implementation with commercial risk. This article supports Shopify Plus and B2B and Apps, Integrations and Automation.
Contact StoreBuilt if your Shopify Plus store needs discount or checkout logic reviewed.
Table of contents
- The short version
- What Shopify Functions are
- What to migrate
- What to remove
- QA scenarios
- Anonymous StoreBuilt example
- Final StoreBuilt point of view
The short version
Do not ask a developer to “convert the Scripts”. Ask the business to re-approve the rules.
For each Script, document:
| Rule | Owner | Commercial purpose | Current value | Replacement |
|---|---|---|---|---|
| Tiered discount | Ecommerce | Increase AOV | Still useful | Discount Function |
| Hide shipping method | Operations | Avoid invalid delivery promises | Still critical | Delivery customisation |
| Block payment method | Finance | Reduce risk on selected carts | Needs review | Payment customisation |
| Free gift logic | Marketing | Campaign mechanic | Seasonal only | Native discount or app |
This turns the migration into a decision register rather than a code archaeology exercise.
What Shopify Functions are
Shopify Functions let developers customise backend commerce logic that runs on Shopify infrastructure. They are designed to be performant, secure, and compatible with Shopify’s modern checkout foundation.
The relevant use cases include:
- product, order, or shipping discounts
- delivery option customisation
- payment method customisation
- cart and checkout validation
- fulfilment and routing logic where supported
The important difference from legacy Scripts is governance. Functions are part of a more structured app and extension model. That makes them better for long-term maintainability, but it also means teams need clearer ownership.
What to migrate
Migrate rules that still protect margin, reduce operational errors, or improve conversion.
Good candidates:
- volume or tiered discounts that sales teams actively use
- B2B payment or shipping rules
- postcode, product, or basket-based delivery logic
- rules that prevent invalid carts
- promotional logic that cannot be handled safely with native discounts
Before rebuilding, check whether the rule can now be handled by a native Shopify feature or maintained app. Custom Functions should be used where they create clear value, not where they simply preserve old habits.
What to remove
Remove rules that are undocumented, duplicated, obsolete, or too fragile to justify.
Common examples:
- old campaign discounts still running in background logic
- customer-tag rules for segments that no longer exist
- shipping exclusions copied from a previous carrier setup
- payment restrictions that finance no longer needs
- free-gift logic that merchandising stopped using months ago
Every unnecessary rule creates future QA burden. Simpler checkout logic is usually more profitable than clever checkout logic.
QA scenarios
Test the migration with realistic baskets, not only happy paths.
| Scenario | What to check |
|---|---|
| Discount threshold just below and above the rule | Correct discount state |
| Mixed product types | No invalid discount or delivery behaviour |
| Gift card plus discount | Margin and reporting rules hold |
| B2B account | Payment terms, PO rules, and price lists behave correctly |
| UK remote postcode | Shipping options remain accurate |
| International market | Currency, tax, and delivery logic do not conflict |
| Subscription item | Subscription disclosure and discount rules are valid |
After launch, monitor real orders for the first week. Look for unexpected discount values, support tickets, fulfilment exceptions, abandoned checkouts, and finance reconciliation gaps.
Anonymous StoreBuilt example
One Plus store had a legacy discount Script that had become impossible to reason about. Marketing believed it powered current campaigns. Finance believed it protected margin. Operations thought it controlled shipping.
The audit showed three rules were obsolete, one could move to native discounts, and one genuinely needed a Function. The win was not just cleaner code. It was shared understanding of the commercial rule.
Final StoreBuilt point of view
Functions migration is not about preserving every old checkout behaviour. It is about deciding which rules deserve to exist in the next version of the store.
StoreBuilt’s view is simple: if a rule cannot be explained, owned, tested, and measured, it should not be rebuilt blindly.
For Shopify Functions planning, Contact StoreBuilt.