# Can you combine Shopify Functions with loyalty programs? Rules, timing and conflicts | RelevanceRail

Source: https://relevancerail.com/blog/can-you-combine-shopify-functions-with-loyalty-programs-rules-timing-and-conflicts-2026-12-04/

Product recommendations shoppers actually want

Published 2026-12-04


Yes, Shopify Functions and loyalty programs can run together, and plenty of stores do. The honest version is that they combine at exactly one layer, and the conflicts live there too: in the order the two systems evaluate, in what each one is allowed to change, and in which one wins when both want the same order. Get that layer right and the pair is unremarkable. Get it wrong and each tool looks broken while doing exactly what it was told.

## How Shopify Functions and loyalty programs actually meet

Functions are small programs, compiled to WebAssembly, that Shopify runs on its own backend at defined points: discount calculation, payment customization, delivery options, checkout validation and more. The developer writes a GraphQL input query, Shopify hands the function the resulting JSON, and the function returns operations for Shopify to apply.

A loyalty program tracks points or status against a customer account and pays value back on later orders. On Shopify it lives or dies on the customer account: earning, balances and redemption all have to resolve to the same identified shopper, at checkout as well as on the storefront.

## The rules that govern the combination

Discounts come in three classes, product, order and shipping, and which classes combine is a platform rule set on each discount, not something a function can override.

Points are a liability. Unredeemed balances sit on the books, and the breakage assumption a program launches with decides whether the margin math was ever real.

Only one product discount applies to a given line item in the standard model, so two percentage offers aimed at the same item do not stack; the larger one wins.

## Where the timing bites

Order of operations is the whole game here. Redemption at checkout is where programs earn or lose trust: a balance a shopper cannot spend without leaving checkout to copy a code behaves like a discount that mostly goes unused. And on the other side: A store can have at most 25 active automatic discounts, and a customer can apply at most five product or order discount codes plus one shipping code to one order. When those two sequences collide, the result is rarely an error message. It is a silent wrong outcome, a price, a balance or a message that is not what either tool promised on its own.

## What did not work when teams rushed this

Two failure modes repeat. The first is building the discount logic first and discovering the combination rules afterward, when the promotion design itself was the part that broke the platform rules. The second is the mirror image on the other side: launching earn rates copied from a competitor whose AOV and margin are nothing like yours, then discovering the liability at the first redemption sale. Both come from testing each piece alone and shipping the combination untested.

## A workable order to set it up

Set up loyalty programs first and verify it on its own orders. Then add Shopify Functions, run the same test cases again, and keep a dated log of which layer produced which outcome. Judge the pair on a full week, split by device and by new versus returning shoppers, never on blended numbers alone.

## Related reading on this site

Operators working on the same layer usually read [shopify functions what it is how it works and where it falls short 2026 12 01](/blog/shopify-functions-what-it-is-how-it-works-and-where-it-falls-short-2026-12-01/) [loyalty programs what it is how it works and where it falls short 2026 12 01](/blog/loyalty-programs-what-it-is-how-it-works-and-where-it-falls-short-2026-12-01/) [how to choose shopify functions the checks that matter before you commit 2026 12 01](/blog/how-to-choose-shopify-functions-the-checks-that-matter-before-you-commit-2026-12-01/) next. Each covers a neighbouring decision with its own evidence and its own failure modes.

## Frequently asked questions

Can you combine Shopify Functions with loyalty programs?

Yes, the two can run on the same store and the same orders. The work is in the interaction layer: evaluation order, which changes each system is allowed to make, and a test pass on real orders before the combination carries a campaign.

What conflicts show up most when Shopify Functions meets loyalty programs?

Silent ones. Each system works in isolation, so the failures are wrong prices, missed balances or duplicated messages on combined orders rather than errors. Testing the pair together, not separately, is what catches them.

Which should be set up first, Shopify Functions or loyalty programs?

Set up loyalty programs first, verify it alone, then add Shopify Functions and rerun the same cases. Adding both on the same day leaves you with no way to say which layer caused a bad outcome.

How do you measure whether the combination is working?

Split the read by segment and device, compare a full week against the week before, and track the specific outcome the pair was bought for. Blended conversion rate hides exactly the orders where the two systems interact.
