Introducing Stackable Discounts Feature – Looking for Insights on Scalability with Shopify’s Discount APIs

Hello Shopify Community :waving_hand:,

We’re building a Shopify app feature that introduces stackable coupon discounts – the ability to combine existing product discounts with an additional coupon discount.


:light_bulb: What do we mean by “stackable discounts”?

Normally in Shopify, applying multiple discounts on the same product has restrictions. Our feature allows an extra coupon discount to be combined with an existing product/collection discount.

Example Use Case:

  • Product P1 has a 20% off automatic discount (say from collection rules or product-level discount).

  • A customer also applies a 10% coupon discount.

  • Instead of overriding, both discounts are stacked → Final discount = 30% off on P1.

This creates more flexibility for running promotions (e.g., seasonal sales + loyalty coupons, bulk discount + VIP coupon, etc.).


:hammer_and_wrench: How we built this (current approach)

  • We’re fetching and validating metadata from variant metafields + discount node metafields.

  • Apply logic to check conditions such as:

    • Quantity thresholds

    • Customer group eligibility

    • Specific discount type

  • Once validated, we’re combining both discounts and passing the final aggregated discount back.

Because there are so many conditions (qty rules, customer groups, collection-based rules), the logic is becoming complex and hard to scale.


:construction: Current Challenge

We’re using the deprecated product discount Shopify function for implementation. Given the deprecations, we’re worried about how to:

  1. Make this feature scalable in the long run.

  2. Ensure we can support stackable discounts across multiple rules (collections, customer tags, etc.).

  3. Avoid conflicts and ensure Shopify’s checkout and pricing remain accurate.


:magnifying_glass_tilted_left: What we’d like your insights on:

  • Has anyone implemented similar stackable discount logic with the new Shopify Discounts API (Functions)?

  • Does the new Discount API / Functions framework support combining discounts at runtime (instead of overriding)?

  • Any best practices for handling multiple conditional rules (qty, customer group, collections) in a scalable way within Shopify Functions?

  • Is there a recommended way to replace deprecated product discount functions for this scenario?


:white_check_mark: Example Scenarios We’d Like to Support Going Forward

  1. Collection-based sale + Coupon → Ex: All Shoes 15% off, customer applies loyalty coupon 5% off → Final discount 20%.

  2. Volume discount + Coupon → Ex: Buy 3 items get 10% off, plus coupon 5% = 15% off.

  3. Customer group rules + Coupon → Wholesale customer group gets 25% base discount, plus time-limited coupon adds 10% = 35%.


We’d love to hear from both developers who’ve worked with the new Discount Functions, and Shopify staff:

  • Is this achievable with the new Discount API support?

  • How would you suggest architecting such a system for scalability and long-term compatibility?

Thanks in advance :folded_hands: — your feedback will help us refine and build this out in a way that benefits everyone running layered promotions on Shopify.