The indicator: days of coverage
Days of coverage say how many days the available stock will last if sales continue at the recent pace. Compared with the replenishment lead time, they say when to reorder.
Available = stock on hand − quantity committed to unshipped orders
Average daily sales = pieces sold in the last N days ÷ N
Days of coverage = available ÷ average daily sales
Reorder point = average daily sales × lead time + safety stock
The guide to days of inventory coverage explains how to choose N and size the safety stock, and has a calculator.
What the dashboard shows
- Most exposed items: the variants with fewer days of coverage than their lead time, ordered by the sales that could be lost.
- Coverage by category and brand, to see where the catalogue is unbalanced.
- Stock-outs: items at zero, for how many days, and how much they sold before.
- Overstock: items with months of coverage, where capital sits idle.
- Low-stock episodes: when they opened, when they closed and who handled them.
The data you need from the database
| Data | Typical fields | What it is for |
|---|---|---|
| Products and variants | code, variant (size, colour), category, brand | Calculating coverage at the level you reorder |
| Stock | variant, warehouse, quantity, last update | The available quantity |
| Orders and lines | date, status, variant, quantity, channel | Average sales and committed stock |
| Returns | order, variant, quantity, date | Correcting sales and stock |
Lead times and safety stock per supplier or family often sit in an Excel file, loaded as a source of its own.
The steps in Muvia
In New source choose MySQL/MariaDB, give the server and a read-only user, and select the tables for products, stock, orders and returns. Muvia copies them on the schedule you choose, incrementally and over an encrypted TLS connection, without querying the shop each time the dashboard opens.
Add the Excel file with lead times and thresholds per family.
A query calculates available stock, average sales and days of coverage per variant, and becomes a dataset with stable fields.
The dashboard shows the most exposed items; every Monday a PDF report goes to whoever reorders.
An alarm opens when an item drops below the coverage threshold and closes on its own when stock goes back above it; the register says who handled it.
The pitfalls of an online shop's database
- Days at zero in the average: if an item was out of stock for a week, average sales fall and coverage looks better. Calculate the average only over days with stock.
- Order statuses: cancelled, unpaid or pending orders must be excluded or treated as committed, with an explicit rule.
- Bundles: a kit sold draws down its components; if the database records only the kit, the components' coverage must be rebuilt from the bill of materials.
- Deleted rows: new or changed rows reach the copy, deleted ones do not. If the shop deletes cancelled orders instead of changing their status, you need a periodic check or a full reload.
- Several warehouses: coverage per warehouse and in total say different things; show both.
Frequently asked questions
Muvia does not query the database each time the dashboard opens: it copies the tables on a schedule, incrementally. Many choose to connect to a read-only replica, if there is one.
It depends on seasonality: for fast movers two to four weeks are often enough, slow movers need longer windows. The window is a parameter of the query and can change by family.
Yes: it opens when coverage drops below the threshold and closes when, at a later refresh, it is back above. The register keeps the episode, who took it on and the notes.
Yes. A predictor of the Forecast kind estimates future sales with a band, and coverage can be calculated on that estimate instead of on the past.