A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We have a fulfillment app and approximately 1 month ago we started to get this error for a specific variant when trying to set inventory levels:
{"errors":["An item cannot be active at more than one location if one of them is a fulfillment service location."]}
We didn't make any changes at this time and this variant is also not new.
I read through the docs and tried to add this to the API call:
"relocate_if_necessary": true
This didn't work, I got this error back:
This item can't be disconnected from its location because it has unfulfilled orders.
I tried to reproduce this in my test store by setting a product to another location, creating an unfulfilled order and then setting it back to our App's location and it works as expected, the unfulfilled order is kept at the old location but it allows me to make the API call and I don't get any errors back.
What triggers this error for this particular variant and how can we set back that variant to our App's location?
Fulfilling all the orders is impractical, they have thousands or unfulfilled orders for this variant back to 2020 and an average of 500 new orders a day.
Solved! Go to the solution
This is an accepted solution.
Hi,
Not sure what caused the issue, I can only guess it has to do with the changes in fulfillment. Variants or inventory items created before may have different data structures in the back-end of shopify. When you tried to replicate that on your dev store you created everything with the "current" core version.. the only way to test that would be to do it with an existing variant that was created on a test store before the fulfillment changes. Course I am only guessing.
Never the less I had a similar issue and ended up deleting the variant and recreating it on a customers shop, the historical orders weren't affected. But I could then correctly assign the new variant to the appropriate location.
Not sure if this would work in your case but it may be worth a shot.
Cheers,
Gary
This is an accepted solution.
Hi,
Not sure what caused the issue, I can only guess it has to do with the changes in fulfillment. Variants or inventory items created before may have different data structures in the back-end of shopify. When you tried to replicate that on your dev store you created everything with the "current" core version.. the only way to test that would be to do it with an existing variant that was created on a test store before the fulfillment changes. Course I am only guessing.
Never the less I had a similar issue and ended up deleting the variant and recreating it on a customers shop, the historical orders weren't affected. But I could then correctly assign the new variant to the appropriate location.
Not sure if this would work in your case but it may be worth a shot.
Cheers,
Gary
Thanks @garyrgilbert Shopify did something this afternoon that changed the problem, maybe they noticed the exceptions or saw one of the support tickets that we sent them, but I think your theory is correct, it must be something with this variant that happened before the current version.