ReturnSift

Comparison ยท 2026-12-05

Shopify Functions vs loyalty programs: the differences that actually decide it

Short answer: these two are not the same kind of spend, and the choice is rarely either-or for long. The decider is what each one moves.

Shopify Functions in practice

Where Scripts let a Plus store keep its pricing logic in one Ruby file, Functions split that logic into scoped units, one per job, each reading the cart through a GraphQL query and answering with instructions Shopify applies. Discounts, bundles, gateway ordering and delivery rules each get their own function.

A function takes a GraphQL input query describing the cart and returns JSON instructions. It never touches the page, which is why it is upgrade-safe where script tags were not.

Shopify Scripts stopped running on June 30, 2026, so discount and shipping logic that lived in a store's Ruby scripts had to be re-expressed as functions, usually one function per app rather than one file per store.

Loyalty programs in practice

Points, tiers and referrals are the visible parts. Underneath, a programme is a promise the store makes to its best buyers: come back and the second order costs less than the first did. The promise is kept at checkout, in the discount mechanics, which is where programmes succeed or quietly leak.

Unredeemed points sit on the books as a liability until they are redeemed or expire, which is why finance teams, not just marketers, get a say in the earn rate.

Redemption usually reaches checkout as a discount code or a Functions-based discount, so the programme's generosity is ultimately expressed inside the same discount rules as every promotion the store runs.

The difference that actually decides it

The decider is what each one moves. Shopify Functions is about the rules that price, bundle and block a cart. Loyalty programs is about whether a first buyer comes back for a second order. The practical order follows the pain: whichever problem is visibly costing orders this quarter goes first, and the second inherits a cleaner store when its turn comes. Reversing the order rarely breaks anything. It just spends the budget where the return is slower.

Where each one wastes money

Carrying every Script-era rule into functions unchanged is the standard mistake. A decade of accumulated discount rules includes promotions nobody remembers approving, and the migration is the one natural moment to delete them. Stores that skip the audit rebuild the mess on better infrastructure.

Launching a programme to fix a repeat-purchase problem the product caused is the expensive version of the mistake. Points cannot argue a buyer into a second order of something that disappointed them; they can only discount the orders of buyers who were returning regardless.

A check you can run this week

Before any programme work, pull the repeat rate and the time-to-second-order distribution. If the second order typically lands at ninety days, a programme with thirty-day point expiry is designed to disappoint exactly the buyers it claims to reward.

Related reading: Shopify Functions vs B2B on Shopify: the differences that actually decide it and Post-purchase upsells vs loyalty programs: the differences that actually decide it.

Frequently asked questions

What is the real difference between Shopify Functions and loyalty programs?

The decider is what each one moves. Shopify Functions is about the rules that price, bundle and block a cart. Loyalty programs is about whether a first buyer comes back for a second order. The practical order follows the pain: whichever problem is visibly costing orders this quarter goes first, and the second inherits a cleaner store when its turn comes. Reversing the order rarely breaks anything. It just spends the budget where the return is slower.

Which should a store pick first, Shopify Functions or loyalty programs?

The decider is what each one moves. Before any programme work, pull the repeat rate and the time-to-second-order distribution. If the second order typically lands at ninety days, a programme with thirty-day point expiry is designed to disappoint exactly the buyers it claims to reward.

What is the most common mistake with Shopify Functions?

Carrying every Script-era rule into functions unchanged is the standard mistake. A decade of accumulated discount rules includes promotions nobody remembers approving, and the migration is the one natural moment to delete them. Stores that skip the audit rebuild the mess on better infrastructure.

What is the most common mistake with loyalty programs?

Launching a programme to fix a repeat-purchase problem the product caused is the expensive version of the mistake. Points cannot argue a buyer into a second order of something that disappointed them; they can only discount the orders of buyers who were returning regardless.