Skip to main content

StoreDTO

Represents a retail store location with geographic coordinates, capacity constraints, and product demand. Stores have a maximum stock capacity and expect a certain return rate on inventory.

Fields

id
string
required
Unique identifier for the store
latitude
double
required
Geographic latitude coordinate of the store location
longitude
double
required
Geographic longitude coordinate of the store location
country
string
required
ISO country code where the store is located (e.g., “US”, “CA”, “UK”)
maxStockCapacity
integer
required
Maximum number of units the store can hold in inventory
expectedReturnRate
double
required
Expected percentage of inventory that will be returned (0.0 to 1.0)
remainingCapacity
integer
required
Current available capacity after accounting for existing inventory and assignments
demand
ProductItemDTO[]
required
List of product items with quantities that the store is requesting

Example

{
  "id": "STORE-001",
  "latitude": 40.7128,
  "longitude": -74.0060,
  "country": "US",
  "maxStockCapacity": 5000,
  "expectedReturnRate": 0.15,
  "remainingCapacity": 3200,
  "demand": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "productId": "PROD-001",
      "size": "M",
      "quantity": 100
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "productId": "PROD-001",
      "size": "L",
      "quantity": 150
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440002",
      "productId": "PROD-002",
      "size": "S",
      "quantity": 75
    }
  ]
}

Business Logic

Capacity Management
  • The maxStockCapacity represents the physical space available for inventory
  • remainingCapacity is dynamically calculated based on current assignments
  • Stock assignments cannot exceed remaining capacity
Return Rate
  • The expectedReturnRate influences inventory planning
  • Higher return rates may require adjusted stock levels
  • Typically ranges from 0.05 (5%) to 0.30 (30%)
Demand Fulfillment
  • Demand list contains all product items the store needs
  • Not all demand may be fulfilled based on warehouse availability
  • Unfulfilled demand is tracked in metrics

Build docs developers (and LLMs) love