Skip to main content

GlobalMetricsDTO

Provides high-level summary metrics for the entire distribution network. Used for dashboard overview and quick performance assessment.

Fields

totalShipments
long
required
Total number of stock assignments created
fulfilledUnits
long
required
Total number of units successfully assigned to stores
unfulfilledUnits
long
required
Total number of units in demand that could not be fulfilled
averageDistance
double
required
Average shipping distance in kilometers across all assignments

Example

{
  "totalShipments": 1247,
  "fulfilledUnits": 125830,
  "unfulfilledUnits": 8420,
  "averageDistance": 287.6
}

DetailedMetricsDTO

Comprehensive analytics object containing detailed performance metrics, distribution statistics, and nested analytics data. Used for in-depth analysis and reporting.

Fields

efficiencyScore
integer
required
Overall efficiency score from 0-100 based on fulfillment rate, distance optimization, and capacity utilization
fulfillmentRate
double
required
Percentage of demand fulfilled (0.0 to 1.0)
totalDistance
double
required
Sum of all shipping distances in kilometers
totalShipments
long
required
Total number of stock assignments
storesServed
StoresServedDTO
required
Statistics about store coverage and service levels
avgShipmentSize
double
required
Average number of units per shipment
uniqueProductsDistributed
integer
required
Count of unique products that were assigned to stores
uniqueProductsRequested
integer
required
Count of unique products across all store demand
capacityUtilization
CapacityUtilizationDTO
required
Store capacity usage statistics
unfulfilledDemand
UnfulfilledDemandDTO
required
Breakdown of unfulfilled demand by reason
fulfilledUnits
long
required
Total number of units successfully assigned
distanceStats
DistanceStatsDTO
required
Statistical distribution of shipping distances
unitsByWarehouse
WarehouseUnitsDTO[]
required
Distribution of fulfilled units by warehouse
topProducts
TopProductDTO[]
required
Most distributed products ranked by quantity

Example

{
  "efficiencyScore": 87,
  "fulfillmentRate": 0.937,
  "totalDistance": 358742.5,
  "totalShipments": 1247,
  "storesServed": {
    "servedStores": 142,
    "fullyServedStores": 98,
    "neverServedStores": 8,
    "coveragePercentage": 0.947,
    "fullyServedPercentage": 0.653
  },
  "avgShipmentSize": 100.9,
  "uniqueProductsDistributed": 47,
  "uniqueProductsRequested": 52,
  "capacityUtilization": {
    "percentage": 0.742,
    "storesAtCapacity": 12,
    "totalStores": 150
  },
  "unfulfilledDemand": {
    "totalUnits": 8420,
    "unitsByStockShortage": 6280,
    "unitsByCapacityShortage": 2140
  },
  "fulfilledUnits": 125830,
  "distanceStats": {
    "minDistance": 12.4,
    "maxDistance": 1847.3,
    "medianDistance": 256.8
  },
  "unitsByWarehouse": [
    {
      "warehouseId": "WH-001",
      "totalUnits": 45680,
      "percentage": 0.363,
      "avgDistance": 234.5
    },
    {
      "warehouseId": "WH-002",
      "totalUnits": 38920,
      "percentage": 0.309,
      "avgDistance": 312.8
    },
    {
      "warehouseId": "WH-003",
      "totalUnits": 41230,
      "percentage": 0.328,
      "avgDistance": 298.2
    }
  ],
  "topProducts": [
    {
      "productId": "PROD-001",
      "totalQuantity": 18750
    },
    {
      "productId": "PROD-003",
      "totalQuantity": 15420
    },
    {
      "productId": "PROD-007",
      "totalQuantity": 12680
    }
  ]
}

Efficiency Score Calculation

The efficiency score (0-100) is calculated based on:
  • Fulfillment Rate (40% weight) - Higher is better
  • Distance Optimization (30% weight) - Lower average distance is better
  • Capacity Utilization (30% weight) - Optimal range is 70-85%

Metrics Usage

Dashboard Visualization
  • Display key performance indicators (KPIs)
  • Track trends over time
  • Identify optimization opportunities
Operational Insights
  • Identify underperforming warehouses
  • Discover stock shortage patterns
  • Monitor capacity constraints
  • Analyze product distribution patterns
Strategic Planning
  • Warehouse location optimization
  • Inventory allocation strategies
  • Capacity expansion decisions
  • Product portfolio analysis

Build docs developers (and LLMs) love