Hi Shopify Devs & Partners,
We’re a public app that has been live already powers product-level percentage/amount discounts for thousands of stores using the classic Product Discount Functions + discountCodeAppCreate (appDiscountType: PRODUCT).
All coupon configuration is stored in a single discountNodes metafield on the shop (JSON array of rules). Merchants have created hundreds/thousands of active automatic and code-based product discounts through our app.
Now the business wants to roll out a highly requested feature:
Allow the same coupon to give both
- a %/amount off products (cart lines) AND
- free shipping or a shipping % discount
…all in one code.
We know this is only possible with the new 2024.07+ Discount APIs that support multiple discountClasses: [PRODUCT, SHIPPING] (or even ORDER) on the same discount node, powered by the new combined Discount Function.
The big constraints:
- Existing coupons must keep working exactly as before if the merchant doesn’t turn on the shipping option.
- When the merchant enables “also give free shipping”, the same code should apply both discounts.
- Zero forced data migration — we cannot ask merchants to delete/recreate thousands of live coupons.
- Must work for both automatic and code-based discounts.
- Gradual rollout: merchants should be able to enable the shipping feature on a per-coupon basis.
Current questions we’re trying to solve (would love real-world input from anyone who has already done this):
-
Can we safely run both old product-only discount nodes and new combined (PRODUCT + SHIPPING) nodes side-by-side on the same shop without causing duplicate product discounts?
-
If we go hybrid (some coupons stay on old product-only function, some migrate to new combined function), how do we reliably prevent double-dipping on the product discount when both nodes match the cart?
-
Is there a clean way to update an existing product-only discount node to a combined one (changing functionId + adding discountClasses) or does Shopify block that?
-
For code-based discounts (
discountCodeAppCreate), does the new API fully supportdiscountClasses: [PRODUCT, SHIPPING]the same way automatic discounts do? -
Anyone successfully running a mixed environment (old product functions + new combined functions) in production? Any gotchas with discount ordering, combinesWith, or performance?
-
Bonus: what’s the smoothest way to evolve our metafield JSON schema to support optional shipping rules while staying 100% backward compatible?
Example of current stored rule (product only):
{
"resourceType": ["all"],
"discountType": ["percent"],
"couponRules": [{"minimumValue":"100","discountValue":"20"}]
}
We’d love something like:
{
...existing fields,
"shippingDiscount": {
"type": "FREE_SHIPPING", // or "PERCENT" with value
"minimumValue": "150"
}
}
Any battle-tested patterns or war stories would be gold! Especially from apps that have already shipped combined product + shipping discounts without forcing merchants to start over.
Thanks in advance!