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.

1 Like