Solved

What causes "This item can't be disconnected from its location because it has unfulfilled orders"?

fabioxgn
Shopify Partner
3 0 0

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.

Accepted Solution (1)

garyrgilbert
Shopify Partner
393 40 162

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

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

View solution in original post

Replies 2 (2)

garyrgilbert
Shopify Partner
393 40 162

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

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
fabioxgn
Shopify Partner
3 0 0

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.