November Happy Hour will be moved to Thursday December 5th.

Warehouse becomes inactive when calling AdjustInventoryOrRemoveLineItems

Vote:
 

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?

#195504
Jul 26, 2018 19:35
Vote:
 

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

#195506
Jul 26, 2018 21:38
Vote:
 

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.

#195516
Jul 27, 2018 8:20
Vote:
 

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. 

#195517
Jul 27, 2018 8:47
Vote:
 

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

#195518
Jul 27, 2018 9:07
Vote:
 

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.

#195524
Jul 27, 2018 10:53
Vote:
 

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

#195525
Jul 27, 2018 11:19
Vote:
 

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.

#195526
Jul 27, 2018 11:24
Vote:
 

Thank you! I will look into that.

#195527
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.