Automatic discounts for draft orders

Solved
tcmleung
Excursionist
13 2 7

I created an automatic discount (20% off for all products) and it is active.

Then I used draft_orders API to create a draft order. However, the automatic discount did not apply to the draft order.

Then I completed the draft order, the generated order also was not applied the automatic discount.

So just wanted to know if it is possible to apply automatic discounts to draft orders or apply it when complete a draft order?

Accepted Solution (1)

Accepted Solutions
tcmleung
Excursionist
13 2 7

This is an accepted solution.

Thanks for your reply.

Yet, my App needs automation for all steps.

I found that the only solution is to use Storefront API instead of Admin API to create a checkout and apply discount code.

https://shopify.dev/api/storefront/reference/checkouts/checkoutdiscountcodeapplyv2

 

View solution in original post

Replies 2 (2)
oscprofessional
Shopify Partner
11467 1801 2307

Hey,

Refer this URL, you will have an idea about your solution.

https://bigbusinessinside.com/18907/shopify-draft-orders-discount-codes-solved/ 

hope this will work for you!

 

Please Like and Accept Solution. Free website audit to grow your business Chat on WhatsApp | Email: pallavi@oscprofessionals.com | Skype : oscprofessionals-87 | Hire us | Expert Site Speed Optimization | Performance Site Audit | Shopify Private App | Custom Theme Development & Modifications any Shopify Theme | Shopify SEO | Digital Marketing
tcmleung
Excursionist
13 2 7

This is an accepted solution.

Thanks for your reply.

Yet, my App needs automation for all steps.

I found that the only solution is to use Storefront API instead of Admin API to create a checkout and apply discount code.

https://shopify.dev/api/storefront/reference/checkouts/checkoutdiscountcodeapplyv2