FulfillmentService stock update delays

Highlighted
Shopify Partner
8 0 0

Hi,

We've developed a Shopify app which includes a fulfillment service. We've implemented to the fetch_stock.json endpoint so we can provide stock levels for SKUs, which according to the documentation should be imported in to Shopify every hour.

The issue we're having is that on a particular store, stock quantity updates are massively delayed. In the last instance, the time taken for the stock update in the FulfillmentService to be reflected in the Shopify product was over 3 days. We then added more stock to the same item and a day and a half later the stock has yet to update in Shopify.  The inventory history for the product states the time which Shopify recorded the stock change, not the time at which the change in the FulfillmentService occurred.

Strangely this issue is not affecting our test store - stock updates are arriving within the hour as expected.

Some additional details:

  • Making a request to our fetch_stock.json endpoint always immediately reflects the current value in our backend.
  • We can see that Shopify is making requests to fetch_stock.json every hour (without specifying a specific SKU, which would limit the results to just one product).
  • The product we're testing with has the Fulfillment Service and Inventory Policy set to our fulfillment service.
  • This is the first time we've experienced this issue since we implemented the fulfillment service a couple of months ago.

 

Does anyone have any ideas as to what could cause this? I'm more than happy to provide more specific details (product and fulfillment service IDs) with Shopify support via PM.

Many thanks,
Adrian

0 Likes
Shopify Staff
Shopify Staff
1555 79 242

Hey @Goodtill,

 

A shop or fulfillment_service ID should be private enough if you wouldn't mind providing those. That, with a time frame of this happening most recently, would help me paint a better picture!

 

Cheers.

0 Likes
Shopify Partner
8 0 0

Hi Alex,

The Fulfillment Service with this issue is: 3611132004

The product we're testing with has the SKU "TESTSTOCK". Its stock value was updated in the Fulfillment Service on 22/01 ~16:00 from 9 to 15 units but the value set in the Shopify product is still 9.

Many thanks for the assistance,
Adrian

0 Likes
Shopify Partner
8 0 0

Hi @Alex

 

Do you know if anyone has had a chance to look in to this yet?

 

Many thanks,

Adrian

0 Likes
Shopify Staff
Shopify Staff
1555 79 242

Hey @Goodtill,

 

I had a chance to check over the logs and I'm not seeing any errors in fetch stock requests.  Throughout January 22nd I cannot see any failures occurring, I'm also not seeing that SKU in any of your responses (which include other SKUs). I can see a response from you containing that SKU the day before reconciling the inventory level to 9, but no responses containing that SKU until the 28th where the inventory level is being set to 15.

 

How are things looking from your end?

 

Cheers.

0 Likes
Shopify Partner
8 0 0

Hi @Alex,

Thank you very much for looking in to this.

Whenever I made requests to the fetch_stock.json endpoint there was an entry for that SKU, so it sounds like there's something strange going on. I'll start logging the requests that we send back so we know exactly what we're sending you.

For future reference, we ended up creating a new fulfillment service and deleting the old one - we're now using 5255168100

Thanks again,
Adrian

0 Likes
Shopify Staff
Shopify Staff
1555 79 242

Thanks for the heads up Adrian.

 

When you have some logs from your end let me know and I'll do some cross-checking.

 

Cheers!

0 Likes
Shopify Partner
8 0 0

Hi @Alex,

 

After recreating the FulfillmentService we don't seem to be getting any requests at all. The "TESTSTOCK" product is set to being tracked by the fulfillment service and I've tried changing the SKU then changing it back (eg "TESTSTOCK" to "TESTSTOCK1" to "TESTSTOCK") to force a refresh for that product to no avail. Did we setup the fulfillment service incorrectly?

 

Here's how we set it up:

Request:

{
	"fulfillment_service": {
		"name": "Good Till Company",
		"callback_url": "https://shopify-integration.thegoodtill.com/api/fulfillment_service_hooks/HsaZrX...{REDACTED}/fetch_stock.json"
		"inventory_management": true,
		"tracking_support": false,
		"requires_shipping_method": false,
		"format": "json"
	}
}

Response:

{
  "fulfillment_service": {
    "id": 5255168100,
    "name": "Good Till Company",
    "handle": "good-till-company",
    "email": null,
    "include_pending_stock": false,
    "requires_shipping_method": false,
    "service_name": "Good Till Company",
    "inventory_management": true,
    "tracking_support": false,
    "provider_id": null,
    "location_id": 28007759972
  }
}

 

Many thanks,

Adrian

0 Likes
Shopify Staff
Shopify Staff
1555 79 242

I suspect maybe the URL you provided might not be what you expect it to be @Goodtill:

 

https://shopify-integration.thegoodtill.com/api/fulfillment_service_hooks/#{some_value}/fetch_stock.json/fetch_stock.json is where we're ultimately making the web requests to.

0 Likes
Shopify Partner
8 0 0

Hi @Alex,

Apologies, I forgot that we should only be setting the base URL rather than the absolute URL. After setting the correct callback_url and changing the product SKU (then back again) Shopify immediately retrieved and updated the correct stock level.

However, it seems that the hourly sync is still having issues. Shopify made a full stock request at 13:26:28 (Europe/London time) and our response included 

{ "TESTSTOCK":17 }

but the stock still remains at the previous value of 20.

 

Would you be able to check whether there is something with the response we returned (at 13:26:28)? I'm happy to share the full response we returned if that will help.

 

Many thanks,

Adrian

0 Likes