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_built = 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.

For developers

Code paths + invariants

ConcernWhere
Standalone invariantworkorder.createdfrom IS NULL
Assembly Build linkageassemblybuild.createdfrom = wo.id
FG creditinventory_balance.quantityavailable += quantity_built 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_built, 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

Related

Adjacent