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:
- Product name — e.g.
Bluetooth Speaker - SKU — e.g.
SPK-RED-01
Filter by Urgency
Urgency Dropdown
An urgency dropdown lets you narrow the queue to products at a specific risk level. Available options:
| Option | Description | Badge |
|---|---|---|
| All Urgency | Shows every product in the reorder queue regardless of urgency level | — |
| Critical | Products with very few days of stock remaining — immediate action needed | Critical |
| High | Products that will run out soon if not reordered promptly | High |
| Medium | Products approaching the reorder threshold | Medium |
| Low | Products with ample stock but still flagged for reorder planning | Low |
Product Information
What Each Row Shows
Each product in the reorder queue displays the following columns:
| Column | Description | Example |
|---|---|---|
| Product Name | Display name of the product | Bluetooth Speaker - Red |
| SKU | Stock keeping unit identifier | SPK-RED-01 |
| Current Stock | Units available right now (from latest inventory snapshot) | 3 |
| Daily Velocity | Average units sold per day (from recent sales history) | 4.5/day |
| Days of Stock Remaining | Estimated days until stockout (current stock ÷ daily velocity) | 0.7 days |
| Estimated Lost Revenue | Projected revenue lost if the product sells out before restock | $450.00 |
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:
- Supplier — the product's default supplier
- Product — the product name and SKU
- Suggested Quantity — calculated to cover the product's lead time plus a safety buffer
- Unit Cost — from the product's cost history
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.
- Initial page loads the first 20 recommendations
- Each Load More click fetches the next 20
- The button disappears when all recommendations have been loaded
- Active search and urgency filters are preserved across loads
Data Sources
| Data | Source | Update Frequency |
|---|---|---|
| Recommendations list | reorder_recommendations table | Real-time from database |
| Current stock levels | inventory_snapshots table | Updated during product sync |
| Daily velocity | sales_history table | Updated during order sync |
| Estimated lost revenue | Computed: daily velocity × days until stockout × unit price | Computed on page load |
| Days of stock remaining | Computed: current stock ÷ daily velocity | Computed on page load |
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": [...]
}
}