NS work order — Path 1 · from sales order

SO entered → WO created FROM SO (createdfrom=so.id) → component review → production → Assembly Build → FG to inventory at correct location → SO fulfilled → Item Fulfillment → ★ Finance alert (STUB) → invoice → payment received + applied → order closed

Path 1 covers the case where one or more items on a customer SO require assembly. A Work Order is created FROM the SO (workorder.createdfrom = so.id), preserving the SO ↔ WO link end-to-end. Components are reviewed against on-hand inventory at the correct location, production runs on the floor, the Assembly Build record is entered in NetSuite (Mike approves at /assembly-build.html), finished goods are added to inventory, then the SO is fulfilled to the customer. The Item Fulfillment fires the ★ automation alert to Finance, who reviews, invoices, monitors terms, and applies payment. If the FG is already on hand at the location, the shortcut is to fulfill the SO from inventory and close the WO marked unused. The customer PO# field on the Work Order body is TBD pending Mike's review (expected: bodyFields.memo threaded from SO.otherrefnum). Workflow: wo_lifecycle_from_sales_order_path.

PATH 1 REAL (linkage + flow) WO PO# field TBD (Mike review pending) ★ Finance alert pending NS automation

Pipeline — Path 1 deep view (field-level + SO ↔ WO link)

idle
layers
Path 1 from sales order — WO chain with field-level depth + customer PO# threading (WO field TBD) 01 / Upstream SO (otherrefnum captures customer PO#) 02 / WO created FROM SO (createdfrom + memo TBD) 03 / Component review · production / assembly completed 04 / Assembly Build in NetSuite · FG added to inventory at correct location 05 / SO fulfilled to customer · Item Fulfillment 06 / ★ Finance alert (STUB) · Finance review 07 / Invoice · payment received + applied · order closed WHAT THIS DOES: This is the sales order (ns salesord) — upstream record that triggers path 1. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: SalesOrd TECHNICAL DETAILS: SALES ORDER (NS SalesOrd) — upstream record that triggers Path 1. SAMPLE: Driscoll order; one assembly_line for Melt Mates kit. FIELDS WRITTEN bodyFields.tranid = "1217" bodyFields.otherrefnum = "72622" (customer PO# thread start) bodyFields.entity = 2147 (Driscoll) STATUS: REAL Sales Order in NetSuite tranid = "1217" · otherrefnum = "72622" includes assembly_line for MELT-MATES-KIT-A qty 24 D1: transactions + so_lines BACKEND · NS SalesOrd · THREAD START i WHAT THIS DOES: This is the classify origin — operator identifies wo source. 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 — operator identifies WO source. LOGIC: origin = from_sales_order ACTION: dispatch wo_lifecycle_from_sales_order_path STATUS: REAL (operator) classify origin = from_sales_order assembly_line on SO 1217 dispatch wo_lifecycle_from_sales_order_path SECURITY · classifier i WHAT THIS DOES: This is the work order created from so — preserves so ↔ wo linkage. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: WorkOrd TECHNICAL DETAILS: WORK ORDER CREATED FROM SO — preserves SO ↔ WO linkage. NS RECORD: WorkOrd FIELDS WRITTEN bodyFields.tranid = "WO-4471" (NS-assigned) bodyFields.createdfrom = 1217 (SO id) — preserves end-to-end link bodyFields.assemblyitem = "MELT-MATES-KIT-A" bodyFields.quantity = 24 bodyFields.location = 3 (Heartland) bodyFields.memo = (TBD — Mike review pending; expected pattern: "72622" carrying customer PO# threading from SO.otherrefnum) THREADING WO body field for customer PO#: TBD (expected memo) createdfrom linkage: REAL STATUS: REAL (linkage) · TBD (PO# field confirmation) Work Order created FROM Sales Order tranid = "WO-4471" · createdfrom = 1217 (SO id) assemblyitem = "MELT-MATES-KIT-A" · quantity = 24 · location = 3 memo = TBD (Mike review pending; expected "72622") MESSAGEBUS · NS WorkOrd · WO PO# FIELD TBD i WHAT THIS DOES: This is the shortcut branch — if fg on hand at location, skip build. 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: SHORTCUT BRANCH — if FG on hand at location, skip build. LOGIC if inventory_balance.quantityavailable("MELT-MATES-KIT-A", location_id=3) >= 24 then: fulfill SO from inventory; close WO marked "unused" else: continue to component review + build STATUS: REAL (operator decision) shortcut: FG already on hand at location? if quantityavailable ≥ so_line.qty at location_id → fulfill SO from inventory · close WO marked "unused" → else continue to component review + build SECURITY · branch decision i WHAT THIS DOES: This is the component availability reviewed. 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 REVIEWED. TABLES READ assembly_bom WHERE assembly_item = "MELT-MATES-KIT-A" inventory_balance WHERE item_code IN (components) AND location_id = 3 SAMPLE COMPONENTS CHED-2LB qty 1 (component qty for 1 kit; consume 24 for build) PRTZL-BAG qty 1 TURKEY-PAK qty 1 STATUS: REAL component availability reviewed assembly_bom rows: 5 components inventory_balance per component at location_id=3 total consume for qty 24 = 120 unit debits DATABASE · assembly_bom i WHAT THIS DOES: This is the production / assembly completed on floor. 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 ON FLOOR. ACTION crew executes build for qty 24 components debited per BOM during build yield + waste captured (waste = 0 for this run) NS RECORD INTERIM: WkOrdIss (workorderissue) per component D1 WRITES UPDATE inventory_balance SET quantityavailable -= bom.qty * 24 WHERE item_code IN (components) AND location_id = 3 STATUS: REAL production / assembly completed crew executes build on floor for qty 24 components debited per BOM · WkOrdIss posted waste = 0 · yield matches MESSAGEBUS · floor i WHAT THIS DOES: This is the bom consume (debit components). 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: BOM CONSUME (debit components). SQL UPDATE inventory_balance SET quantityavailable = quantityavailable - (bom.qty * 24) WHERE item_code IN (components) AND location_id = 3 SAMPLE DEBITS CHED-2LB: -24 PRTZL-BAG: -24 TURKEY-PAK: -24 STATUS: REAL BOM consume · inventory debit UPDATE inventory_balance CHED-2LB -24 · PRTZL-BAG -24 · TURKEY-PAK -24 at location_id = 3 (Heartland) DATABASE · raw -− i WHAT THIS DOES: This is the assembly build completed in netsuite — mike approves via hitl. 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 — Mike approves via HITL. NS RECORD: AsmBuild FIELDS WRITTEN bodyFields.tranid = "AB-1881" bodyFields.createdfrom = 4471 (WO id) bodyFields.assemblyitem = "MELT-MATES-KIT-A" bodyFields.quantity = 24 bodyFields.custbody_waste = 0 bodyFields.location = 3 (Heartland) bodyFields.trandate = 2026-05-26 HITL: /assembly-build.html → proposed_actions → Mike approves STATUS: REAL Assembly Build entered in NetSuite NS AsmBuild record · tranid "AB-1881" createdfrom = 4471 (WO id) · quantity = 24 waste = 0 · location = 3 · HITL Mike approves BACKEND · NS AsmBuild · HITL gate 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. SQL UPDATE inventory_balance SET quantityavailable = quantityavailable + 24 WHERE item_code = "MELT-MATES-KIT-A" AND location_id = 3 STATUS: REAL FG added to inventory at correct location UPDATE inventory_balance SET quantityavailable += 24 item_code = "MELT-MATES-KIT-A" · location_id = 3 DATABASE · FG ++ i WHAT THIS DOES: This is the wo status → 'built' (components consumed). 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 STATUS → 'Built' (components consumed). SQL UPDATE work_orders SET status = 'Built' WHERE id = 4471 EVENT: workorder.built STATUS: REAL close WO · components consumed UPDATE work_orders SET status = 'Built' WHERE id = 4471 event: workorder.built BACKEND · WO close i WHAT THIS DOES: This is the so fulfilled · item fulfillment created. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: ItemFulfill TECHNICAL DETAILS: SO FULFILLED · ITEM FULFILLMENT CREATED. NS RECORD: ItemFulfill FIELDS WRITTEN bodyFields.tranid = "IF-2210" bodyFields.createdfrom = 1217 (SO id — NOT WO id) bodyFields.otherrefnum = "72622" (inherits from SO) bodyFields.status = "Shipped" bodyFields.shipped_at = 2026-05-26 14:42 STATUS: REAL SO fulfilled to customer · Item Fulfillment createdfrom = 1217 (SO id, NOT WO id) · otherrefnum = "72622" (from SO) BACKEND · item_fulfillments · PO# THREAD → i WHAT THIS DOES: This is the ★ automation alert → finance (stub). 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 (STUB). TRIGGER: itemfulfillment.status = 'Shipped' EVENT: events.wo.finance_alert_fired SQL INSERT INTO events (event_type, entity_type, entity_id, payload_json, created_at) VALUES ('wo.finance_alert_fired','item_fulfillment',2210,?,datetime('now')) STATUS: STUB — platform event fires; NS workflow build pending ★ automation alert → Finance events.wo.finance_alert_fired · STUB until NS workflow FINANCE · ★ KEY HANDOFF i WHAT THIS DOES: This is the finance review — fulfillment qty + pricing + terms. 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 — fulfillment qty + pricing + terms. CHECKS fulfilled qty matches expected pricing carried through correctly customer terms + tax handling correct TABLES READ item_fulfillments · so_lines · customers.terms STATUS: REAL · Finance-driven Finance reviews fulfillment qty · pricing · terms · tax CLOUD · Finance role i WHAT THIS DOES: This is the customer invoice posted. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: CustInvc TECHNICAL DETAILS: CUSTOMER INVOICE POSTED. NS RECORD: CustInvc FIELDS WRITTEN bodyFields.tranid = "CINV-9032" bodyFields.otherrefnum = "72622" bodyFields.createdfrom = 1217 (SO id) bodyFields.entity = 2147 (Driscoll) bodyFields.amount = 18420.00 bodyFields.terms = "Net 30" STATUS: REAL Customer Invoice posted tranid = "CINV-9032" otherrefnum = "72622" createdfrom = 1217 · amount $18,420 terms = "Net 30" BACKEND · CustInvc i WHAT THIS DOES: This is the payment received + applied. step. It happens as part of the work-order / order-integration chain and produces the data, status change, or record described below. NS RECORD: CustPymt TECHNICAL DETAILS: PAYMENT RECEIVED + APPLIED. NS RECORD: CustPymt FIELDS WRITTEN bodyFields.tranid = "CPYMT-3120" bodyFields.appliedto = "CINV-9032" bodyFields.amount = 18420.00 TABLES write: customer_payments · payment_applications STATUS: REAL payment received + applied CustPymt tranid "CPYMT-3120" appliedto = "CINV-9032" amount = $18,420 DATABASE · CustPymt i WHAT THIS DOES: This is the order closed. 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. SQL UPDATE transactions SET status='Closed' WHERE id=1217 AND type='SalesOrd' EVENT: events.order.closed STATUS: REAL order closed UPDATE transactions SET status='Closed' WHERE id=1217 event: order.closed BACKEND · order.closed i WHAT THIS DOES: This is the events emitted — substrate signals. 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: EVENTS EMITTED — substrate signals. EVENTS workorder.created (WO-4471) workorder.built (WO-4471) itemfulfillment.completed (IF-2210) wo.finance_alert_fired (IF-2210, STUB) invoice.posted (CINV-9032) customer.payment_received (CPYMT-3120) order.closed (SO 1217) STATUS: REAL events emitted (7+) workorder.created · .built itemfulfillment.completed invoice.posted · payment_received order.closed CLOUD · events ledger i key flow SO ↔ WO SO ↔ WO shortcut bypass — if FG on hand SO ↔ WO SO ↔ WO SO ↔ WO SO ↔ WO SO ↔ WO SO ↔ WO finance hook finance hook finance hook key flow key flow next step TBD: thread SO.otherrefnum → WO.memo LEGEND Path 1 from-SO lanes ★ Finance handoff (STUB) 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:

NS records created / updated · field-level detail (Path 1)

StepNS recordFieldSample valueStatus
1SalesOrdbodyFields.tranid"1217"REAL
1SalesOrdbodyFields.otherrefnum (thread start)"72622"REAL
3WorkOrdbodyFields.tranid"WO-4471"REAL
3WorkOrdbodyFields.createdfrom1217 (SO id)REAL
3WorkOrdbodyFields.assemblyitem"MELT-MATES-KIT-A"REAL
3WorkOrdbodyFields.quantity24REAL
3WorkOrdbodyFields.location3 (Heartland)REAL
3WorkOrdbodyFields.memo — customer PO# field(TBD) expected "72622"TBD — Mike review pending
6(WkOrdIss)per component consumeCHED-2LB -24 · PRTZL-BAG -24 · TURKEY-PAK -24 · ...REAL
7(none)inventory_balance.quantityavailable -= bom.qty * 24D1 UPDATE per component at location_id = 3REAL
8AsmBuildbodyFields.tranid"AB-1881"REAL
8AsmBuildbodyFields.createdfrom4471 (WO id)REAL
8AsmBuildbodyFields.item"MELT-MATES-KIT-A"REAL
8AsmBuildbodyFields.quantity24REAL
8AsmBuildbodyFields.custbody_waste0REAL
8AsmBuildbodyFields.location3 (Heartland)REAL
9(none)inventory_balance.quantityavailable += 24D1 UPDATE for FG at location_id = 3REAL
10WorkOrdbodyFields.status"Built"REAL
11ItemFulfillbodyFields.tranid"IF-2210"REAL
11ItemFulfillbodyFields.createdfrom1217 (SO id, NOT WO id)REAL
11ItemFulfillbodyFields.otherrefnum"72622"REAL
12(event)events.event_type"wo.finance_alert_fired"STUB
14CustInvcbodyFields.tranid"CINV-9032"REAL
14CustInvcbodyFields.otherrefnum"72622"REAL
14CustInvcbodyFields.amount18420.00REAL
15CustPymtbodyFields.appliedto"CINV-9032"REAL
16SalesOrdbodyFields.status"Closed"REAL

Customer PO# threading on Path 1 (WO chain)

The customer PO# ("72622" in the running example) threads through these Path 1 records:

Open question for Mike: confirm the WO body field that carries the customer PO# (expected: bodyFields.memo). Until confirmed, this is the only TBD field in the entire WO Path 1 chain. Every Schema reference for WO is flagged TBD.

Sub-contract structured detail

CTR wo_lifecycle_from_sales_order_path · risk 3 REAL WO PO# TBD

Sub-contract dispatched from the WO master when origin = from_sales_order. Preserves SO ↔ WO linkage via workorder.createdfrom = so.id. Customer PO# field on the WO is the only field-level TBD across the entire Path 1 chain. Path 1 ends with the Finance handoff after Item Fulfillment.
Fan-out targets
create_wo_from_so · review_components · inventory_shortcut · bom_consume · assembly_build · finished_goods_credit · close_wo · item_fulfillment · finance_alert · finance_review · invoice_customer · payment_apply · close_order
Tables touched
work_orders · assembly_bom · assembly_builds · inventory_balance · item_fulfillments · customer_invoices · customer_payments · payment_applications · transactions · events · proposed_actions
HITL gates
/assembly-build.htmlproposed_actions → Mike approves · Finance review · invoice approval
Verify checks
wo_linked_to_so · assembly_build_posted · fg_credited · if_created_from_so · finance_alert_fired · wo_memo_carries_po (TBD) · so_closed
TBD invariant
if Mike confirms WO.memo = customer PO#, then verify_check: WO.memo == SO.otherrefnum
Retry policy
max_attempts=3 · exponential backoff (1.5s base, 45s cap) · alert_on_final_failure