Try our conversational search powered by Generative AI!

Inventory: how is PurchaseRequestedQuantity released? [11.5]

Vote:
 

Hi,

If inventory has been reserved for a customer but the customer never finish the payment and never return to the site, how is this reservation released? Is there anything built into EPiServer for this or is this something the implementation should handle? How can it be handled? Search for carts and release the reservation after some time of inactivity? The next question is then how to search for serializable carts, ICartSearch is internal.

/Viktor

#186352
Dec 18, 2017 15:28
Vote:
 

PurchaseRequestedQuantity is "commited" when you release the shipment in Commerce Manager. You can also do that via APIs by calling IInventoryProcessor.AdjustInventoryOrRemoveLineItem on an order after setting its status to Completed.

Currently there is no APIs for searching for  serializable carts - we might add them in future. For the time being, you can use ICartSearch as a workaround. 

#186353
Dec 18, 2017 15:37
Vote:
 

PurchaseRequestedQuantity is "commited" when you release the shipment in Commerce Manager. You can also do that via APIs by calling IInventoryProcessor.AdjustInventoryOrRemoveLineItem on an order after setting its status to Completed.

Currently there is no APIs for searching for  serializable carts - we might add them in future. For the time being, you can use ICartSearch as a workaround. 

#186354
Dec 18, 2017 15:39
Vote:
 
<p>Hi</p> <p></p> <p>Yes I have done that but the question is how to release the requested quantity back to the pool of available quantity when the order is never completed. What I do now is that I call "<span>AdjustInventoryOrRemoveLineItem" before the user is redirected to the payment service (the order is still a cart), then the "PurchaseRequestedQuantity" is updated with the customers quantity and when the purchase order is&nbsp;completed I commit the change with another call to "AdjustInventoryOrRemoveLineItem". If the payment fails and the user is redirected back to the site I cancel the "PurchaseRequestedQuantity" with another call to "AdjustInventoryOrRemoveLineItem". This seems to work fine but how do I handle the users who just leve the cart/site after the payment redirect and never come back. There "PurchaseRequestedQuantity" quantity will still be there and no one else will be able to buy the product (if they have reuqested the full stock). How should this flow be handled?</span></p> <p>/Viktor</p>
#186355
Dec 18, 2017 15:49
Vote:
 

If you cancel the order before releasing the shipment, then the requested quantity should be reverted back. however once you released the shipment, you have to handle it yourself. 

#186357
Dec 18, 2017 15:59
Vote:
 
<p>Ok, thanks.</p> <p></p> <p>/Viktor</p>
#186390
Dec 19, 2017 8:13
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.