Two customers add a product to the basket in the same time whose the stock was only one (1). What will you do?

Technology CommunityCategory: Software ArchitectureTwo customers add a product to the basket in the same time whose the stock was only one (1). What will you do?
VietMX Staff asked 3 years ago
Problem

What is the best practice to manage the case where two customers add in the same time a product whose the stock was only 1?

There is no perfect answer for this question and all depends on details but you have some options:

  1. As a first ‘defense line’ I would try to avoid such situations at all, by simply not selling out articles that low if any possible.
  2. You reserve an item for the customer for a fix time say (20 minutes) after they have added it to the basket – after they time they have to recheck the stock level or start again. This is often used to ticket to events or airline seats
  3. For small jobs the best way is to do a final check right before the payment, when the order is actually placed. In worst case you have to tell you customer that you where running out of stock right now and offer alternatives or discount coupon.
  4. Try to fulfil both orders later – just cause you don’t have stock right now, doesn’t mean you can’t find it in an emergency. If you can’t then someone has to contact the user who lucked out and apologise.

Side note:

  1. The solution to do the double check when adding something to the basket isn’t very good. People put a lot in baskets without ever actually placing an order. So this may block this article for a certain period of time.