Bulk operations for order create

I have a large number of orders (~1M) that I am trying to import. Currently I am trying to do this with the GraphQL Admin API, checking the throttleStatus to calculate timeouts before retrying requests. I’m also backing off several seconds at a time when running into [{ field: null, message: 'Too many attempts. Please try again later' }] errors. With these measures in place I’m getting about 5 orders per minute created and this migration would take weeks to complete. :face_with_diagonal_mouth:

It feels like I’m not doing something correctly, or at least it seems like there has to be a better way to handle this.

First, what are the specific resource limits for order creation? I’ve seen mentions of 5 per minute in community comments. The official docs only mention limits for creating variants. In my testing I always have available points in the bucket, but I still get rate limited. The store I’m working on is not on Shopify Plus for additional context. Shopify API rate limits

Second, I tried reworking things to use bulk operations, but I was getting this error: [{"message":"You must use an allowed mutation name.","field":["mutation"]}]. The orderCreate mutation works when made as a regular standalone mutation. I wasn’t sure if maybe I was writing the mutation incorrectly or orderCreate was not allowed for bulk operations. Is that the case? The way the documentation is worded it reads like the listed mutations can only be done one at a time not necessarily that those are the only valid mutations. Bulk import data with the GraphQL Admin API

What is the recommended way to import a large number of orders from another system in a reasonable timeframe?

1 Like

Follow up:

I should have realized this sooner, but the reason I’m having this issue is because the store I’m working on is still in partner development mode.

These two community posts were where I found out that was a hard limit on order create.

Hey @ALaskey

Based on the limit you are running in to, it sounds like you may be using a development store. This is noted in our REST documentation here

Usage notes:
If you’re using this endpoint with a trial or Partner development store, then you can create no more than 5 new orders per minute.

For bulk operations, only the mutations currently listed in the document you shared are compatible.

The best option here is to plan for the order migration once the shop is on a live plan so that the standard API rates will apply and it won’t be throttled.

Good call out on the docs, I’ll pass some feedback on to our docs team as that would be useful to note in our Graphql docs as well.

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

We included a note about the limit of five new orders per minute for trial or development stores. 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