← Back to Docs

Reorder Queue

Overview

The Reorder Queue is a prioritized list of products that need to be reordered to prevent stockouts. It combines real-time inventory snapshots with historical sales velocity to surface which SKUs are running low, how many days of stock remain, and the estimated lost revenue if no action is taken.

Each row is actionable: clicking Order creates a pre-filled purchase order for that product, so you can go from "this is running out" to "PO sent" in one click.

Search

Search by Product Name or SKU

A search input at the top of the queue lets you filter results in real time. You can search by:

In-place filtering: Results are filtered as you type without navigating away or losing focus on the search input. The urgency dropdown and pagination state are preserved while searching.

Filter by Urgency

Urgency Dropdown

An urgency dropdown lets you narrow the queue to products at a specific risk level. Available options:

OptionDescriptionBadge
All UrgencyShows every product in the reorder queue regardless of urgency level—
CriticalProducts with very few days of stock remaining — immediate action neededCritical
HighProducts that will run out soon if not reordered promptlyHigh
MediumProducts approaching the reorder thresholdMedium
LowProducts with ample stock but still flagged for reorder planningLow
Combined with search: The urgency filter works together with the search box — you can search for a specific supplier's products filtered to only Critical items, for example.

Product Information

What Each Row Shows

Each product in the reorder queue displays the following columns:

ColumnDescriptionExample
Product NameDisplay name of the productBluetooth Speaker - Red
SKUStock keeping unit identifierSPK-RED-01
Current StockUnits available right now (from latest inventory snapshot)3
Daily VelocityAverage units sold per day (from recent sales history)4.5/day
Days of Stock RemainingEstimated days until stockout (current stock ÷ daily velocity)0.7 days
Estimated Lost RevenueProjected revenue lost if the product sells out before restock$450.00
Urgency badge: Each row also shows a color-coded urgency badge (Critical / High / Medium / Low) based on days of stock remaining and daily velocity thresholds.

Order Button

Create Pre-filled Purchase Order

Clicking the Order button on any row opens a new purchase order form that is pre-filled with:

From there you can adjust quantities, add additional line items, set the ship-to location, and send the PO — all without leaving the workflow.

Pagination

Load More

The reorder queue uses incremental pagination via a Load More button at the bottom of the list. Rather than jumping between page numbers, each click of Load More appends the next set of recommendations to the existing list.

Data Sources

DataSourceUpdate Frequency
Recommendations listreorder_recommendations tableReal-time from database
Current stock levelsinventory_snapshots tableUpdated during product sync
Daily velocitysales_history tableUpdated during order sync
Estimated lost revenueComputed: daily velocity × days until stockout × unit priceComputed on page load
Days of stock remainingComputed: current stock ÷ daily velocityComputed on page load
Sync Note: Recommendation data is only as fresh as the last inventory and order sync. Click the Sync button on the Products page to pull the latest stock levels from Shopify. Order sync populates the sales history used for velocity calculations.

API Reference

GET /api/reorder-recommendations

Returns the list of reorder recommendations. Supports filtering by urgency and search query.

GET /api/reorder-recommendations?urgency=critical&search=speaker&limit=20&offset=0

# Response
{
  "data": [
    {
      "id": 42,
      "product_name": "Bluetooth Speaker - Red",
      "sku": "SPK-RED-01",
      "current_stock": 3,
      "daily_velocity": 4.5,
      "days_remaining": 0.7,
      "estimated_lost_revenue": 450.00,
      "urgency": "critical",
      "supplier_id": 5,
      "supplier_name": "TechParts Co."
    }
  ],
  "total": 95,
  "limit": 20,
  "offset": 0
}

GET /api/reorder-recommendations/:id

Returns a single recommendation with full details.

GET /api/reorder-recommendations/42

# Response
{
  "data": {
    "id": 42,
    "product_name": "Bluetooth Speaker - Red",
    "sku": "SPK-RED-01",
    "current_stock": 3,
    "daily_velocity": 4.5,
    "days_remaining": 0.7,
    "estimated_lost_revenue": 450.00,
    "urgency": "critical",
    "supplier_id": 5,
    "supplier_name": "TechParts Co.",
    "unit_cost": 45.00,
    "lead_time_days": 7,
    "suggested_order_quantity": 50
  }
}

POST /api/purchase-orders

Creates a purchase order from a recommendation. The recommendation_id links the PO back to the source recommendation.

POST /api/purchase-orders
Content-Type: application/json

{
  "recommendation_id": 42,
  "supplier_id": 5,
  "items": [
    {
      "sku": "SPK-RED-01",
      "quantity": 50,
      "unit_cost": 45.00
    }
  ]
}

# Response
{
  "data": {
    "id": 128,
    "status": "draft",
    "supplier_id": 5,
    "total": 2250.00,
    "items": [...]
  }
}