REST Order API 2020-07 Bug: Filtering by fulfillment_status not working properly for some stores

REST Order API 2020-07 Bug: Filtering by fulfillment_status not working properly for some stores

Jonathan-HA
Shopify Partner
330 25 102

Hi there,

We've received reports from 2 stores so far where the fulfillment_status filtering is not working properly (started yesterday).

The filtering works fine on our test stores so it seems like this is an update that's being rolled out slowly.

When filtering by `fulfillment_status=unshipped`, fulfilled orders are getting included in the response.

Here's a sample request with the request ID:

API request: https://<shop_domain>/admin/api/2020-07/orders.json?fulfillment_status=unshipped&limit=250

'X-Request-ID': '84387ab7-309b-4e07-870a-88a5300a230b'

We've seen a similar issue in the past: https://community.shopify.com/c/Shopify-APIs-SDKs/Orders-gt-created-at-min-ignored/m-p/551858

Can someone from Shopify please take a look?

Thanks!

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
Replies 7 (7)

Jonathan-HA
Shopify Partner
330 25 102

I just received new reports from 2 more customers today.  It seems the update with the filter bug is getting rolled out to more stores. 😞

I did more testing with different filter combinations and here's another weird thing I found:

If `status=open` and `fulfillment_status=unshipped` is set, some "closed" orders are getting included (but not all closed orders).  If I remove the fulfillment_status filter and only have status=open, the filter works fine and doesn't include closed orders.  So it does seem like something weird is going on with that fulfillment_status filter.

I hope someone from Shopify can take a look soon as this could potentially affect a lot of merchants as this update gets rolled out.

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill

Jonathan-HA
Shopify Partner
330 25 102

We just found another issue where there's quite a big delay with orders getting included in the API response only if the fulfillment_status filter is set to a specific status, so it seems related to this as well.

We learned from Shopify last month that there was a change that was made recently to use elastic search for fulfillment_status filtering, so that could be related.

So far, we've had 4 customers this week report an issue with a few orders getting missed because of this.

I was able to re-create the issue on our test store and seeing delays from 10-15 seconds to over 30 seconds.  One customer reported an order that was missed which was created 7 minutes before the API request was sent, which is areally big delay.

Here's the output of my tests:

---

The fulfillment_status filter is set to 'unshipped', delay of 30+ seconds:

2020-11-12T22:23:19.228360: https://highview-001.myshopify.com/admin/api/2020-07/orders.json?since_id=2450263638052&status=open&...
Request ID: 3c4a72b4-fa48-434f-b358-2700633d1f1f
Result: []
2020-11-12T22:23:20.870681: https://highview-001.myshopify.com/admin/api/2020-07/orders.json?since_id=2450263638052&status=open&...
Request ID: e72d8247-19f6-4199-9f80-d229471ae7f7
Result: []
2020-11-12T22:23:22.505784: https://highview-001.myshopify.com/admin/api/2020-07/orders.json?since_id=2450263638052&status=open&fulfillment_status=unshipped&fields=id,created_at,fulfillment_status&limit=5
Request ID: 9f3964a4-d0d4-495e-9dc9-3fd64db63fd8
Result: [{'id': 2450275139620, 'created_at': '2020-11-12T22:22:45Z', 'fulfillment_status': None}]

---

Fulfillment status is set to "any", no delay.

2020-11-12T22:10:17.813845: https://highview-001.myshopify.com/admin/api/2020-07/orders.json?since_id=2450258788388&status=open&...
Request ID: b3acb88d-191c-4260-97d2-898301ac30b7
Result: []
2020-11-12T22:10:19.549766: https://highview-001.myshopify.com/admin/api/2020-07/orders.json?since_id=2450258788388&status=open&...
Request ID: f586abeb-4329-4ae6-a14d-427d72d2eba0
Result: []
2020-11-12T22:10:21.291513: https://highview-001.myshopify.com/admin/api/2020-07/orders.json?since_id=2450258788388&status=open&fulfillment_status=any&fields=id,created_at,fulfillment_status&limit=5
Request ID: 2758a07c-5e5e-4ed3-a939-2b28b5ce9ffe
Result: [{'id': 2450260328484, 'created_at': '2020-11-12T22:10:20Z', 'fulfillment_status': None}]

---

Anyone else seeing this?

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
soheylnazifi
Visitor
1 0 0

we are facing recently same issue, some orders are not received via API (version 2020-10). after afew days of requesting regularly, Shopify give the orders!!!. we are using paging structure.

we call /admin/api/2020-10/orders.json?limit=100&fulfillment_status=unshipped

 

Jonathan-HA
Shopify Partner
330 25 102

@soheylnazifi Yup, we also had one merchant report orders not showing up until days later...

I'm currently debugging with Shopify, you can reference my ticket ID 20753466 if you decide to open an ticket with them as there's already a long conversation with very detailed debug info on this ticket which might help.

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
_JB
Shopify Staff (Retired)
836 100 223

Hey @soheylnazifi,

In order to investigate further, kindly provide the X-Request-ID value from the response headers of a call that didn't return the expected orders. 

For anyone else reading along, we pushed a fix on Friday for an issue that caused long delays in orders showing up in the API response. We're still investigating a few isolated reports, but most cases of long delays appear to be resolved. If you've made a request after Nov 20th where the response didn't include the expected set of orders, please provide the X-Request-ID here and we'll investigate. 

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

allysonsaid
Tourist
3 0 1

We are also experiencing something strange going on with our API fulfillment status. When we manually fulfill orders, sometimes they go through at the right time, sometimes they are delayed by hours, and sometimes they flip back and forth from fulfilled to unfulfilled again, etc. This is all happening in the API, not in our store or on the customer side. Shopify support told us to inquire with some of the apps we are using to see if they are unintentionally causing this, but we don't use any fulfillment apps or apps related to updating orders after they've been placed.

Khouloud
Shopify Partner
1 0 0

Same issue for me