Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

How to reserve a lineitem quantity for a specific amount of time


We are using EPiServer.Commerce v9.14.1 and we have integration with a payment gateway that requires customer to be redirected to the gateway payment pages.

We want to reserve the quantity for each line item in the shopping cart until the payment is completed successfully and order is placed.

If payment was failed or 30 minutes have passed from the time of reservation, we need to release the quantity reserved.

Any idea how to achieve above requirements?


Jun 17, 2016 17:22

If you run the adjust inventory activity it will reserve a quantity for you, as it does not actual decrement inventory until you release the item for shipment.  If you cancel the order it will add the inventory back.

Jun 20, 2016 10:26

Thanks Mark for the reply.

I have tried calling the AdjustInventory activity but unfortunately nothing happen.

I can see the 'Reserved' quantity property through editorial interface is still 0.

Also the Inventory value doesn't decremnt when I call this activity.

Any thoughts?

Edited, Jun 22, 2016 20:57

The Reserved quantity is pretty "legacy" field, it is not used anymore. The API:s will not change its value, until you explicitly set it via UI (again, it does not affect anything and it does not mean the reservation in your case)

Calling AdjustInventoryActivity only works if you set all the context parameters (for example, OrderGroup) correct. It would be simpler if you request the Inventory system directly. However, know when the cart is expired to cancel the "reservation" will be tricky.

Jul 01, 2016 10:02
* 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.