← Back to Docs

Analytics

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.

SettingDescriptionDefault
forecast_sensitivityForecast window: conservative (14 days), balanced (30 days), aggressive (60 days)balanced
sales_history_daysHow many days of sales history to use30
auto_detect_seasonalityDetect seasonal patterns in sales dataEnabled
growth_trend_detectionDetect upward/downward trendsEnabled

ABC Analysis

Product Classification by Revenue

Classifies products into three tiers based on cumulative revenue contribution (Pareto principle):

ClassDefinitionTypical % of ProductsTypical % of Revenue
ATop products driving 80% of revenue~20%~80%
BNext tier driving 15% of revenue~30%~15%
CBottom 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.

FieldDescription
dead_stock_daysNumber of days without a sale to qualify as dead stock (default: 60)
tied_up_capitalcost_per_item × quantity_available for each dead product
last_sale_dateDate of the most recent sale (or "Never")

API Endpoints

EndpointDescription
GET /api/analysis/abcReturns ABC classification for all products
GET /api/analysis/dead-stock?days=90Returns dead stock report (configurable days)
GET /api/forecastReturns demand forecast for all products
POST /api/forecast/calculateTrigger 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.