Discussing APIs and development related to customers, discounts, and order management.
Hi,
I'm looking for a way to apply a custom discount (fixed amount) depending on how many loyalty points a customer has.
Here is the step-by-step process:
Which API and method are ideal for this scenario?
I have found applyCartDiscount method which seems exactly what I'm looking for but not sure can I use it in Storefront API?
Thank you.
Solved! Go to the solution
This is an accepted solution.
Hi Marko82,
This could be a good usecase for working with Shopify Functions, to create custom logic that would apply during the checkout, and there are some fucntions that specifically apply discounts. A general process could be:
Hope this helps!
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
This is an accepted solution.
Hi Marko82,
This could be a good usecase for working with Shopify Functions, to create custom logic that would apply during the checkout, and there are some fucntions that specifically apply discounts. A general process could be:
Hope this helps!
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
Hey Liam,
thanks for detailed instructions.I will explore that option.
Best,
Marko
Hi @marko82,
There is already an app to solve the solution you had. Loloyal: Loyalty & Referral , provides Points, Rewards, Referrals, VIP Tiers, and more loyalty programs.
You can set up your store's points program. After that, customers can earn points after placing an order, and reward discounts after redeeming points.
Hope it helps.