Northwind ERP Decisions
Use this skill for the Northwind Components task family that turns live ERP data into strict JSON decisions.
Read first
- Open the prompt and every file in
input/payloads/. - Treat
answer_template.jsonas the contract. Copy its top-level keys, nested keys, enum values, precision, and ordering rules exactly. - Treat any memo file as policy. Follow its filters, date windows, and decision rules.
- If the prompt says to return only JSON, return only JSON. No markdown, no code fences, no commentary.
Recognize the task family
The template usually tells you what kind of work this is:
wave_id+records+shipping_quote-> expedite queuetask_id+kit_targets+component_plan+purchase_requisitions-> kit replenishmentanalysis_window+supplier_scorecard+top_escalation_suppliers-> supplier incident scorecardwave_id+line_actions+transfer_requests+order_rollup-> mixed-warehouse transfer allocationanalysis_window+supplier_decisions+held_po_ids+release_supplier_ids-> procurement quality control
Solve in this order
- Identify the task family from the template and memo.
- Pull the live records needed from the task environment using the supplied base URL.
- Compute the decision fields from the live records and the memo rules.
- Build the output from the template outward.
- Self-check every required key, sort order, count, and rounded value before finalizing.
Data sources
Use the documented endpoints the task calls for. Typical families are:
- Expedite queues:
/orders,/customers,/products,/inventory,/warehouses,/shipping/quote - Kit and replenishment plans:
/boms,/products,/inventory,/purchase_orders,/warehouses - Supplier incident scorecards:
/incidents,/suppliers - Mixed-warehouse transfer decisions:
/orders,/customers,/products,/inventory,/warehouses - Procurement quality controls:
/incidents,/suppliers,/purchase_orders,/products
Prefer bulk endpoints first, then fetch individual IDs that matter. Use the task's base URL from the prompt or environment note; do not hardcode a host.
Common rules
- Output valid JSON only.
- Keep every required key, even when the value is empty or zero.
- Match list ordering exactly as the template says.
- Round currency to 2 decimals and percentages to the precision requested by the template.
- Keep internal calculations at full precision until the final writeout.
- Do not invent values from older examples.
- Keep IDs, enum values, and status labels exactly as the template defines them.
- If a summary object exists, derive it from the detailed rows and verify the counts reconcile.
Family-specific checks
Expedite queue / hold-or-release
- Classify inventory by the live line status and the product state.
- Use customer or account status to choose the decision and next action.
- Get shipping quotes from the live quote endpoint, not from arithmetic guesswork.
- Keep blocked orders limited to account or customer-risk stops, not product-only review cases.
Kit replenishment / BOM planning
- Aggregate demand across all requested builds.
- Compute target effective availability after protected stock is excluded where the memo says so.
- Use timely same-warehouse purchase orders before creating new purchase requisitions.
- Create transfer requests only for uncovered quantities that can move from another warehouse.
- List excluded components when stock is already covered or should not receive more stock.
Supplier incident scorecards
- Filter incidents to the requested date window.
- Count by supplier, then compute percentage, cost, average duration, open count, and severe count.
- Apply the recommendation policy in precedence order.
- Include only suppliers with filtered incidents in the scorecard.
- Build the escalation list from suppliers whose final recommendation is
ESCALATE_SUPPLIER.
Mixed-warehouse transfer allocations
- Compute requested-warehouse effective availability after reserved, quarantined, and buffer stock are removed.
ship_quantityis the amount released from the requested warehouse.- For transfer lines, pick one source warehouse for the uncovered quantity and keep any usable requested-warehouse quantity in
ship_quantity. - For blocked lines, use
manual_reviewwith the correct reason. - Make the order rollup match the line-level actions exactly.
Procurement quality controls
- Filter recent incidents to the analysis window.
- Populate supplier status, recent incident/RMA/severe/open counts, affected SKUs, and up to five sample incident IDs.
- Hold only the open or confirmed purchase orders that the decision requires.
- Put monitor-only suppliers in
release_supplier_ids. - Keep held PO IDs unique and sorted.
Final self-check
- Parse the result as JSON.
- Verify every required top-level key and nested required key exists.
- Verify each array is sorted as requested.
- Verify summary totals reconcile with the detailed rows.
- Remove any accidental prose or trailing commas.