Wiki · WO master » Path 2 · R593

NS work order — Path 2 · inventory build

When the company builds product into inventory for future sales / sell-through. Standalone WO — no parent SO, no customer side. Production runs, Assembly Build entered, FG added to inventory at correct location, components consumed, WO closes naturally. FG remains available for future SOs.

PATH 2 · inventory build WO PO# field still TBD globally (N/A on Path 2)
What this is

WO for inventory build (no parent SO)

Path 2 covers stock builds — the company assembling product into inventory for future sales / sell-through. Build reasons include reorder_point breach, sales forecast, bid pre-build, USDA drawdown commit, or R&D pilot. WO is entered standalone in NetSuite (workorder.createdfrom = NULL). Item / qty / location / component requirements are confirmed, production runs, Assembly Build is entered (Mike approves at /assembly-build.html), FG is added to inventory at the correct location, components are consumed through the build process, and the WO closes naturally. FG remains available for future Sales Orders.

No customer side. No Item Fulfillment, no Finance handoff on the WO itself. Finance enters later when a future SO actually sells the FG. This is why Path 2 is risk 2 (vs Path 1 risk 3) — no customer pressure, no AR cycle, no order.closed event on this contract.

Diagram: ns-work-order-path-2-inventory-build.html. Master wiki: wiki-ns-work-order-master.html. Other path: Path 1 from sales order. Workflow contract: wo_lifecycle_inventory_build_path (risk 2).

When to use it

Trigger

No customer side

Path 2 has no parent SO, no customer PO#, no Item Fulfillment, no Finance handoff on the WO itself. WO terminates at FG availability. Finance enters when the FG is eventually sold via a future SO.

WO PO# field — TBD globally (does not apply here)

Mike's TBD on WO.memo (Path 1 customer PO# threading) does not block Path 2 — there's no customer PO# to thread. On Path 2, memo carries freeform operator notes (e.g. "bid B5875 pre-build for QBL"). But every WO Schema reference still globally flagged TBD until Mike confirms the Path 1 semantic.

Worked example

Pre-build RSF burrito kits for B5875 QBL

WO-4499 · standalone build · bid_pre_build

RSF-BURR-KIT on-hand = 0, reorder_point = 240, B5875 QBL approaching. Operator dispatches Path 2; WO-4499 created standalone (createdfrom = NULL), assemblyitem "RSF-BURR-KIT", quantity 480, location 3 (Heartland), custbody_build_reason = "bid_pre_build", memo = "bid B5875 pre-build for QBL" (operator note — not a customer PO#). Item / qty / location / components confirmed. BOM lookup: TORTILLA-LG, BEAN-1LB, SAUCE-PAC on hand at location 3. Production runs; crew completes build for 472 (8 waste). Mike approves Assembly Build (AB-1902, createdfrom = 4499, quantity = 472, waste = 8, location = 3). FG credited: inventory_balance.quantityavailable += 472 for RSF-BURR-KIT at location 3 (was 0, now 472). Components consumed (WkOrdIss per line: TORTILLA-LG -480, BEAN-1LB -480, SAUCE-PAC -480). WO closes naturally (status='Built'). FG remains available for future SOs. When B5875 release order arrives next week, the SO will allocate against this FG.

Step-by-step

From trigger to FG inventory (6 stages)

  1. Trigger fires — one of: reorder-point breached, demand forecast dip, bid pre-build (B5875 QBL), USDA drawdown, R&D first article. Operator confirms reason.
  2. WO created standaloneWorkOrd: createdfrom IS NULL, assemblyitem, quantity, location, custbody_build_reason (TBD field name), memo = operator's internal note. HITL gate per ADR-031.
  3. Component review — BOM × quantity vs. inventoryitemlocations at WO.location. Shortage → stage PO via PO Path 2 (inventory). Sufficient → advance.
  4. Production runs — crew assembles. Waste tracked. No urgency from a customer SO — scheduled when capacity allows.
  5. Assembly Build approval — HITL via /assembly-build.htmlproposed_actions → Mike approves. NS posts AsmBuild: createdfrom = wo.id, item, quantity, custbody_waste, location. WkOrdIss rows fire per component.
  6. FG credit + WO closeinventory_balance.quantityavailable += quantity at WO.location. WO.status = 'Built'. No IF, no CustInvc, no Finance handoff — the FG sits in inventory until a future SO consumes it via SO Path 1.
Outcomes

What is true after Path 2 completes

Failure modes

What can go wrong + recovery

FailureDetectionRecovery
BOM component shortageStep 3 inventory check failsStage emergency PO via PO Path 2 inventory · WO holds until components arrive
Build short (yield variance)AsmBuild quantity < WO quantity × 0.95Variance audit fires · HITL review · either accept short build (FG less than target) or re-run for remainder if reason is time-sensitive (e.g., bid pre-build)
Build overAsmBuild quantity > WO quantityAccept excess FG to inventory · reflexion notes over-build for future schedule calibration
WO cancel before buildTrigger reason no longer valid (forecast revised, bid lost, reorder point recalculated)Void WO with reason in memo · no inventory side-effect (components not yet issued)
WO cancel mid-buildComponents already issued (WkOrdIss exists) but no AsmBuild yetReverse WkOrdIss (components back to inventory) · void WO · document reason
AsmBuild void after postBad build, defective FG discovered post-buildVoid AsmBuild · reverse FG credit · rebuild or scrap (depending on defect)
FG sits unsoldBuild was speculative (forecast / bid pre-build that didn't materialize)Inventory aging report flags · potential write-down or reallocation to USDA/donation
Bid pre-build is too earlyQBL still 30+ days outReflexion captures · pre-build window calibration; freshness window of FG matters for shelf-life items
Related

Adjacent flows + diagrams

For developers

Code paths + invariants

ConcernWhere
Standalone invariantworkorder.createdfrom IS NULL
Assembly Build linkageassemblybuild.createdfrom = wo.id
FG creditinventory_balance.quantityavailable += quantity at location_id
Components consumedtransactions (WkOrdIss) per BOM line
No customer sideno item_fulfillments row; no customer_invoices row; no wo.finance_alert_fired event
HITL gate/assembly-build.html → proposed_actions → Mike approves
Future SO consumptionSO Path 1 inventory allocates this FG when ordered
Changelog

Dated trail

DateRoundChangeTouched by
2026-05-26R593Path 2 wiki created as part of WO master split (matches R592 SO pattern). Split into master + 2 path-details. Mike + Claude.Mike + Claude
Schema · data contract

Path 2 sub-contract spec

Sub-contract: wo_lifecycle_inventory_build_path · risk 2 · dispatched by WO master when origin = inventory_build.

Path 2 NS records (field-level)

NS recordKey fieldsSample valuesStatus
WorkOrdtranid, createdfrom, assemblyitem, quantity, location"WO-4499", NULL, "RSF-BURR-KIT", 480, 3REAL
WorkOrdbodyFields.memo — operator note (NOT customer PO# — no parent SO)"bid B5875 pre-build for QBL"REAL (but field still TBD globally per Mike review)
WorkOrdbodyFields.custbody_build_reason"bid_pre_build"REAL
WkOrdIss (per component)per-component consumeTORTILLA-LG -480 · BEAN-1LB -480 · SAUCE-PAC -480REAL
AsmBuildtranid, createdfrom, quantity, custbody_waste, location"AB-1902", 4499, 472, 8, 3REAL

Path 2 verify_checks

namewindowexpected
wo_standalone60 minwork_orders.createdfrom IS NULL (no parent SO)
assembly_build_posted2880 minassembly_builds.wo_id has ≥1 row
fg_credited2880 mininventory_balance.quantityavailable increased by build qty at location_id
components_debited2880 mintransactions WHERE type='WkOrdIss' AND wo_id=? has ≥1 row per BOM line
wo_closed2880 minwork_orders.status = 'Built'
fg_available_for_future_so2880 mininventory_balance.quantityavailable > 0 (allocatable to future SOs)

Inputs

FieldTypeDescription
assembly_itemstringNS assembly item_code. Required.
quantityintegerTarget build qty. Required.
location_idintegerNS location id where FG will land. Required.
build_reasonenumreorder_point · forecast · bid_pre_build · usda_drawdown · rd_pilot · other. Optional.
Runbook

When Path 2 breaks

FG landed at wrong location

  1. Find the FG row: SELECT * FROM inventory_balance WHERE item_code=? ORDER BY updated_at DESC LIMIT 5
  2. Check WO.location vs AsmBuild.location: SELECT id, location FROM work_orders / assembly_builds
  3. NS location transfer: issue a transfer order from wrong-location to correct-location for the FG qty

Components short during build (Path 2 can stage PO first)

  1. Check on-hand: SELECT item_code, quantityavailable FROM inventory_balance WHERE item_code IN (?) AND location_id=?
  2. Stage PO: if any component short, manually stage a PO before kicking off the build (no customer pressure on Path 2)
  3. Auto-stage (backlog): when review_components verify returns warn, auto-stage PO
Backlog

Open questions for Path 2