Shopify Functions Discounts removed when a custom sale is added to the POS cart

Shopify Partner
289 14 79

Hi there,


I'm reaching out because I've come across an issue with my app that may affect others using the Discounts Functions API with POS Pro. I'd love to know if anyone else has experienced this, and if there might be a bigger problem that needs addressing.


When a custom sale is added to a POS cart, it seems to automatically remove any automatic discounts calculated through the Shopify Functions API, unlike Shopify's built-in automatic discounts which remain applied.





Steps to Reproduce:

  1. Add a product to the POS cart.
  2. Apply an automatic discount using an app that utilizes the Shopify Functions API.
  3. Add a custom sale item to the cart.
  4. Notice the previously applied discount is removed.

This behavior points to a possible integration issue between Shopify POS and Shopify Functions.


What I've Done:

  • Confirmed through testing that my app calculates discounts correctly. I looked at the Shopify Functions logs, and saw my discount app's runs were successful, and did not crash with an error.


Is anyone else facing this issue?


Thank you for your time and help,


Replies 3 (3)

New Member
4 0 0

Same Problem here.


Shopify Partner
289 14 79

Update: The same issue applies when a custom item is added to a draft order, and the user tries to use "Apply all eligible automatic discounts."

If a "CustomProduct" is in the cart, the discounts calculated by Shopify Functions are completely ignored.


I've attached a screenshot of the output from a function run on a draft order where a "CustomProduct" was in the cart. As you can see, the output is well-formed and contains discounts, but none were applied to the order:




1 0 0

We're also having this problem. 90% of our orders are custom items so this problem makes for a fair amount of unnecessary work. Hoping Shopify can find a solution!