Hello,
We recently received a request from a merchant who wanted to create a discount based on the number of orders a customer had placed. Customers who had placed at least a specific number of orders would receive a special discount.
The following was possible using the Shopify Functions API:
- Creating a discount based on
Customer.numberOfOrders
- Setting
appliesOnSubscription
andrecurringCycleLimit
However, it seems that when a recurring order comes in, the discount is not recalculated for the new order.
Example:
- Merchant offers a discount to customers who have ordered at least twice
- A customer who has ordered once places a subscription order
- The merchant expects that, though the first payment wouldn’t be discounted (since the customer has not yet ordered twice), the recurring payments would be discounted.
- What actually happens: Neither the first payment nor the recurring payments receives any discounts.
It seems that the discount is only calculated at the time of the first order.
This led to the merchant uninstalling, so we’re not sure whether they were able to find an alternative solution.
This leads to my questions:
- Can Shopify Functions discounts be recalculated automatically on recurring orders?
- If so, how can we enable this functionality?
Thanks,
Tobe