Product Availability at Magnit: From Heuristics to CUSUM and GEE Tests

Yan Pile23 Apr 2026

Problem

A chain with about 21 thousand neighborhood stores and almost 470 hypermarkets carries roughly 5 thousand items per store. Items are often missing from the shelf while the system shows them in stock (virtual stock, no price tag, stockroom). A customer who repeatedly fails to find an item may stop coming. Cameras on every shelf are too costly at this scale, and staff can check only about 15 items a day in a neighborhood store and about 50 in a hypermarket.

Example from the article: a "top basket" item such as the best-selling milk in a residential-area store has no sales for one day, and the store gets a task to check the shelf.

Solution in brief

Independent detectors work on sales and stock tables: heuristics, sales discreteness, CUSUM and external signals. A self-recovery forecast drops cases that fix themselves, and a filtering model ranks the rest to fit the daily store limit. Effects are measured with "saved sales", control visits and A/B tests that handle dependent store-day observations.

Questions this case answers
  • How to detect hidden operational failures in thousands of sites from tabular data alone, when each site can act on only a few alerts per day
  • How to train a ranking model on noisy human feedback when only a small trusted labeled slice exists
  • How to test an intervention on a limited number of units with strongly dependent repeated observations
  • How to find products missing from store shelves when only sales and stock data are available and cameras are too expensive?

Tools and methods

  • CUSUM — flags a drop of normalized item-store sales to zero
  • ABC and XYZ analysis — adjust the "days without sales" threshold
  • CatBoost — predicts self-recovery and scores signals
  • Label correction model — restores true answers from noisy feedback via a small trusted slice
  • GEE and switchback — A/B test on stores with correlated observations
Continue reading — it's free

Google or a one-time email code. No password.