Auto-create NetSuite sales orders from won Salesforce deals
Build a workflow triggered when a Salesforce opportunity changes to Closed Won (webhook or polling). Look up the matching customer in NetSuite by name/email; create the customer record if none exists. Create a NetSuite sales order mapping the opportunity's products, quantities, and amounts. Handle duplicate-customer ambiguity, missing product mappings, and API failures with retries, and avoid creating duplicate orders for the same opportunity. Output the created NetSuite sales order ID and a status summary.
What this prompt builds
When a Salesforce opportunity is marked won, create the matching customer sales order in NetSuite automatically.
The problem
The handoff between Sales closing a deal in Salesforce and Finance booking the order in NetSuite is manual, so orders are delayed, mis-keyed, or dropped. That lag slows revenue recognition and frustrates both teams.
Solution and impact
This workflow detects a won Salesforce opportunity, matches or creates the customer in NetSuite, and generates the corresponding sales order. Quote-to-cash becomes near-instant and consistent, cutting order-entry delay and reconciliation work.
