Northwind ERP Operations
Quick start
The shared Northwind ERP API runs at a base URL provided by the task runner as
<TASK_ENV_BASE_URL>. All endpoints return JSON arrays or objects. No
authentication is required.
# Verify connectivity
curl -s "<TASK_ENV_BASE_URL>/warehouses"
Full endpoint catalog and field shapes are in references/api.md.
Domain-specific decision rules and workflows for each operations desk are in
references/domains.md.
Core formula: effective available inventory
Always compute effective available for any stock decision:
effective_available = on_hand - reserved - quarantined
This single formula drives every inventory-status check in the system. Values
come from the /inventory list. When comparing against a required quantity,
use the effective available at the relevant warehouse, not total on_hand.
Every inventory decision also checks two product-master thresholds:
- safety_stock: the floor you must not dip below when allocating
- overstock_threshold: the ceiling above which a SKU is over-stocked
Both are on the /products record for each SKU.
Entity relationships
When solving a task, trace the relationship chain needed for the decision:
- Order → lines have SKU, quantity, warehouse_id; order has customer_id, shipping_speed, destination_zip
- Customer → account_status (active | blocked | review_required), risk_flag (none | fraud_watch | credit_watch), tier
- Product → active flag, safety_stock, overstock_threshold, supplier_id, unit_cost, weight_lb
- Inventory → on_hand, reserved, quarantined (per SKU × warehouse)
- Warehouse → warehouse_id, zip, region
- Supplier → quality_status (approved | watch | quality_hold), region
- Purchase Order → sku, warehouse_id, supplier_id, quantity, status, eta
- BOM → components with quantity_per_kit per SKU
- Incident → supplier_id, sku, severity, status, incident_type, resolution_cost, open_date, close_date
- Shipping Quote → total_cost, zone_distance, service_days (from warehouse × destination_zip × weight × speed)
Decision trees by desk
Expedite / dispatch
For each order in the wave:
1. Fetch order lines and customer.
2. For each line, compute effective_available at the order warehouse.
3. inventory_status:
- All lines covered AND active → "ready"
- All covered but one dips into safety_stock → "low_stock"
- Any line short AND all active → "shortage"
- Any line with inactive product → "inactive_sku" or "inactive_and_shortage"
4. customer_exception:
- account_status=blocked → "account_blocked"
- risk_flag=fraud_watch → "fraud_watch"
- risk_flag=credit_watch → "credit_watch"
- account_status=review_required → "review_required"
- otherwise → "none"
5. final_decision (precedence order):
- account_blocked or fraud_watch → "reject_hold"
- review_required or credit_watch → "manual_review"
- inactive_sku → "manual_review"
- shortage → "backorder"
- low_stock → "delayed_release"
- ready → "ship_now"
Replenishment / kit build
For each kit target:
1. Load BOM components and quantities_per_kit.
2. total_required = quantity_per_kit × build_quantity.
3. Aggregate by SKU across kits.
4. For each SKU at the target warehouse:
effective_available = on_hand - reserved - quarantined
target_effective_available = effective_available - total_required
5. Check timely POs: open or confirmed, same warehouse, eta ≤ build_date + 1 day.
6. If timely_po_qty covers the gap → "timely_po_covered", exclude.
7. If target_effective_available > overstock_threshold → "overstock_excluded".
8. For remaining gap, check other warehouses (avoid dipping below their safety_stock).
9. Purchase requisition for any remaining gap.
Supplier incident scorecard
1. Filter incidents by open_date in the analysis window.
2. Group by supplier_id, join supplier name and quality_status.
3. Per supplier: counts, percentages (of filtered population), resolution costs,
average duration, RMA vs WORK_ORDER split, open/closed counts, severe counts.
4. Apply recommendation policy by precedence:
ESCALATE_SUPPLIER > PROCESS_REVIEW > WATCHLIST > MONITOR.
Allocation / transfer
For each line in the wave:
1. Check customer account_status and risk_flag → manual_review if blocked.
2. Check product active flag → manual_review if inactive.
3. Compute effective_available at requested warehouse.
4. If covers full qty → "ship".
5. If partial: check other warehouses for transfer (use their effective_available - safety_stock).
6. If no transfer possible → "backorder".
Procurement quality risk
1. Filter incidents by the analysis window for the target suppliers.
2. Count recent incidents, RMAs, severe/critical, open incidents per supplier.
3. Collect affected SKUs from incidents and POs.
4. Decision (precedence):
- quality_hold with severe history → "freeze_new_replenishment"
- watch with moderate severity → "buyer_review_required"
- otherwise → "monitor_only"
General rules
- Always sort output lists in ascending order by their primary key (order_id,
sku, supplier_id, etc.) unless the task template says otherwise.
- Round all currency values to exactly two decimal places.
- Use
null for absent transfer_from values; never use the string "null".
- Shipping quotes require: warehouse_id, destination_zip, weight_lb, and speed.
Compute line weight from
/products weight_lb × line quantity. Use the
order-level shipping_speed and destination_zip for the quote.
- When a PO status is "open" or "confirmed" and its eta is before or on the
needed date (considering a +1 day buffer if the task allows), it is timely.
- Never duplicate covered quantities between transfer and purchase paths.
1---2name: northwind-erp-73description: "Interact with the Northwind Components shared ERP REST API to solve operations desk tasks including dispatch/expedite decisions, replenishment/kit-build planning, supplier incident scorecards, cross-warehouse allocation, and procurement quality-risk controls. Use when working with Northwind operations, ERP queries, order fulfillment, inventory analysis, BOM/kit replenishment, supplier quality review, purchase-order decisions, or shipping quotes. Triggers on Northwind Components, expedite queue, kit build, replenishment, supplier scorecard, allocation desk, procurement control, or any task referencing a shared ERP API at a task environment base URL."4license: MIT5compatibility: designed for deepagents-code6metadata:7 source: https://skillmd.com/skills/prism-shadow/northwind-erp-78---910# Northwind ERP Operations1112## Quick start1314The shared Northwind ERP API runs at a base URL provided by the task runner as15`<TASK_ENV_BASE_URL>`. All endpoints return JSON arrays or objects. No16authentication is required.1718```bash19# Verify connectivity20curl -s "<TASK_ENV_BASE_URL>/warehouses"21```2223Full endpoint catalog and field shapes are in [references/api.md](references/api.md).24Domain-specific decision rules and workflows for each operations desk are in25[references/domains.md](references/domains.md).2627## Core formula: effective available inventory2829Always compute effective available for any stock decision:3031```32effective_available = on_hand - reserved - quarantined33```3435This single formula drives every inventory-status check in the system. Values36come from the `/inventory` list. When comparing against a required quantity,37use the effective available at the relevant warehouse, not total on_hand.3839Every inventory decision also checks two product-master thresholds:4041- **safety_stock**: the floor you must not dip below when allocating42- **overstock_threshold**: the ceiling above which a SKU is over-stocked4344Both are on the `/products` record for each SKU.4546## Entity relationships4748When solving a task, trace the relationship chain needed for the decision:4950- **Order** → lines have SKU, quantity, warehouse_id; order has customer_id, shipping_speed, destination_zip51- **Customer** → account_status (active | blocked | review_required), risk_flag (none | fraud_watch | credit_watch), tier52- **Product** → active flag, safety_stock, overstock_threshold, supplier_id, unit_cost, weight_lb53- **Inventory** → on_hand, reserved, quarantined (per SKU × warehouse)54- **Warehouse** → warehouse_id, zip, region55- **Supplier** → quality_status (approved | watch | quality_hold), region56- **Purchase Order** → sku, warehouse_id, supplier_id, quantity, status, eta57- **BOM** → components with quantity_per_kit per SKU58- **Incident** → supplier_id, sku, severity, status, incident_type, resolution_cost, open_date, close_date59- **Shipping Quote** → total_cost, zone_distance, service_days (from warehouse × destination_zip × weight × speed)6061## Decision trees by desk6263### Expedite / dispatch6465```66For each order in the wave:67 1. Fetch order lines and customer.68 2. For each line, compute effective_available at the order warehouse.69 3. inventory_status:70 - All lines covered AND active → "ready"71 - All covered but one dips into safety_stock → "low_stock"72 - Any line short AND all active → "shortage"73 - Any line with inactive product → "inactive_sku" or "inactive_and_shortage"74 4. customer_exception:75 - account_status=blocked → "account_blocked"76 - risk_flag=fraud_watch → "fraud_watch"77 - risk_flag=credit_watch → "credit_watch"78 - account_status=review_required → "review_required"79 - otherwise → "none"80 5. final_decision (precedence order):81 - account_blocked or fraud_watch → "reject_hold"82 - review_required or credit_watch → "manual_review"83 - inactive_sku → "manual_review"84 - shortage → "backorder"85 - low_stock → "delayed_release"86 - ready → "ship_now"87```8889### Replenishment / kit build9091```92For each kit target:93 1. Load BOM components and quantities_per_kit.94 2. total_required = quantity_per_kit × build_quantity.95 3. Aggregate by SKU across kits.96 4. For each SKU at the target warehouse:97 effective_available = on_hand - reserved - quarantined98 target_effective_available = effective_available - total_required99 5. Check timely POs: open or confirmed, same warehouse, eta ≤ build_date + 1 day.100 6. If timely_po_qty covers the gap → "timely_po_covered", exclude.101 7. If target_effective_available > overstock_threshold → "overstock_excluded".102 8. For remaining gap, check other warehouses (avoid dipping below their safety_stock).103 9. Purchase requisition for any remaining gap.104```105106### Supplier incident scorecard107108```109 1. Filter incidents by open_date in the analysis window.110 2. Group by supplier_id, join supplier name and quality_status.111 3. Per supplier: counts, percentages (of filtered population), resolution costs,112 average duration, RMA vs WORK_ORDER split, open/closed counts, severe counts.113 4. Apply recommendation policy by precedence:114 ESCALATE_SUPPLIER > PROCESS_REVIEW > WATCHLIST > MONITOR.115```116117### Allocation / transfer118119```120For each line in the wave:121 1. Check customer account_status and risk_flag → manual_review if blocked.122 2. Check product active flag → manual_review if inactive.123 3. Compute effective_available at requested warehouse.124 4. If covers full qty → "ship".125 5. If partial: check other warehouses for transfer (use their effective_available - safety_stock).126 6. If no transfer possible → "backorder".127```128129### Procurement quality risk130131```132 1. Filter incidents by the analysis window for the target suppliers.133 2. Count recent incidents, RMAs, severe/critical, open incidents per supplier.134 3. Collect affected SKUs from incidents and POs.135 4. Decision (precedence):136 - quality_hold with severe history → "freeze_new_replenishment"137 - watch with moderate severity → "buyer_review_required"138 - otherwise → "monitor_only"139```140141## General rules142143- Always sort output lists in ascending order by their primary key (order_id,144 sku, supplier_id, etc.) unless the task template says otherwise.145- Round all currency values to exactly two decimal places.146- Use `null` for absent transfer_from values; never use the string `"null"`.147- Shipping quotes require: warehouse_id, destination_zip, weight_lb, and speed.148 Compute line weight from `/products` weight_lb × line quantity. Use the149 order-level shipping_speed and destination_zip for the quote.150- When a PO status is "open" or "confirmed" and its eta is before or on the151 needed date (considering a +1 day buffer if the task allows), it is timely.152- Never duplicate covered quantities between transfer and purchase paths.