NetSuite work order — master

WO intake → classify origin (from SO vs inventory build) → dispatch to path sub-contract → Assembly Build → FG to inventory → (Path 1 only) Item Fulfillment → ★ Finance handoff → invoice → payment → close

High-altitude master view of the entire WO process. WO is the production side of the transaction — used when the company assembles or builds finished goods. There are two main categories. Path 1 — from a Sales Order: one or more SO lines require assembly, WO is created FROM the SO (preserves SO ↔ WO link), production runs, Assembly Build is entered, FG credited, then the SO is fulfilled and Finance gets the handoff. Path 2 — inventory build: WO is created standalone for stock / future SOs, production runs, FG goes to inventory, WO closes — no customer side. The customer PO# field on the WO body is TBD pending Mike's review (expected pattern: bodyFields.memo mirroring the PO and Vendor Bill threading). Every WO Schema field reference is flagged TBD until confirmed.

D1-mirrored from NS HITL on Assembly Build approval Path 1 · from SO Path 2 · inventory build WO PO# field TBD (Mike review)

Pipeline — WO intake → 2 path dispatch → Assembly Build → close

idle
NS work order lifecycle master — WO intake → classify origin (from SO vs inventory build) → dispatch to path sub-contract → Assembly Build → FG to inventory at correct location → Path 1 only: Item Fulfillment + Finance handoff + invoice + payment + close 01 / WO intake (production side) 02 / Classify WO origin · dispatch to sub-contract PATH 1 / WO from sales order · see ns-work-order-path-1-from-sales-order.html PATH 2 / Inventory build · see ns-work-order-path-2-inventory-build.html 03 / Common production lane · component review → build → Assembly Build → FG to inventory 04 / Path 1 continuation · SO fulfillment + Finance handoff 05 / Path 1 close · invoice · payment · order close PATH 2 close · WO closes naturally · FG available for future SOs WO INTAKE — Production side request enters NetSuite. SOURCES upstream: SO with assembly_line → Path 1 inventory need: reorder point / forecast / bid pre-build / USDA / R&D pilot → Path 2 TARGET ns_record: workorder d1_table: work_orders + transactions (type=WorkOrd) STATUS: REAL WO intake request from SO assembly_line or inventory build need FRONTEND · production side i BUILD REASONS — Mike's actual triggers. REASONS SO line with itemtype=Assembly (Path 1) reorder_point breach (Path 2) forecast (Path 2) bid pre-build (Path 2) USDA drawdown (Path 2) R&D pilot run (Path 2) STATUS: REAL why are we building? SO · reorder · forecast bid · USDA · R&D EXTERNAL · build reasons i WO PO# FIELD — TBD pending Mike review. EXPECTED PATTERN bodyFields.memo (mirrors PO + Vendor Bill threading) APPLIES TO Path 1 only — WO created FROM SO threads SO.otherrefnum into WO body field Path 2 — no customer PO# (no parent SO) STATUS: TBD — flagged across every Schema reference until Mike confirms WO customer PO# field TBD — Mike review pending expected: bodyFields.memo SECURITY · TBD field i CLASSIFY ORIGIN — Dispatch to sub-contract. LOGIC if WO originates from an SO assembly_line → Path 1 (wo_lifecycle_from_sales_order_path) else (stock build / forecast / reorder / pre-build) → Path 2 (wo_lifecycle_inventory_build_path) TABLES read: items.itemtype · transactions (parent SO if any) STATUS: REAL (operator today) · STUB (auto-classify on /api/wo/create) classify WO origin from SO assembly_line → Path 1 inventory build need → Path 2 SECURITY · operator-driven · auto STUB i PATH 1 · WO CREATED FROM SO — Summary. See ns-work-order-path-1-from-sales-order.html for field-level depth. WORKFLOW wo_lifecycle_from_sales_order_path (sub-contract dispatched from master) SUMMARY WO.createdfrom = so.id (preserves SO↔WO link end-to-end) Components reviewed → production → Assembly Build → FG to inventory → SO fulfilled → Item Fulfillment → ★ Finance handoff → invoice → payment → close LINKAGE workorder.createdfrom = so.id assemblybuild.createdfrom = wo.id itemfulfillment.createdfrom = so.id (NOT wo.id) Customer PO# threading: WO body field TBD (Mike review pending; expected bodyFields.memo) ALTERNATE If FG already on hand → fulfill SO from inventory + close WO marked "unused" HITL /assembly-build.html → proposed_actions → Mike approves STATUS: REAL (linkage + flow); TBD (WO PO# field confirmation) PATH 1 · WO created FROM SO workorder.createdfrom = so.id · preserves SO ↔ WO link components → build → AsmBuild → FG → SO fulfilled → Finance alt: FG on hand → fulfill from inventory + close WO WO PO# field: TBD (Mike review pending; expected memo) PATH 1 · wo_lifecycle_from_sales_order_path MESSAGEBUS · see ns-work-order-path-1-from-sales-order.html i PATH 2 · INVENTORY BUILD — Summary. See ns-work-order-path-2-inventory-build.html for field-level depth. WORKFLOW wo_lifecycle_inventory_build_path (sub-contract dispatched from master) SUMMARY Need identified → WO entered standalone (no parent SO) → confirm item/qty/location/components → review components → production → Assembly Build → FG to inventory → components consumed → WO closes naturally → FG available for future SOs LINKAGE workorder.createdfrom = NULL (no parent SO) assemblybuild.createdfrom = wo.id NO CUSTOMER SIDE — no Item Fulfillment, no Finance alert on the WO itself. Finance enters when the FG is eventually sold via a future SO. STATUS: REAL PATH 2 · inventory build for stock workorder.createdfrom = NULL · no parent SO need → WO → confirm → build → AsmBuild → FG → close FG remains available for future Sales Orders no customer side · no Finance handoff on the WO PATH 2 · wo_lifecycle_inventory_build_path DATABASE · see ns-work-order-path-2-inventory-build.html i COMPONENT AVAILABILITY REVIEW — Common to both paths. ACTION lookup: assembly_bom WHERE assembly_item = ? check: inventory_balance.quantityavailable per component at location_id warn: if short components (Path 1 can backorder; Path 2 stages PO) TABLES read: assembly_bom · inventory_balance STATUS: REAL component review BOM lookup · on-hand check at correct location DATABASE · assembly_bom i PRODUCTION / ASSEMBLY COMPLETED — Floor work. ACTION crew executes build on production floor components debited per BOM yield + waste captured TABLES write: inventory_balance (component debit) HITL /assembly-build.html → Mike approves at Assembly Build step STATUS: REAL production / assembly crew executes build components consumed MESSAGEBUS · floor i ASSEMBLY BUILD COMPLETED IN NETSUITE — The decisive build record. NS RECORD: AsmBuild ACTION bodyFields.createdfrom = wo.id bodyFields.assemblyitem bodyFields.quantity_built bodyFields.location HITL Mike approves at /assembly-build.html → proposed_actions TABLES write: assembly_builds · transactions (Build) STATUS: REAL Assembly Build in NetSuite NS AsmBuild record createdfrom = wo.id BACKEND · HITL approve i FG ADDED TO INVENTORY AT CORRECT LOCATION — Mike's exact phrasing. ACTION inventory_balance.quantityavailable += quantity_built (item_code, location_id) TABLES write: inventory_balance STATUS: REAL FG added to inventory at correct location quantityavailable ++ DATABASE · FG credit i COMPONENTS CONSUMED — explicit per Mike. ACTION formal component consumption posted (WkOrdIss) inventory_balance net effect = -components, +FG TABLES write: transactions (WkOrdIss) STATUS: REAL components consumed workorderissue posted net: -components +FG BACKEND · consume i SO FULFILLED TO CUSTOMER (Path 1 only) — WO complete + FG on hand → SO ships. ACTION status: itemfulfillment → 'Shipped' itemfulfillment.createdfrom = so.id (NOT wo.id) itemfulfillment.otherrefnum = SO.otherrefnum (customer PO# threading) TABLES write: item_fulfillments · transactions STATUS: REAL SO fulfilled · Item Fulfillment createdfrom = so.id otherrefnum threads from SO BACKEND · Path 1 only i ★ AUTOMATION ALERT → FINANCE (Path 1 only) — THE KEY HANDOFF. TRIGGER itemfulfillment.status = 'Shipped' ACTION fire: NS workflow alert to Finance emit: events.wo.finance_alert_fired STATUS: STUB — platform event fires (REAL); NS workflow build pending ★ automation alert → Finance STUB · events.wo.finance_alert_fired fires FINANCE · Path 1 only handoff i FINANCE REVIEW (Path 1 only) — Finance reviews the fulfillment before invoicing. CHECKS fulfilled qty matches expected pricing carried through correctly customer terms + tax handling correct STATUS: REAL · Finance-driven Finance review qty · pricing · terms CLOUD · Finance role i INVOICE CUSTOMER (Path 1 only). ACTION CustInvc posted; otherrefnum threads from SO TABLES write: customer_invoices · invoice_lines STATUS: REAL invoice customer CustInvc · otherrefnum BACKEND · CustInvc i PAYMENT RECEIVED + APPLIED (Path 1 only). ACTION CustPymt posted; payment_applications matched TABLES write: customer_payments · payment_applications STATUS: REAL payment received CustPymt · apply DATABASE · CustPymt i ORDER CLOSED (Path 1 only). ACTION SO status = 'Closed' events.order.closed fired TABLES write: transactions · events STATUS: REAL order closed SO → Closed BACKEND · order.closed i WO CLOSES NATURALLY (Path 2 only) — once Assembly Build completed. ACTION work_orders.status = 'Built' NO customer side — no Item Fulfillment, no Finance alert on the WO itself. TABLES write: work_orders STATUS: REAL WO closes naturally status = 'Built' DATABASE · Path 2 only i FG AVAILABLE FOR FUTURE SOs (Path 2 only). NOTE Finished goods remain available for future Sales Orders. Finance enters when FG is eventually sold via a future SO. TABLES read: inventory_balance (allocatable to future SOs) STATUS: REAL FG available for future SOs allocatable to future orders DATABASE · Path 2 only i → Path 1 (sub-contract) → Path 2 (sub-contract) both paths converge through component review → build → Assembly Build → FG Path 1 only → Path 2 only → WO closes LEGEND Path 1 from SO Path 2 inventory build ★ Finance handoff (Path 1) TBD — WO PO# field (Mike review pending)

Phase detail — Mike's actual 2-category WO process

01 WO intake (production side) REAL

Work Order is the production side of the transaction — used when the company assembles or builds finished goods. Intake comes from either an upstream SO assembly_line (Path 1) or an inventory build need (Path 2).
NS record
workorder
D1 tables
work_orders · transactions (type='WorkOrd')
Build reasons
SO assembly_line · reorder_point · forecast · bid pre-build · USDA drawdown · R&D pilot

02 Classify WO origin REAL · operator auto STUB

Origin determines path. WOs from an SO assembly_line dispatch to Path 1 (preserves SO ↔ WO link). All other build reasons dispatch to Path 2 (inventory build for stock).
Path 1
origin = from_sales_orderwo_lifecycle_from_sales_order_path
Path 2
origin = inventory_buildwo_lifecycle_inventory_build_path

P1 Path 1 — WO created FROM Sales Order PATH 1 REAL WO PO# TBD

For when one or more items on a customer SO require assembly. WO created FROM the SO so records stay linked end-to-end. After production + Assembly Build + FG to inventory, the SO is fulfilled, Item Fulfillment fires, Finance gets the handoff, invoice posts, payment is applied, order closes. If the FG is already on hand, fulfill SO from inventory and close the WO marked unused.
NS records
workorder · assemblybuild · itemfulfillment
Linkage
workorder.createdfrom = so.id · assemblybuild.createdfrom = wo.id · itemfulfillment.createdfrom = so.id
WO PO# field
TBD — Mike review pending. Expected: bodyFields.memo
HITL
/assembly-build.htmlproposed_actions → Mike approves

P2 Path 2 — Inventory build for stock PATH 2 REAL

For when the company builds product into inventory for future sales / sell-through. No parent SO. WO entered standalone, item/qty/location/components confirmed, production runs, Assembly Build completed, FG added to inventory, components consumed, WO closes naturally. FG remains available for future SOs.
NS records
workorder · assemblybuild
Linkage
workorder.createdfrom = NULL · assemblybuild.createdfrom = wo.id
No customer side
no Item Fulfillment · no Finance handoff · Finance enters later when FG is sold via a future SO

03 Component availability review REAL

Common to both paths. Operator confirms BOM availability, sub-assemblies, and sourcing at the correct location.
Tables read
assembly_bom · inventory_balance

04 Production / assembly completed REAL

Crew executes the build on the production floor. Components are debited per BOM during the build.
Tables write
inventory_balance (component debit)

05 Assembly Build completed in NetSuite REAL

The decisive build record. Mike approves at /assembly-build.html. NS posts the AsmBuild transaction; D1 mirrors. assemblybuild.createdfrom = wo.id.
NS record
assemblybuild (AsmBuild)
HITL
/assembly-build.htmlproposed_actions → Mike approves

06 Finished goods added to inventory at correct location REAL

Mike's exact phrasing — the FG must land at the correct location. Components are consumed through the build process; net inventory effect: -components, +FG.
Tables write
inventory_balance (FG credit at correct location_id)

07 SO fulfilled (Path 1 only) PATH 1 REAL

Once FG is on hand, the SO is fulfilled to the customer. Item Fulfillment completed.
NS record
itemfulfillment (status='Shipped')
Linkage
itemfulfillment.createdfrom = so.id (NOT wo.id)

08 ★ Automation alert → Finance (Path 1 only) REAL (concept) code path verify

Fires after Item Fulfillment. Same handoff signal as the SO master uses — this is the bridge between Operations and Finance for assembly-driven orders.
Trigger
itemfulfillment.status → 'Shipped'
Event
events.wo.finance_alert_fired
STUB
NS workflow build pending; platform-side event emits today

09 Finance review · invoice · payment · close (Path 1 only) REAL

Finance reviews fulfillment, posts CustInvc, monitors AR terms, payment received + applied, order closed.
NS records
CustInvc · CustPymt
Tables write
customer_invoices · invoice_lines · customer_payments · payment_applications

P2c WO closes naturally (Path 2 only) PATH 2 REAL

Once Assembly Build is completed, the WO closes naturally. No customer side. FG remains available for future Sales Orders.
Tables write
work_orders.status = 'Built'
Downstream
future SO can allocate the FG; Finance enters then

WO closing — when is a WO complete

Per Mike: a WO is considered complete when all of the following hold:

Tables, endpoints, code paths

kindnamepurpose
D1 tablework_ordersWO mirror · createdfrom links Path 1 WOs back to parent SO
D1 tableassembly_bomBOM per assembly_item · component qty + uom
D1 tableassembly_buildsAsmBuild events · createdfrom = WO id
D1 tableinventory_balanceper item × location · debit components, credit FG
D1 tabletransactionsWorkOrd, WkOrdIss, WkOrdCls, Build rows
D1 tableitem_fulfillmentsPath 1 only · createdfrom = so.id
D1 tablecustomer_invoicesPath 1 only · CustInvc after Finance review
D1 tableproposed_actionsHITL gate for Assembly Build approval
D1 tableeventswo.finance_alert_fired on Path 1 IF completion
NS recordworkordersystem-of-record for the WO
NS recordassemblybuildFG production event · credits inventory
NS recorditemfulfillmentPath 1 only
Workflow contractwork_order_lifecycle (master dispatcher)R593 · dispatches into 2 path sub-contracts
Workflow contractwo_lifecycle_from_sales_order_pathPath 1 sub-contract · risk 3
Workflow contractwo_lifecycle_inventory_build_pathPath 2 sub-contract · risk 2
HITL surface/assembly-build.htmlMike approves Assembly Build proposed_actions

Customer PO# threading on WO — the open question

Mike's notes confirmed PO# threading on SO (otherrefnum), PO (memo + lineFields.links[].tranid), Invoice (otherrefnum), Vendor Bill (memo + tranid + initialtranid). The WO field is TBD pending Mike's review.

Action: Mike to confirm the WO body field that carries the customer PO# threading. Until then, every Schema field reference for WO is marked TBD — Mike review pending. Expected: bodyFields.memo.

Open gaps — honest punch list

Path detail docs