[ SAP S/4HANA / Quote to cash ]

Salesforce to SAP S/4HANA sales orders

When an opportunity closes in Salesforce, or a deal in HubSpot, engini finds the sold-to business partner in SAP S/4HANA, creates it if it is new, and creates the sales order from the deal’s lines. An AI agent checks materials and prices first. A scheduled run writes the SAP order number and status back to the CRM.

SalesforceHubSpotSAP S/4HANASlack
Read the SAP S/4HANA guide →
Closed won to SAP order
  1. Salesforce logo
    Opportunity Closed Wonreal-time outbound message
  2. Agent checks linesmaterials known, prices agree
  3. SAP S/4HANA logo
    Business partner foundsold-to matched by customer number
  4. SAP S/4HANA logo
    Sales order createdheader and items over OData
  5. Salesforce logo
    Order number written backscheduled read of SAP status
Illustration of the flow on this page, not a product screen.
What it does
Deal to SAP sales order, checked first; SAP status back to the CRM
Systems
Salesforce or HubSpot, SAP S/4HANA (OData), Slack or Teams
Built with
A workflow on the CRM trigger, with an AI agent check, plus a scheduled read-back
Your control
Which deals qualify, which fields map, what stops an order
[ 01 / The problem ]

Sales lives in the CRM. Orders live in SAP.

The handoff is the same in every company that sells through Salesforce and fulfills through SAP: a won opportunity has to become a sales order in SAP S/4HANA, and someone has to tell sales what happened next. The demand is obvious from the market: integration vendors ship ready-made recipes for exactly this, such as MuleSoft’s SAP accelerator.

The hard part is rarely the field mapping. It is deciding which system owns the customer, avoiding a second business partner for the same company, and catching the deal that sold a material SAP does not know before it fails in the middle of the night.

Where the handoff fails

  • Duplicate business partners created from slightly different account names.
  • Materials or prices on the deal that do not exist in SAP.
  • Orders keyed by hand days after the deal closed.
  • No order or delivery status in the CRM, so sales calls the back office.

How the flow works with SAP

engini creates records in SAP through its standard OData services: the business partner service to find or create the sold-to party, and the sales order service to create the order with its items. Each service runs on its own engini connection, and SAP’s authorizations on that user apply.

An AI agent step reviews the deal before anything is written: it checks that each product maps to an SAP material, that prices agree, and that the customer is not already in SAP under another name. Since engini has no SAP triggers, a scheduled run reads order status from SAP and writes it back to Salesforce or HubSpot.

[ 02 / How it works ]

Deal to order, status back to sales

01 / Trigger

The deal closes

A real-time outbound message from Salesforce starts the workflow when the opportunity is marked Closed Won. HubSpot deals are checked as often as every 15 minutes.

02 / Check

Review before writing

An AI agent step checks materials, prices and the customer. Anything missing stops the flow with a note in Slack or Teams.

03 / Create

Partner and order in SAP

It finds the sold-to business partner, creates it if it is new, and creates the sales order with its items.

04 / Return

Status back on a schedule

A scheduled workflow reads order status from SAP and writes the order number and status to the opportunity or deal.

[ 03 / What the agent reads and writes ]

What the agent reads and writes

SystemRecordsAccess
Salesforce or HubSpotOpportunity or deal, line items, account or companyReadUpdate
SAP S/4HANABusiness partner (sold-to)ReadCreate
SAP S/4HANASales order and itemsCreateRead
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 SAP logo joined by a thin line, labeled Closed Won: opportunity, check, sales order

Editorial image: from closed won to SAP order.

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, find the sold-to business partner in SAP S/4HANA by the customer number on the account, and create an SAP sales order with the same items and quantities. Write the SAP order number to the opportunity. If the business partner or a material 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 SAP S/4HANA, 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 Salesforce opportunities become SAP S/4HANA sales orders?

A real-time outbound message from Salesforce starts an engini workflow when the opportunity closes. An AI agent checks the deal, and the workflow creates the sales order in SAP through SAP’s sales order OData service.

Which system owns the customer record?

You decide. A common choice: SAP owns the business partner and Salesforce stores the SAP customer number. The workflow looks up the partner by that number and creates one only when none exists.

Do we need SAP Integration Suite or MuleSoft?

No. engini connects to SAP S/4HANA’s standard OData services directly, in the cloud or on premises.

How fast does status come back without SAP triggers?

engini has no SAP triggers, so order status is read on a schedule you set, for example every 15 minutes or every hour.

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 SAP order and write status back to the deal.

Does it work with SAP ECC?

Not yet; engini connects to SAP S/4HANA. An ECC system that publishes OData services through SAP Gateway can be reached with engini’s OData connector.