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
layers
WHAT THIS DOES: This is the 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 step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the wo intake — production side request enters netsuite. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the build reasons — mike's actual triggers. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the wo po# field — tbd pending mike review. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the classify origin — dispatch to sub-contract. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the path 1 · wo created from so — summary. see ns-work-order-path-1-from-sales-order.html for field-level depth. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the path 2 · inventory build — summary. see ns-work-order-path-2-inventory-build.html for field-level depth. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the component availability review — common to both paths. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the production / assembly completed — floor work. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the assembly build completed in netsuite — the decisive build record. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: AsmBuild TECHNICAL DETAILS: ASSEMBLY BUILD COMPLETED IN NETSUITE — The decisive build record. NS RECORD: AsmBuild ACTION bodyFields.createdfrom = wo.id bodyFields.assemblyitem bodyFields.quantity 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 WHAT THIS DOES: This is the fg added to inventory at correct location — mike's exact phrasing. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: FG ADDED TO INVENTORY AT CORRECT LOCATION — Mike's exact phrasing. ACTION inventory_balance.quantityavailable += quantity (item_code, location_id) TABLES write: inventory_balance STATUS: REAL FG added to inventory at correct location quantityavailable ++ DATABASE · FG credit i WHAT THIS DOES: This is the components consumed — explicit per mike. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the so fulfilled to customer (path 1 only) — wo complete + fg on hand → so ships. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the ★ automation alert → finance (path 1 only) — the key handoff. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: ★ 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 WHAT THIS DOES: This is the finance review (path 1 only) — finance reviews the fulfillment before invoicing. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the invoice customer (path 1 only). step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the payment received + applied (path 1 only). step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the order closed (path 1 only). step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the wo closes naturally (path 2 only) — once assembly build completed. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 WHAT THIS DOES: This is the fg available for future sos (path 2 only). step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: see TECHNICAL DETAILS TECHNICAL DETAILS: 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 next step TBD key flow → Path 1 (sub-contract) → Path 2 (sub-contract) both paths converge through component review → build → Assembly Build → FG key flow key flow key flow key flow Path 1 only → Path 2 only → WO closes finance hook finance hook next step key flow step LEGEND Path 1 from SO Path 2 inventory build ★ Finance handoff (Path 1) TBD — WO PO# field (Mike review pending)
Legend · color codes + icons used in this diagram
Color codes:
backend / NS record
work order / SO link
finance / invoice
TBD / escalation
cloud / worker
external / generic
Icon meanings:

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

Side-step · Production planning kanban R594 planned · Suitelet

WO is the only one of the three core pillars (SO / PO / WO) that needs explicit production scheduling — because we have to actually assemble. This is a side-step in the WO flow (not blocking, runs in parallel with the main lifecycle): when a WO is created, it lands on the production planning kanban for assembly scheduling.

AspectDesign
SurfaceNetSuite Suitelet rendering a kanban board (planned · not built)
ColumnsBacklog · Scheduled this week · In progress · Build complete · Variance review
CardsOne per Work Order · shows assembly item code · quantity · need-by date · component availability flag · assigned crew/line · estimated build hours
Drag-dropMove card between columns → writes WO.custbody_production_status + WO.custbody_scheduled_build_date via NS user-event script
Component checkCard surfaces all components available · low inventory on N components · shortage — requires PO — pulled live from inventoryitemlocations
WO-source awarePath 1 (from-SO) cards show parent SO# + customer PO# + need-by from SO → ranks higher when SO is bid/contract
Path 2 (standalone)Cards show "build to stock" tag + target inventory level → scheduled when sell-through forecast dips below reorder point
NS custom fields neededcustbody_production_status · custbody_scheduled_build_date · custbody_assigned_crew · custbody_estimated_build_hours  TBD pending Mike review
HITL gateDrag-drop is HITL-approved per ADR-031 — Mike (or production lead) approves each schedule change before it writes back to NS
Why WO onlySO and PO don't need production scheduling — SO ships from inventory/dropship, PO arrives from vendor. Only WO has active assembly work that needs crew/line/time allocation.

Not in scope for R594. Planned as a follow-up Suitelet build that mounts at /app/site/hosting/scriptlet.nl?script=customscript_gfs_production_kanban. The kanban does NOT replace any existing WO step — it's a sidecar surface for the production team to visualize + schedule build workload.

Path detail docs