Discussing APIs and development related to customers, discounts, and order management.
Hello everyone,
We have been using REST APIs to create orders on Shopify for quite some time now. However, recently we have encountered an issue where the inventory is not getting deducted from the default location. Some of our customers have reported this problem.
When we tested the same on our test stores, we noticed that the inventory was being deducted from other locations instead. We also tried adjusting the Order Routing settings to check if that was causing the priority of the default location to be overridden, but it didn't seem to be the case.
We would greatly appreciate any assistance in resolving this problem.
Hi Tan,
Did you make any changes on your side (like updating versions) before this issue started happening?
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
Hi Liam,
We do update the API version on quarterly basis. But we didn't notice the issue at that time. Recently, a client reported this issue, so we are not exactly sure if this is linked with the change in API version.
The API version on which this issue was reported to us was 2023-01. Subsequently, we conducted tests on the newer version, namely 2023-04, and observed that the same behaviour persists in that version as well.
Are you seeing any errors appearing or it's just that the inventory is not being updated?
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
No, there are no errors.
Also, its not that inventory is not deducting(getting updated) at all, its just that its not deducted from Default Location. For some users, it does gets deducted from default location while for others, its not.
Hi Liam,
Any suggestions ??
Is there any commonalities for merchants where this is not working as expected, since it's strange that some merchants are not experiencing this issue. Is it possible some merchants have another app that is also affecting inventory levels?
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
Hi Liam,
I couldn't pinpoint any clear patterns among merchants where the expected functionality isn't working. However, at-least in our initial tests, it appears that the hiccup occurs when a product's default location isn't the initial location assigned to it.
While this may not seem logical, it's the only consistent behaviour we've identified so far. Beyond this observation, we're struggling to identify any other shared characteristics or issues.
Hi Liam,
Any suggestions regarding this ??
Hi Liam,
Shall we consider attempting this using older versions where we can confidently confirm that it was functioning as intended, despite these versions being outdated and no longer supported?
Hi, I believe we are having the same issue. we have had multiple warehouse locations for years (in different countries/ some are IRL retail-only locations) and previously customers were not able to check out if a size they wanted was sold out in their local warehouse. However now it allows any customer to checkout even if their location can't ship the size (because it's showing on stock in another location). After the order is created the default location stock goes into minus in the default location and the stock remains the same in the location that had the stock but couldn't ship it. When I have reached out to support they say that it has always been like this and that total stock is what is accounted for instead of the stock in a specific location but this isn't the case and we did not see issues like this before update for order routing and other recent features. They say that is expected behavior however we are constantly having to disappoint and refund customers over stock we can't ship to them, which is very frustrating for both us and the customers. This makes cross-border selling difficult without setting up separate sites which we do not have the team capacity to operate or looking for an app that can resolve this as shopify doesn't seem to think there is an issue to fix here. does anyone have any recommendations for apps that can resolve this?
Check if the locations have set shipping rates in "settings" => "shipping and delivery" => "general shipping rates".
I was facing the same problem and that was the solution for me.