Overview
The Analytics page provides advanced inventory analysis driven by real sales data. It helps merchants understand demand patterns, classify products by value, and identify dead stock.
Demand Forecasting
Predicted Daily Demand
Uses historical sales data to predict future daily demand per product. The forecast window is configurable via shop settings.
| Setting | Description | Default |
|---|---|---|
forecast_sensitivity | Forecast window: conservative (14 days), balanced (30 days), aggressive (60 days) | balanced |
sales_history_days | How many days of sales history to use | 30 |
auto_detect_seasonality | Detect seasonal patterns in sales data | Enabled |
growth_trend_detection | Detect upward/downward trends | Enabled |
ABC Analysis
Product Classification by Revenue
Classifies products into three tiers based on cumulative revenue contribution (Pareto principle):
| Class | Definition | Typical % of Products | Typical % of Revenue |
|---|---|---|---|
| A | Top products driving 80% of revenue | ~20% | ~80% |
| B | Next tier driving 15% of revenue | ~30% | ~15% |
| C | Bottom tier driving 5% of revenue | ~50% | ~5% |
Dead Stock Detection
Products With No Sales
Identifies products that have had zero sales for a configurable number of days, along with the capital tied up in that stock.
| Field | Description |
|---|---|
dead_stock_days | Number of days without a sale to qualify as dead stock (default: 60) |
tied_up_capital | cost_per_item × quantity_available for each dead product |
last_sale_date | Date of the most recent sale (or "Never") |
API Endpoints
| Endpoint | Description |
|---|---|
GET /api/analysis/abc | Returns ABC classification for all products |
GET /api/analysis/dead-stock?days=90 | Returns dead stock report (configurable days) |
GET /api/forecast | Returns demand forecast for all products |
POST /api/forecast/calculate | Trigger forecast recalculation |
Data Source: All analytics are computed from real
sales_history and inventory_snapshots data. No hardcoded values. Thresholds are user-configurable via the Settings page.