A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Per https://community.shopify.com/c/shopify-apps/how-to-allow-multi-managed-inventory-for-a-fulfilment-a... I was seeking to learn how to update our fulfillment service app to participate in SKU sharing with Shopify locations.
The reason is because over the years, the fact that merchants have to (1) update hundreds of "Inventory managed by" dropdowns when they switch to our service and (2) can haven't inventory exist at both an app location and Shopify location have been pain points.
With the Developer Preview at https://shopify.dev/api/release-notes/developer-previews#fulfillment-service-sku-sharing-developer-p... I spun up a development store and used the GraphQL API to create FulfillmentService that sets permitsSkuSharing to true.
When I did this, the app location appears in the Fulfillment Priority list, which is good, and there's no separate "Inventory managed by" dropdown on the product page, the app just appears in the list of locations, which is also nice.
However, I had also set inventoryManagement on the FulfillmentService to true, expecting that Shopify would call callbackUrl/fetch_stock.json in the usual way to update the inventory in one go. It did this, but it put the quantity that I returned in the wrong location! It puts it in the store's first Shopify location, instead of the app location, which doesn't make any sense at all.
Can anyone at Shopify clarify if this is a bug on Shopify's side that would be fixed before the feature goes live, or is the expectation that fetch_stock.json is deprecated when permitsSkuSharing is true, and the app needs to use something like inventoryBulkAdjustQuantityAtLocation instead?
What made fetch_stock.json so very appealing is that it used SKUs, which is how the real world works and I could just vomit out a SKU/quantity list, rather than having to build a giant mapping of Shopify ID numbers.
I appreciate any insight.
Solved! Go to the solution
This is an accepted solution.
I see that permitsSkuSharing: true was released as part of 2022-07, but when used with inventoryManagement: true, Shopify continues to apply inventory updates to the wrong location. I tried contacting Partner Support about this since this post received no response, and was advised that they don't do technical support.
I think it's a bug in Shopify, but I'm giving up. You can't use inventoryManagement: true and fetch_stock.json anymore.
Hmm, it seems a little more bizarre than that.
Assume the following locations:
- Alpha Location (a Shopify location, listed as "default" in Settings)
- Zeta Location (a Shopify location)
- Contoso Location (an app location, permitsSkuSharing = true and inventoryManagement = true)
When Shopify executes fetch_stock.json on a given SKU, the following is observed:
1. If the SKU has only Alpha Location checked, then nothing happens (correct).
2. If the SKU has Alpha Location and Contoso Location checked, then the quantity from fetch_stock is assigned to Alpha Location (incorrect).
3. If the SKU has Zeta Location and Contoso Location checked, then the quantity from fetch_stock goes to Contoso Location (correct).
4. If the SKU only has Contoso Location checked, then the quantity from fetch_stock goes to Contoso Location (correct).
5. If all 3 locations are checked, then the quantity from fetch_stock goes to Alpha Location (incorrect).
I am just guessing from the outside, but the bug seems to be that "if the default Shopify location is present on a variant, then the value from fetch_stock always gets applied to that location instead of the correct app location, but if the default Shopify location is not present on the variant, then everything works as you would expect".
Hopefully this is just a bug, and fetch_stock.json won't be deprecated. Thanks for any insight, Shopify!
This is an accepted solution.
I see that permitsSkuSharing: true was released as part of 2022-07, but when used with inventoryManagement: true, Shopify continues to apply inventory updates to the wrong location. I tried contacting Partner Support about this since this post received no response, and was advised that they don't do technical support.
I think it's a bug in Shopify, but I'm giving up. You can't use inventoryManagement: true and fetch_stock.json anymore.
I had this issue also, I created fulfillment service with
This is an issue that we're finding as well. One app manages inventory at multiple locations. Each location has a separate fulfillment service. Each fulfillment service has a separate callback_url. And each callback_url provides the documented response to the fetch_stock.json requests.
What we've found is that the default/manual location for the store consumed the inventory levels and the individual location's inventory levels remained at 0.
Configuring the locations' priorities had no effect.
---
This issue is unresolved.