Shopify bulk update order status

Shopify bulk update order status

jaredsmoon
Visitor
1 0 0

We have an integration with our ERP system, Business Central, that was previously working. Shopify orders came into BC and when they were fulfilled, BC would then push the data back to Shopify. This would close out the order in Shopify and provide the customer with a tracking number. The "push back to Shopify" piece broke a month ago. We now have several thousand orders that have been fulfilled in BC and shipped to the customer, but they're still open in Shopify with no tracking numbers. We're switching to a new integration to resolve issues with future orders, but I'm wondering if there's a way to update Shopify records in bulk? Is there a place we can upload a spreadsheet with order numbers and tracking numbers for all the orders that need to be updated in Shopify? Otherwise we'd have to manually update thousands of orders and copy/paste in the tracking numbers. 

 

If that's not possible, can we turn off email notifications for a time so we can re-run the integration manually have have it close the orders out and provide tracking numbers (without it emailing a customer a confirmation from a month ago)?

Reply 1 (1)

Liam
Shopify Staff
2862 313 813

Hi Jaredsmoon,

 

First off you can turn off the email notifications for "Out for delivery" and "Delivered" from the admin at Settings>Notifications:

 

So if these are the only two notifications you need to block while re-running the integration manually then that could be an option.

 

Otherwise 

you can use Shopify's API to programmatically update the tracking numbers for your orders. This would involve using the Fulfillment API, where you can update the tracking numbers and mark the orders as fulfilled.

Here's a high-level overview of how you might do this:

1. First, you'll need to get a list of all unfulfilled orders. You can do that with the Order API, specifically the `GET /admin/api/2022-01/orders.json?status=unfulfilled` endpoint.

2. Once you have the list of unfulfilled orders, you can iterate through each order and create a fulfillment for it. You can use the `POST /admin/api/2022-01/orders/{order_id}/fulfillments.json` endpoint for this. In the body of the request, you'll provide the tracking number for the order.

Here's an example body for the fulfillment request:

{
  "fulfillment": {
    "tracking_number": "123456",
    "line_items": [
      {
        "id": 123456789,
        "quantity": 1
      }
     ]
  }
}

In this request, the `tracking_number` would be the tracking number for that order, and the `id` in the `line_items` array would be the ID of the product that was fulfilled.

 

If you're not comfortable with using APIs in this way, there are also several Shopify apps available, like Matrixify or EZ Fulfill, that can help you bulk update tracking numbers via a CSV file.

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog