Try our conversational search powered by Generative AI!

Update stock on Quicksilver

Vote:
 

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!

Lindy

#181317
Aug 16, 2017 11:09
Vote:
 

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

#181325
Aug 16, 2017 12:58
Vote:
 

Yeah, it is.

#181337
Aug 16, 2017 14:16
Vote:
 

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.

#181338
Aug 16, 2017 14:24
Vote:
 

No, this was not it. Any other ideas?

#181341
Edited, Aug 16, 2017 14:27
Vote:
 

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.

#181527
Aug 23, 2017 13:08
Vote:
 

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

#181532
Aug 23, 2017 14:20
Vote:
 

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 

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