Best practices of creating Discounts through Functions/Extensions

Best practices of creating Discounts through Functions/Extensions

kongadde
Shopify Partner
1 0 1

Hello!

 

I am trying to create an app that should provide different types of discounts to merchants. E.g. quantity discounts, bundle discounts, etc. As far as i can tell i can either do this in two different ways:

 

1.

Through the GraphQL discountAutomaticAppCreate. This seems to be the perfect approach, as the discounts i am creating will be automatically applied to the users cart, and it works very closely with Shopify's ecosystem. However it seems that if i take this approach i can quickly reach the limit of only 5 discounts being able to be used in a single store. And that if a merchant already has 5 of this type of discounts, they wont be able to use my app.

 

2.

Through creating a bunch of specific discount codes, and then applying those codes directly to the cart via cartDiscountCodesUpdate. Though what i am worried about here is that i need to add listeners to the cart, and that there will be a million edgecases since i have to check for any updates to the cart to see if a discount code needs to be applied or removed.

 

What approach would be best? Are there any other approaches that i am missing that could work better?

Replies 0 (0)