Try our conversational search powered by Generative AI!

Warehouse becomes inactive when calling AdjustInventoryOrRemoveLineItems


We are experiencing some problems related to a warehouse in our Episerver Commerce-site. At times the warehouse becomes inactive, seen by the call to AdjustInventoryOrRemoveLineItems which gives the validation issue "RemovedDueToInactiveWarehouse". The strange thing is that just before this call we verify the inventory by using the UpdateInventoryOrRemoveLineItems-method, which doesn't give any verification issues.

Has anybody else seen this behavior?

Jul 26, 2018 19:35

That is very strange, warehouse can only be deactivated by WarehouseService. Is it consistent or randomly?

Jul 26, 2018 21:38

It looks very random. Some customers experience this behavior and cannot purchase the items, while others can. Only thing I can think of is that we run inventory sync between the ERP-system and Commerce at given times. But during daytime it's partial and only runs for a few seconds. I don't see any coherence between the sync and the error.

Our setup contains several warehouses that are active, but they are site based (we are running multiple sites on one server), so that one site uses only one warehouse.

Jul 27, 2018 8:20

Did you check if the warehouse is actually inactive? Because the error can be returned if the warehouse assigned to the shipment does not exist. Make sure IShipment.WarehouseCode is set to the correct one. 

Jul 27, 2018 8:47

I'll add some logging for the warehouse code being used. Thank you!

Jul 27, 2018 9:07

And we have an answer. The warehouse for the shipment is wrong. It is set to "default" which is of course the default warehouse. This warehouse has been deactivated.

Jul 27, 2018 10:53

@Quan Mai: Do you know how the warehouse for a shipment is determinated?

Jul 27, 2018 11:19

I guess you asked on how to control which warehouse is selected. You can always implement IFulfillmentWarehouseProcessor and decide which warehouse would you want to choose for a shipment.

Jul 27, 2018 11:24

Thank you! I will look into that.

Jul 27, 2018 11:25
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.