The Discounts Allocator Function API, available only through the Discounts Allocator developer preview, has been removed and won’t be released. The developer preview is closed. Most developers don’t need to take action. The one exception is an app that still declares the purchase.discounts-allocator.run extension target.
What changed
The Discounts Allocator Function API let an app control how discounts were allocated across cart lines.
Since the preview opened, native control over how discounts apply has improved, including stacking multiple product discounts on the same line. We believe the majority of use cases are now served by these mechanisms, so it no longer makes sense to carry the Discounts Allocator API forward as a long-term Function API. Discount allocation stays with Shopify’s platform logic.
This change includes:
- The
andmutations are removed from the unstable version of the Admin GraphQL API. They were never available in a stable version. - Functions registered during the preview are unregistered for you.
- The API reference and the “Build a discounts allocator” tutorial are removed from https://shopify.dev.
To continue creating discounts with a function, use the Discount Function API described in the Discounts developer documentation at https://shopify.dev/docs/apps/build/discounts.
Who’s affected
- Apps that participated in the Discounts Allocator developer preview and registered a Discounts Allocator Function.
- Apps whose configuration still declares the
purchase.discounts-allocator.runextension target.
Apps that never used the Discounts Allocator Function API or its extension target aren’t affected and don’t need to change anything.
Action required
If your app declares the purchase.discounts-allocator.run extension target, remove that extension from your app configuration.
Until you remove it, shopify app deploy fails for the entire app, including changes to your other extensions, with API not found for target: purchase.discounts-allocator.run. Existing app releases remain installable, but their Discounts Allocator Functions no longer run. Other app functionality is unaffected. The failure happens the next time you deploy.
After you remove the extension and redeploy, shopify app deploy succeeds and your other extensions continue to update as expected.
Related docs
- Learn how to build discounts with the Discount Function API in the Discounts developer documentation: https://shopify.dev/docs/apps/build/discounts