NS sales order — Path 2 · assembly (Work Orders FROM SO)

SO entry → classify line as assembly → WO created FROM SO → BOM consume → assembly build → FG credit → Item Fulfillment → ★ Finance alert (STUB) → Invoice → payment → close

Path 2 covers assembly build items needing production. For each assembly_line on the SO, a Work Order is created FROM the SO (workorder.createdfrom = so.id), preserving the SO ↔ WO link end-to-end. BOM components are consumed from inventory, the build runs on the production floor (HITL approved by Mike), finished goods are credited, then Item Fulfillment fires. If the finished assembly is already on hand, the shortcut path is to fulfill from inventory and close the WO marked unused. The customer PO# field on the Work Order is TBD pending Mike's review (expected pattern: bodyFields.memo). Workflow: so_lifecycle_assembly_path.

PATH 2 REAL WO PO# field TBD (Mike review) ★ Finance alert pending NS automation

Pipeline — Path 2 deep view (field-level + WO chain)

idle
Path 2 assembly — WO chain with field-level depth + customer PO# threading (WO field TBD) 01 / Email intake 02 / SO entry (otherrefnum captures customer PO#) 03 / WO created FROM SO (createdfrom + memo TBD) 04 / BOM consume · assembly build · FG credit 05 / Item Fulfillment (createdfrom = SO id) 06 / ★ Finance alert (STUB) 07 / Invoice · payment · close EMAIL INTAKE. SAMPLE: Driscoll order includes 1 Melt Mates kit assembly line. STATUS: REAL customer email intake orders@ / danielle@ PO# 72622 in body EXTERNAL · INTAKE i SALES ORDER (NS SalesOrd) — captures customer PO# as otherrefnum. FIELDS WRITTEN bodyFields.tranid = "1217" bodyFields.otherrefnum = "72622" bodyFields.entity = 2147 THREADING otherrefnum threads to Item Fulfillment + Invoice (Path 2 same as Path 1 for these records) STATUS: REAL Sales Order created in NetSuite otherrefnum = "72622" · tranid = "1217" includes assembly_line for Melt Mates kit D1: transactions + so_lines BACKEND · NS SalesOrd · THREAD START i CLASSIFY LINE — operator identifies assembly_line. LOGIC: items.itemtype = "Assembly" ACTION: dispatch so_lifecycle_assembly_path STATUS: REAL (operator) classify line · itemtype = Assembly item_code "MELT-MATES-KIT-A" dispatch so_lifecycle_assembly_path SECURITY · classifier · sub-contract i 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) bodyFields.assemblyitem = "MELT-MATES-KIT-A" bodyFields.quantity = 24 bodyFields.memo = (TBD) — Mike's review pending; expected pattern: "72622" carrying the customer PO# threading from the SO THREADING WO field for customer PO# — TBD pending Mike's review Expected: bodyFields.memo = SO.otherrefnum STATUS: REAL (linkage) · TBD (PO# field confirmation) Work Order created FROM SO createdfrom = 1217 (SO id) · tranid = "WO-4471" assemblyitem = "MELT-MATES-KIT-A" · qty = 24 memo = TBD (Mike review pending; expected "72622") MESSAGEBUS · NS WorkOrd · WO PO# FIELD TBD i BOM LOOKUP — components. TABLES READ assembly_bom WHERE assembly_item = "MELT-MATES-KIT-A" SAMPLE COMPONENTS CHED-2LB qty 1; PRTZL-BAG qty 1; TURKEY-PAK qty 1; ... STATUS: REAL BOM lookup assembly_bom rows components: 5 SKUs per kit total components for qty 24 = 120 unit consumes DATABASE · assembly_bom i SHORTCUT BRANCH — if FG on hand, skip build. LOGIC if inventory_balance.quantityavailable("MELT-MATES-KIT-A") >= 24 then: fulfill from inventory; close WO marked "unused" else: continue to BOM consume + build STATUS: REAL (operator decision) shortcut: FG already on hand? if qty_available ≥ so_qty → fulfill from inventory → close WO marked "unused" SECURITY · branch decision i BOM CONSUME — debit components from inventory. SQL UPDATE inventory_balance SET quantityavailable -= ? WHERE item_code IN (?...) PER COMPONENT reduce on_hand · log lot if traced STATUS: REAL BOM consume UPDATE inventory_balance SET quantityavailable -= bom.qty * 24 per component DATABASE · raw -− i ASSEMBLY BUILD on production floor. NS RECORD: AsmBuild FIELDS bodyFields.createdfrom = "WO-4471" bodyFields.assemblyitem = "MELT-MATES-KIT-A" bodyFields.quantity_built = 24 bodyFields.waste = 0 HITL: /assembly-build.html → Mike approves STATUS: REAL assembly build on floor NS AsmBuild · createdfrom = WO-4471 quantity_built = 24 · waste = 0 HITL: Mike approves at /assembly-build.html MESSAGEBUS · build i FG CREDIT — credit assembly to inventory. SQL UPDATE inventory_balance SET quantityavailable += 24 WHERE item_code = "MELT-MATES-KIT-A" STATUS: REAL FG credit to inventory UPDATE inventory_balance SET quantityavailable += 24 item_code = MELT-MATES-KIT-A DATABASE · FG ++ i CLOSE WO. SQL: UPDATE work_orders SET status='Built' WHERE id=4471 STATUS: REAL close WO status = 'Built' WO-4471 BACKEND · WO close i ITEM FULFILLMENT CREATED. NS RECORD: ItemShip FIELDS WRITTEN bodyFields.createdfrom = 1217 (SO id, NOT WO id) bodyFields.otherrefnum = "72622" (inherits from SO) bodyFields.status = "Shipped" STATUS: REAL Item Fulfillment created createdfrom = 1217 (SO id) · otherrefnum = "72622" (from SO) BACKEND · item_fulfillments · PO# THREAD → i ★ FINANCE ALERT (STUB). EVENT: events.so.finance_alert_fired STATUS: STUB ★ automation alert → Finance events.so.finance_alert_fired · STUB until NS workflow FINANCE · ★ KEY HANDOFF i CUSTOMER INVOICE. FIELDS bodyFields.otherrefnum = "72622" bodyFields.createdfrom = 1217 STATUS: REAL Customer Invoice posted otherrefnum = "72622" createdfrom = 1217 BACKEND · CustInvc i MONITOR PAYMENT TERMS. VIEW: v_customer_ar_aging STATUS: REAL monitor terms v_customer_ar_aging bucket = current DATABASE · AR aging i PAST DUE → DUNNING. WORKFLOW: ar_aging_action_plan STATUS: REAL workflow past due → dunning ar_aging_action_plan 30 / 60 / 90+ buckets SECURITY · HITL i PAYMENT APPLIED. NS RECORD: CustPymt STATUS: REAL Customer Payment appliedto = invoice id DATABASE · CustPymt i SO CLOSED. SQL: UPDATE transactions SET status='Closed' WHERE id=1217 STATUS: REAL SO → Closed status = 'Closed' BACKEND · close i TBD: thread SO.otherrefnum → WO.memo LEGEND Path 2 assembly lanes ★ Finance handoff (STUB) TBD — WO PO# field (Mike review pending)

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

StepNS recordFieldSample valueStatus
2SalesOrdbodyFields.otherrefnum (thread start)"72622"REAL
2SalesOrdbodyFields.tranid"1217"REAL
4WorkOrdbodyFields.createdfrom1217 (SO id)REAL
4WorkOrdbodyFields.assemblyitem"MELT-MATES-KIT-A"REAL
4WorkOrdbodyFields.quantity24REAL
4WorkOrdbodyFields.memo — customer PO# field(TBD) expected "72622"TBD — Mike review pending
7(none)inventory_balance.quantityavailable -= bom.qtyD1 UPDATE per componentREAL
8AsmBuildbodyFields.createdfrom"WO-4471"REAL
8AsmBuildbodyFields.quantity_built24REAL
9(none)inventory_balance.quantityavailable += 24D1 UPDATE for FGREAL
11ItemShipbodyFields.createdfrom1217 (SO id)REAL
11ItemShipbodyFields.otherrefnum"72622"REAL
12(event)events.event_type"so.finance_alert_fired"STUB
13CustInvcbodyFields.otherrefnum"72622"REAL
17SalesOrdbodyFields.status"Closed"REAL

Customer PO# threading on Path 2 (WO chain)

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

Open question for Mike: confirm the WO field that carries the customer PO# (expected: bodyFields.memo). Until confirmed, this is the only TBD field in the entire SO chain.

Sub-contract structured detail

CTR so_lifecycle_assembly_path · risk 3 REAL WO PO# field TBD

Sub-contract dispatched from the master when an so_line classifies as assembly_item. Preserves SO ↔ WO linkage via workorder.createdfrom = so.id. Customer PO# field on the WO is the only field-level TBD across the entire SO chain.
Fan-out targets
create_wo · bom_consume · assembly_build · finished_goods_credit · inventory_shortcut · item_fulfillment · finance_invoice_review · invoice_customer · payment_apply · close_so
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
TBD invariant
if Mike confirms WO.memo = customer PO#, then verify_check: WO.memo == SO.otherrefnum