orderCreate discount limitations

The orderCreate mutation is pretty nice since you can do most things in one API call. However, it fails at one of the most basic things: discounts.

Why does it allow to only set a single discount per order? What if I have many? What if there are line item discounts?

These cases are covered in draftOrderCreate for example.

Is there any reasoning behind this, or is it something that will be developed in the future? From my POV, I would like to use the mutation since I could create the order in one go (one API call), but I think I have to stick back to first creating the draft, then doing the rest… making it into an order, fulfillments, payments …

Hi Stefan,

Thanks for raising this and describing your usecase. I’ve reached out to the relevant team to confirm this limitation and see what they recommend. Will update here when I learn more.

@Liam-Shopify any news on this?

Hi Stefan,

Thanks for the reminder on this - I connected with the product team and the restriction for applying one discount with orderCreate is a constraint that was inherited from the REST API. Are you seeing many cases where you’d want to have more than one discount applied?

hi @Liam-Shopify. Definitely. But not just this use case, I believe the functionality should have some sort of parity with draftOrderCreate, no?

Or another way to put it, as a dev, why would I choose orderCreate when is not as robust as draftOrderCreate?

Thanks for raising this, @Stefan_Buciu! We really value your feedback on the docs, and recently updated the orderCreate reference to address your feedback.

We included a mention about the limitations related to applying discounts with the orderCreate mutation. Additionally, we’ve enhanced many of the descriptions on that page to share more context about how the mutation works and highlight other related mutations that you can use.

Hope you find the info helpful! Let us know if you have more feedback or questions about the page.

2 Likes

Hi @Michelle-Shopify and @Liam-Shopify. It’s been 5 months since this request. Is there any progress on adding multiple discount support on orderCreate? If no, why? It seems like a somewhat simple change. But the limitations are pretty huge, if items have different discounts, this makes orderCreate unusable.

One more issue with the discounts for orderCreate. The available discount options do not allow you to set an order level discounts.
If you add a itemFixedDiscountCode or itemPercentageDiscountCode, the discount amount gets evenly distributed for all line items.

There is NO WAY to add an order level discount when using orderCreate. Not even the orderEdit* mutations allow this.