How do Shopify order numbers get generated?

Shopify order numbers are generated using a sequence. When you first create a brand new store that number starts as 1001. Meaning the first order you create will be created with an order number of #1001. The next order that is created will be #1002 and so on. This is something that we do not control as app developers. Shopify always generates order numbers using a sequence and it's not something we can override. However, when you import orders you can import the order with your own order number.

Importing Orders With Your Own Order Number

There are situations where you may want to import orders with your own order number. You may be importing orders from Ebay or Amazon or maybe you ran a successful Kickstarter or Indiegogo campaign. If this is the case and you'd like to import your orders with the order number generated from the external service, this isn't a problem. We can defiantly support this. However, you should still understand how this works and what will happen when importing your orders.

If you decide to import your orders with your own order numbers, Shopify will still increment the sequence they use behind the scenes. The first thing to understand is Shopify has two fields, the order name and the order_number. The order name is what you see when you import your order. The order_number is a field associated with the order but is not displayed. Shopify allows app developers to write to the order name field, however the order_number field is not writable and the field is auto-populated by Shopify.

The order_number field is the field that Shopify uses for the sequence. If you do not provide the order name field on import (we map this to the order_number field on the Order Details tab to prevent confusion. The order name and order_number concept confuse many merchants) Shopify will add the value generated by the order_number. However, if you provide an order name (again mapped to the order_number on the Order Details tab) your order number will be used and displayed on the Shopify admin. This is why the order_number sequence is always incremented.

Let's say you've taken online orders already and your order number is at #1080. You had a bunch of orders come in from Amazon. Now you want to import them into your store but you're going to use the Amazon order numbers. The order numbers you are going to import are AMZ-10, AMZ-20. When you import your orders, you use the order numbers from Amazon so now you have two new orders in your Shopify store; AMZ-10 and AMZ-20. The next order that comes in from your Shopify store will be #1083. The reason for this is that you've added (imported in our case) two new orders. Shopify incremented the order_number sequence but didn't use the order_number as the order name since you provided it with your import.

Importing Orders While Letting Shopify Generate The Order Number

This is pretty straightforward. If you decide to use the Shopify will generate order number checkbox on your data mapping, Shopify will use the order_number generated as the order name. This means your orders will display the order number in the sequence that Shopify generated.

Important Reminders

The order numbers can generate confusion because the sequence is always incremented. There are two very important things to remember when importing orders:

  1. Since the sequence is always being incremented, if you import orders using your own order numbers, new orders may not be in order. If having every order number in perfect order is important to you, remember if you import orders with your own order numbers, the Shopify order_number sequence WILL be out of sync.
  2. We recommend customers run tests when importing orders. We also allow you to delete your orders and we give you your credits back. This is important because it allows you to test the process, ensure the data looks the way you expect and you can review any important reports. There is one downside here, once you delete the order that order number is gone forever. This means your orders will be out of sequence after the order is deleted. If you're at order number #3050 and import test orders and delete them, the next order that is created in your Shopify store will be #3053.

We understand this can be confusing and it's part of the way Shopify operates. We do our best to fully understand how their system works so we can prepare you, the merchant, as best we can. Of course, if you have any other questions about how order numbers work don't hesitate to let us know!

 


App: EZ Importer

Tags: shopify, ez importer, faq, order number