Discount Function API not called just for one store - no logs in partner dashboard

Discount Function API not called just for one store - no logs in partner dashboard

topshop
Shopify Partner
69 5 9

Hi, we have a Discount Function app and it works on every store except one. The app itself works - users are able to create edit discounts. But on the storefront, we get an error "Enter a valid discount code or gift card" even though it's valid and active.

 

Things to note:

  • The error says "Enter a valid discount code or gift card" instead of just saying "Enter a valid discount code". 
  • The store has 50 other product / order discounts created natively and with other apps. I know there's a limit to number of "Automatic" discounts, but these are all "Code" discounts. Maybe there's a limit to how many active code discounts a store can have as well?
  • On the Partner dashboard, the discount function call is not getting logged just for that store. We don't get an error or success - just no logs. Again, just for that store.

Can someone help with this please?

 

topshop_0-1720016867336.png

 

Discount Bot: Sitewide Sales - How to Exclude Products from Shopify Discounts: A Step-by-Step Guide
- Instantly create discounts for your entire product catalog with a single discount
- Exclude any products / collections / already on sale items for which the discounts should NOT apply
- Built using Shopify Functions for native performance and feel
Replies 2 (2)

Liam
Shopify Staff
2873 312 818

Hi Topshop,

 

From your description I'm thinking that this issue could be due to how other apps are implemented that also use the discount function API. ~50 code discounts is relatively low, so there wouldn't be an issue limit around the number of code discounts. If there are no logs appearing that also could suggest another app is preventing yours from communicating with the store to create a discount. 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

topshop
Shopify Partner
69 5 9

@Liam , thanks for getting back. Even though there are only ~50 code discounts, some of them have 50,000 bulk codes each with a total of around 300,000 active codes. Would that be causing this issue?

 

Please note that the merchant was able to successfully install the app and create a discount code using our app. The issue is only that the backend function is not getting triggered. As we (app developers) don't control that part of the discount would another app still be able interfere with that process?

 

It just looks like the function is not getting triggered which should be unrelated to the app being installed because the functions run on Shopify's backend, correct? Are functions installed in the backend of each store and somehow this app's function was not installed even though the app itself was installed successfullly?

 

Also, do you think I ask the merchant to uninstall the app and re-install it to see if it successfully installs the function for their store?

 

Discount Bot: Sitewide Sales - How to Exclude Products from Shopify Discounts: A Step-by-Step Guide
- Instantly create discounts for your entire product catalog with a single discount
- Exclude any products / collections / already on sale items for which the discounts should NOT apply
- Built using Shopify Functions for native performance and feel