In a cart-based e-commerce website, users can add products to their basket and there can be a delay between that and the actual checkout. Considering multiple people can add products to their basket simultaneously, what is the suggested/appropriate time to update the products-in-stock number?

Should it be updated as soon as the product is added to the basket?

- If so, should there be a limit for how long the item can remain in the basket


Should it be updated only after the user has made the payment and the checkout process is complete?

  • 2
    Are you selling limited-edition merchandise and expect to have 1,000 people trying to buy 500 available items the instant they go on sale? Or are you selling 1,000,000 mass-market plastic widgets that someone might buy once per month? – Nathan Rabe Sep 25 '19 at 12:52

As for the quantity of product in stock - Definitely at the time of payment - there is often a situation that the user adds the product to the cart, but does not complete the transaction.

When it comes to discounts and prices - Operations should be carried out in the basket, to inform the user about available promotions and possibilities

| improve this answer | |
  • As a user, I expect that items I add to my cart will stay in my cart – right up to the point when the items sell out and are no longer available. This means that the things in the cart are virtual items and don't really "count" until I finish the transaction and checkout. However, there are various pricing and inventory models that interfere with this which can cause things to disappear after certain amounts of inactivity, but I'm not aware of any universal standards. – Nathan Rabe Sep 24 '19 at 19:39
  • On the other hand, what you are talking about may be important when you add the last piece to your basket. Should it be reserved at this time? change status to some intermediate? – Piotr Żak Sep 25 '19 at 9:47
  • 1
    That's really more of an e-commerce modeling question. "Last" doesn't really have a lot of solid meaning in that context. It could be the last one in warehouse A, but in one week another 1,000 units will arrive in warehouse B. Both of us get to add the piece to our baskets, nothing gets reserved, and whoever checks out second has to wait an extra week for it to arrive. If we are talking something like concert tickets where the supply is finite and demand is probably higher than the supply, things like holding the tickets for 5 minutes until you checkout are much more common. – Nathan Rabe Sep 25 '19 at 12:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.