High-altitude master view of the entire SO process. Customer orders arrive at orders@globalfoodsolutions.co or danielle@globalfoodsolutions.co. The team reviews each one against the customer file and keys it into NetSuite as a Sales Order, capturing the otherrefnum field as the customer PO#. From there the SO branches by item type into three path sub-contracts — Path 1 inventory, Path 2 assembly (Work Orders FROM the SO), or Path 3 dropship (POs FROM the SO). All three paths converge at Item Fulfillment, which fires the ★ automation alert to Finance. The customer PO# (entered as otherrefnum on the SO) threads through every connected NS record — PO memo, Invoice otherrefnum, Vendor Bill memo / tranid / initialtranid. This is the trace thread for "where did Driscoll's PO 72622 go." See path detail docs for field-level depth.
orders@globalfoodsolutions.co · danielle@globalfoodsolutions.co/api/so/createcustomers · pricing_master · customer_programs · contractsSalesOrdtransactions (SalesOrd) · so_linesinventory_item → fulfill from inventoryassembly_item → Work Order created FROM SOdropship_item / special order → Purchase Order created FROM SOitemfulfillment (open) · inventory_balance.reserved_qtyworkorder · assemblybuildparent_so_id → SO.id/assembly-build.html → proposed_actions → Mike approvespurchaseorder · itemreceipt · vendorbillparent_so_id → SO.iditemfulfillment (status='Shipped')transactions (ItemShip) · inventory_balanceitemfulfillment · so_lines · customers.termsCustInvc using shipped qty. AR balance updates.CustInvctransactions (CustInvc) · invoice_lines · v_customer_ar_agingar_aging_action_plan workflow. Loops at 30/60/90+ days until paid or escalated to service hold.v_customer_ar_agingar_aging_action_planorder.closed event fires to customer health watcher.CustPymtcustomer_payments · payment_applicationsevents.order.closedvendorbill · vendorpayment| kind | name | purpose |
|---|---|---|
| Mailbox | orders@globalfoodsolutions.co | primary customer order intake |
| Mailbox | danielle@globalfoodsolutions.co | secondary customer order intake |
| D1 table | transactions | SalesOrd, WorkOrd, PurchOrd, ItemShip, ItemRcpt, CustInvc, CustPymt, VendBill rows. Note: these are NS SuiteQL transactions.type discriminator strings — for example transactions.type='ItemShip' selects Item Fulfillment records (whose SuiteScript record type is itemfulfillment, NS record name ItemFulfill). The discriminator string and the record name are distinct. |
| D1 table | so_lines / transaction_lines | line-level SO data · item, qty, price, createdfrom → SO.id |
| D1 table | work_orders | Path 2 — WO records linked to parent SO |
| D1 table | purchase_orders | Path 3 — PO records linked to parent SO |
| D1 table | item_receipts | Path 3 — vendor receipt closes PO line |
| D1 table | vendor_bills | Path 3 — vendor-side billing |
| D1 table | item_fulfillments | convergence point — all 3 paths land here |
| D1 table | invoice_lines | Finance-issued invoice from shipped qty |
| D1 table | customer_invoices | CustInvc mirror |
| D1 table | customer_payments | CustPymt mirror |
| D1 table | payment_applications | matches payment to invoice(s) |
| D1 view | v_customer_ar_aging | dunning trigger · buckets current/30/60/90+ |
| Workflow | ar_aging_action_plan | dunning sequence at 30/60/90+ |
| NS record | SalesOrd · WorkOrd · PurchOrd · ItemFulfill · ItemRcpt · CustInvc · CustPymt · VendBill | system-of-record across the 3 paths + finance tail |
| Code path | src/email.ts | inbound email pipeline (5 mailboxes incl. orders@ + danielle@) |
/api/so/create. EDI files land in the mailbox; an operator keys them in.ns_pending_pushes.
After SO entry passes credit + product validation, before fulfillment, freight_routing_check fires. It classifies the SO's freight needs (LTL / FTL / parcel-with-special-handling / customer pickup / freight collect) and, when human routing is needed, routes the record to the logistics review queue. The logistics team picks the carrier, schedules pickup, generates BOL, captures tracking, and confirms delivery. Customer PO# threads through to the BOL so the customer can trace on their end.
Side-step in the SO flow (parallel with Item Fulfillment) · runs on all 3 SO paths (inventory, assembly, dropship) · HITL-gated. See ns-freight-routing-check.html + ns-logistics-review-flow.html.