Demand forecasting and replenishment is the part of supply-chain planning that predicts how many units of each item will sell in each shop or warehouse, and orders more before the item runs out. Replenishment means restocking. The software does this for every item in every location, every day. A large retailer may have 20,000 items in 500 stores, so it must make about one crore of these decisions each day.
The forecast comes first. The software reads each item's past daily sales in each store. These are time series data, numbers recorded one after another over time. It also reads the things that change sales: festivals, the day of the week, the weather, promotions and price changes. From these it makes a demand forecast for each of the coming days.
Then it decides when to order and how much. Two numbers matter. The lead time is how long a new delivery takes to arrive. The safety stock is a small extra amount kept in case sales are higher than forecast or a delivery is late. The software orders when the stock in the store, plus the stock already on its way, falls below the sales expected during the lead time plus the safety stock. This level is called the reorder point.
Take, for example, one-litre pouches of sunflower oil in a supermarket in Indore. The forecast says that the store will sell 40 pouches a day this week. A delivery from the chain's warehouse takes 3 days. The safety stock is set at 30 pouches. So the reorder point is 40 × 3 + 30 = 150 pouches. On Wednesday evening, the store has 140 pouches and none on the way. That is below 150, so the software places an order. It orders enough for one week of sales, which is 280 pouches. It rounds this up to 288, because the pouches come in cartons of 12. The order goes to the chain's warehouse management system (WMS), which tells a worker which cartons to pick.
Without forecasting, a store employee orders by looking at the shelf. The store then runs out before festivals and holds too much stock in quiet weeks. Running out loses sales. Holding too much ties up money and shelf space, and food items may pass their expiry date.
This part belongs to supply-chain planning software. Quick-commerce apps use the same method hour by hour, for each dark store, a small warehouse that serves only delivery orders.