Try our conversational search powered by Generative AI!

Update stock on Quicksilver


Hi guys,

I'm currently looking into Quicksilver and I see that during Checkout AdjustInventory is called on the cart.

However, after completing Checkout, the inventory stays the inventory of the SKU stays the same and is not diminished by the quantity.

Any idea on how to do this in code during Checkout?

Thanks in advance!


Aug 16, 2017 11:09

If inventory tracking is enabled, the SKU inventory should be adjusted after purchase. Can you check is it enabled?

Aug 16, 2017 12:58

Yeah, it is.

Aug 16, 2017 14:16

Could you try setting the InventoryTrackingStatus on the line item to InventoryTrackingStatus.Enabled?

lineItem.InventoryTrackingStatus = InventoryTrackingStatus.Enabled

To determine if the tracking status should be active, you can get the tracking status from the SKU.

Aug 16, 2017 14:24

No, this was not it. Any other ideas?

Edited, Aug 16, 2017 14:27

I think you could debug on Quicksilver and show your data. I think the issue was in CheckoutService > ValidateOrderOperation.

If not, it should go to CartService > RequestInventory, show us the validationIssues

Please show us what issue you got.

Aug 23, 2017 13:08

I believe that the WarehouseCode on the shipment must be set as well.

Aug 23, 2017 14:20

Note that when you look at the Inventories view in Catalog UI 

InStock is actually [PurchaseAvailableQuantity] + [PurchaseRequestedQuantity]. (I'm not saying it's a good UI decision, I'm just saying it's the way it is right now).

So if you ordered 5 of item above, [PurchaseRequestedQuantity] will be set to 5, PurchaseAvailableQuantity is -5, but the InStock remains the same.

Until you release the shipment, which actually commits PurchaseRequestedQuantity, then InStock will remain the same. 

EDIT: the above is not true, at least with latest version 

Edited, Aug 23, 2017 16:48
* 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.