[ NetSuite / Order to cash ]

Closed won to NetSuite sales order, without re-keying

When a deal closes in Salesforce or HubSpot, engini finds or creates the customer in NetSuite and creates the sales order from the deal’s lines. An AI agent checks items, prices and required fields first and stops with a clear note if something is missing. Order numbers, invoice numbers and status flow back to the CRM, so sales sees what finance sees.

SalesforceHubSpotNetSuiteSlack
Read the NetSuite guide →
A deal closes on Friday afternoon
  1. Salesforce logo
    Opportunity marked Closed Wonreal-time outbound message
  2. Agent checks the dealitems exist, prices match, terms set
  3. NetSuite logo
    Customer upsertedmatched on the CRM account id
  4. NetSuite logo
    Sales order createdlines, quantities, prices from the deal
  5. Salesforce logo
    Order number written backSO-10422 on the opportunity
Illustration of the flow on this page, not a product screen.
What it does
Deal to NetSuite customer and sales order, status back to the CRM
Systems
Salesforce or HubSpot, NetSuite, Slack or Teams
Built with
Workflows on CRM and NetSuite triggers, with an AI agent check
Your control
Which deals, which fields, and what stops an order
[ 01 / The problem ]

The deal is won. Then someone types it in again.

Sales closes the deal in Salesforce or HubSpot. Finance needs a NetSuite sales order to fulfill and bill it. Between the two sits a person copying the customer, the lines and the terms, and later copying invoice numbers back into the CRM so the rep knows what happened. Teams that buy a connector still find gaps: one leading connector’s own documentation lists what its Salesforce to NetSuite order sync does not carry.

The cost shows up as delay and as errors: an order created with last year’s price, a duplicate customer, a rep who promises a delivery date for an order finance never received.

Where order to cash breaks

  • A new customer is created twice, once per system, with different names.
  • A product sold in the CRM does not exist in NetSuite, and the sync fails quietly.
  • Discounts, terms or tax fields are missing on the deal.
  • Invoice and payment status never make it back, so sales works blind.

What changes with an agent in the flow

A plain field mapping copies whatever it is given. An AI agent step can look before it writes: does every item exist in NetSuite, does the price match the price list, is the billing address complete, is this customer already there under a slightly different name. When the deal is clean, the customer and the sales order are created in seconds. When it is not, nothing half-finished lands in NetSuite, and the owner gets a note that says exactly what to fix.

The way back is just as important. A NetSuite trigger on sales orders and invoices, checked as often as every 15 minutes, writes order numbers, invoice numbers and status to the opportunity or deal. Every engini integration runs both ways, so this is the same connection, not a second project.

[ 02 / How it works ]

Deal to order, and status back

01 / Trigger

The deal closes

Salesforce sends a real-time outbound message when the opportunity is marked Closed Won. HubSpot deals are checked for updates as often as every 15 minutes.

02 / Check

The agent looks first

An AI agent step reads the deal, its line items and the account, and checks items, prices and required fields against NetSuite. Anything missing stops the flow with a note in Slack or Teams.

03 / Create

Customer and sales order

It finds or creates the NetSuite customer with an upsert, then creates the sales order with the deal’s lines, quantities and prices.

04 / Return

Status flows back

A NetSuite trigger on sales orders and invoices writes the order number, invoice number and status to the opportunity or deal.

[ 03 / What the agent reads and writes ]

What the agent reads and writes

SystemRecordsAccess
SalesforceOpportunity, Opportunity Products, AccountReadUpdate
HubSpotDeal, line items, associated companyReadUpdate
NetSuiteCustomer (upsert), ItemReadUpsert
NetSuiteSales Order; Invoice status on the way backCreateRead
Slack or TeamsNotes when a deal cannot become an order yetWrite
[ 04 / Build it with the engini skill ]

Describe it in plain words. The engini skill builds the workflow.

engini skills is engini’s plugin for Claude Code and Codex. Its workflow agent, Flo, turns a plain-language request into an engini workflow: it designs the steps, dry-runs them against your own engini account, shows you a proposal, and creates the workflow only after you approve it, always turned off. You check it in the engini designer and turn it on.

Blurred landscape photo with the Salesforce logo, the engini mark and the NetSuite logo joined by a thin line, labeled Closed Won: deal, check, sales order

Editorial image: closed won, sales order, status back.

Claude Code: install once
/plugin marketplace add engini/skills
/plugin install skills@engini
Then ask for this solution
Build a workflow in my engini account: when a Salesforce opportunity is marked Closed Won, read its products and account, check that every item exists in NetSuite, upsert the NetSuite customer using the Salesforce account id, and create a NetSuite sales order with the same lines, quantities and prices. Write the sales order number back to the opportunity. If an item is missing, post the details to #sales-ops in Slack and create nothing.
  1. You need an engini account, the engini CLI (npm i -g @engini/cli) and a workspace-scoped API key, ideally a dedicated least-privilege one.
  2. Connect the systems this flow uses in engini first. Flo never creates or changes a connection and never handles your key; it tells you which command to run.
  3. Flo checks your login and workspace, searches the tool catalog, compiles the plan and shows a proposal table with every step. It creates the workflow only when you approve that proposal, and it creates it turned off.
  4. Open it in the engini designer, fill anything it left for you, and turn it on.
engini skills for Claude Code and Codex →
What the skill will never do on its own →
[ 05 / Agent Policy ]

The agent does only what you allow. Every run is on the record.

Agent Policy is how you govern agents in engini: the tools each agent may call, the account each tool uses, and a record of every call.

Toolsets

Scope every call

Hand the agent a toolset: only the tools it needs, each on the connection you choose, for example read only. engini enforces it on the server for CLI, SDK and REST API calls; a call outside the toolset is refused. An MCP server exposes only the connections and tools chosen when you set it up.

Identity

Acts with the account you connect

engini acts with the permissions of the connected account. Connect a person’s own account and it acts as that person; use a shared integration account and it acts as that account. Every run is recorded under the user who triggered it.

Audit

History and audit log

Each tool call and workflow run is recorded in History and the audit log, which supports export and streaming to your SIEM. Your agent never needs your credentials: engini stores them and adds them when it runs each call.

SOC 2 Type IIISO 27001GDPRHIPAA compliant
[ 06 / Try it now ]

Build it on your own data today

Start free, connect NetSuite, and build this flow with the engini skill, in Workflow Studio, or from your own agent.

  • 01Workflow Studio. Build the flow on a visual canvas, with an AI agent step where judgment is needed. Start free →
  • 02Your own agent. Give Claude, ChatGPT or Cursor an engini MCP server with only these tools. MCP client setup →
  • 03The engini skill. Ask Flo in Claude Code or Codex and review its proposal. Install the skill →
[ 07 / Questions ]

Questions buyers ask before they start

How do Closed Won opportunities become NetSuite sales orders?

A real-time outbound message from Salesforce starts an engini workflow when the opportunity is marked Closed Won. An AI agent step checks the deal, then the workflow upserts the NetSuite customer and creates the sales order with the deal’s lines.

Does it create the customer in NetSuite if it is new?

Yes. The workflow upserts the customer, matched on the CRM account id or another key you choose, so an existing customer is updated and a new one is created once.

Can reps see invoice and payment status in Salesforce or HubSpot?

Yes. A NetSuite trigger on sales orders and invoices, checked as often as every 15 minutes, writes order numbers, invoice numbers and status back to the opportunity or deal.

What happens if a product or price does not exist in NetSuite?

The agent stops before creating anything and posts the deal, the missing item or the price difference to Slack or Teams, so the owner can fix it and the order goes through on the next update.

Does it work with HubSpot too?

Yes. HubSpot deals are checked for updates as often as every 15 minutes, and the same steps create the NetSuite customer and sales order and write status back to the deal.

How is this different from a prebuilt connector?

A connector maps fields. Here an AI agent checks the deal before anything is written, the flow is yours to change in Workflow Studio, and the same NetSuite connection serves your other agents, such as one that answers reps’ questions about an account.