Skip to main content

Inventory Management

Switchyard provides a hierarchical inventory location system with FEFO/FIFO picking support, designed for warehouse and retail operations.

Location Hierarchy

Inventory locations follow a 5-level hierarchy:

Location Code Format

Location codes follow the pattern: {Zone}{Aisle}-{Bay}-{Shelf}-{Slot} Examples:
  • A1-1-1-1 - Zone A (Ambient), Aisle 1, Bay 1, Shelf 1, Slot 1
  • F2-3-4-2 - Zone F (Frozen), Aisle 2, Bay 3, Shelf 4, Slot 2
  • C1-2-1-1 - Zone C (Chilled), Aisle 1, Bay 2, Shelf 1, Slot 1

Inventory Items

The inventory_items table tracks physical inventory in the RFC warehouse with support for FEFO/FIFO picking.

Key Fields

FEFO/FIFO Picking

When picking inventory for orders, items are selected in this order:
  1. FEFO (First Expired, First Out) - Items expiring soonest are picked first
  2. FIFO (First In, First Out) - For non-perishables, oldest received items are picked first
Items without an expiration date (non-perishables) are picked last among items with the same received date.

API Endpoints

Lookup by Barcode

Response:

Process Inventory Scan

Actions:

Receive Response

Inventory Replenishment

When inventory falls below reorder points, the system can automatically create inventory sweeps.

Sourcing Decision

The system compares individual vs bulk pricing:
  1. Check if a bulk SKU relationship exists
  2. Compare per-unit cost for individual vs bulk
  3. Select the best retailer based on price

List Inventory Groups

Query parameters:
  • type - Filter by level type (zone, aisle, bay, shelf, slot)
  • parent_group_id - Filter by parent location

Permissions Required