Salesforce and SAP Integration: The Complete Guide to Streamlining Enterprise Data Flow
How Salesforce SAP integration works on S/4HANA, ECC and Business One: the methods, which system owns which data, real-time vs batch, and AI agents.
Salesforce SAP integration connects Salesforce, where sales and service teams manage accounts, opportunities and quotes, with SAP, where the company keeps customers, prices, sales orders, deliveries and invoices, so records move between the two without anyone retyping them. You build it with the two vendors' own APIs, with SAP Integration Suite, with an integration platform, or with a gateway that lets workflows and AI agents act in both systems.
The right method depends mostly on which SAP you run. SAP S/4HANA exposes OData APIs, SAP ECC relies on older interfaces such as IDocs, and SAP Business One has its own REST API, the Service Layer. This guide covers all three, the data each system should own, and the flows to build first.
Where engini fits: engini connects Salesforce and SAP S/4HANA or SAP Business One in one place, so a workflow or an AI agent can read and write in both systems: create the SAP sales order when a Salesforce opportunity closes, then write the order and invoice status back to the account. Each agent gets only the tools and accounts you give it, and every run is recorded. See the Salesforce and SAP S/4HANA connection guides.
Key Takeaways
- Salesforce SAP integration moves accounts, prices, orders, stock and invoice status between the CRM and the ERP, usually in both directions.
- The method depends on the SAP product: OData APIs on S/4HANA, IDocs or OData services on ECC, and the Service Layer on SAP Business One.
- Decide which system owns each record before you build. Salesforce usually owns opportunities and contacts; SAP owns materials, pricing, orders and financials.
- Salesforce counts REST, SOAP and Bulk API calls against one org-wide allocation per 24 hours: 100,000 plus 1,000 per Salesforce license on Enterprise Edition.
- SAP announced in February 2020 that mainstream maintenance for SAP Business Suite 7, which includes ECC, ends at the close of 2027, so plan any ECC integration with an S/4HANA move in mind.
What Is Salesforce SAP Integration?
Salesforce SAP integration is the set of connections that keeps the same customer, order and financial data consistent between Salesforce and SAP. Salesforce is where the deal happens. SAP is where the order is fulfilled, billed and booked. Without a connection, someone copies the closed deal into SAP by hand, and sales works without seeing credit limits, stock or unpaid invoices.
These are the records most integrations move:
| Data | In Salesforce | In SAP | Usual owner | Direction |
|---|---|---|---|---|
| Customer | Account, contacts | Business partner (S/4HANA) or customer (ECC, Business One) | Salesforce creates it; SAP owns credit and payment terms | Both ways |
| Products and prices | Products, price books | Materials, pricing | SAP | SAP to Salesforce |
| Orders | Opportunity, quote, order | Sales order | Salesforce starts it; SAP owns it once created | Salesforce to SAP, status back |
| Stock | Shown on the product or quote | Inventory and availability | SAP | SAP to Salesforce |
| Invoices and payments | Fields or a custom object on the account | Billing and accounting documents | SAP | SAP to Salesforce |
Why Integrate Salesforce and SAP?
You integrate Salesforce and SAP so the people who sell can see what finance and operations know, and so a closed deal becomes an order without a second round of data entry. The common gains:
- Order to cash without retyping. A closed-won opportunity creates the customer and the sales order in SAP, and the SAP order number comes back to Salesforce. See order to cash.
- A view of the customer's account. Reps see credit limits, payment terms and open invoices before they quote.
- Prices and stock that match the ERP. Quotes use SAP's materials and prices instead of a copy that drifts.
- One customer record. The same customer exists once in each system, joined by IDs, instead of duplicates with different addresses.
Salesforce SAP Integration Methods
There are four main ways to connect the two systems, and you can combine them:
| Method | How it works | Fits | Watch for |
|---|---|---|---|
| Direct API code | Your developers call Salesforce's REST and Bulk APIs and SAP's OData APIs, IDocs or Service Layer | One or two flows, a team that wants full control | You own sign-in, retries, mapping, logging and every API change |
| SAP Integration Suite | SAP's integration platform on SAP Business Technology Platform, with prebuilt integration packs and Open Connectors for non-SAP apps | SAP-centered IT teams with integration developers | A separate SAP subscription and integration skills |
| Salesforce Connect (OData) | Salesforce reads SAP data in real time as external objects, without copying it into Salesforce | Showing SAP orders or invoices inside Salesforce | It is a live view, not a sync; SAP must expose OData |
| Integration platform or agent gateway | A platform with prebuilt connectors to both systems runs the flows | Several flows, both directions, or AI agents that must act in both systems | Depth on your SAP version, and who maintains the flows |
SAP describes SAP Integration Suite as an integration platform as a service with "pre-built, best-practice integration packs" that runs on SAP Business Technology Platform or in your private landscape, and lists Open Connectors for non-SAP cloud applications.
Salesforce's own documentation for external objects describes the OData 2.0 and 4.0 adapters of Salesforce Connect with the example of "pulling data from legacy systems such as SAP, Microsoft, and Oracle in real time." External objects are a good fit when you need a small amount of SAP data at a time and do not want to store a copy.
Among enterprise integration platforms, MuleSoft (owned by Salesforce since 2018) and Boomi offer connectors for both SAP S/4HANA and SAP ECC.
Salesforce Integration With SAP S/4HANA
On SAP S/4HANA, integrations use SAP's OData APIs, which are REST-style web services for business objects such as business partners and sales orders. For orders, SAP's Sales Order (A2X) API creates and changes sales orders.
Two S/4HANA details shape the design:
- The business partner is the customer. SAP's training material for S/4HANA describes the business partner as the "leading object" and lists it as mandatory in S/4HANA (SAP Learning). A Salesforce account maps to a business partner with a customer role, not to a standalone customer record.
- One sales order per change set. SAP's knowledge base states that with the Sales Order (A2X) API "you can only create or process a single sales order per change set of a $batch OData request" (SAP KBA 3163859, for S/4HANA Cloud 2202). If you send many closed deals at once, give each order its own change set.
Tip: Store the Salesforce account ID on the SAP business partner and the SAP business partner number on the Salesforce account. Every later update can then find the right record without matching on names.
Salesforce Integration With SAP ECC
SAP ECC predates S/4HANA's OData-first design, so ECC integrations usually exchange IDocs or call OData services exposed from the ECC system. SAP defines an IDoc as "the standard SAP format for sending messages (transaction data, master data, control data)" (SAP Help). SAP Integration Suite also lists OData Provisioning, to "access data from SAP Business Suite using OData services."
Timing matters. In February 2020, SAP set mainstream maintenance for SAP Business Suite 7 core applications to the end of 2027, with optional extended maintenance to the end of 2030. An ECC integration built now will likely be rebuilt for S/4HANA. Keep the Salesforce side stable (the same objects, fields and external IDs), so only the SAP side changes when you move.
Salesforce Integration With SAP Business One
SAP Business One is integrated through the Service Layer. SAP describes it as "a REST API, allowing you to consume SAP Business One data" that follows OData standards and supports versions 3.0 and 4.0 (SAP Learning).
The flows are the same as on S/4HANA: closed-won deals create customers and sales orders, and order, delivery and invoice status flow back to Salesforce.
Which System Should Own the Data?
Each record and each field should have exactly one owner, and the integration only copies from the owner to the other system. When both systems can edit the same field, updates bounce back and forth or overwrite each other.
- Salesforce owns: leads, contacts, opportunities, and the commercial terms of a deal before it closes.
- SAP owns: materials, prices, sales orders once created, deliveries, invoices, payments, credit limits.
- Shared, with one owner per field: the customer. Salesforce may create it; SAP owns the financial fields.
Make SAP-owned fields read-only in Salesforce, and store each system's ID in the other. Our guides on Salesforce field mapping and Salesforce external IDs for ERP upserts cover both in detail.
Real-Time or Batch?
Use events for anything a person waits on, and batches for large volumes nobody waits on. Salesforce supports both:
| Need | Salesforce mechanism | What Salesforce documents |
|---|---|---|
| React when a record changes | Change Data Capture | Publishes near-real-time change events for record creation, update, deletion and undeletion |
| Load or read many records | Bulk API 2.0 | Asynchronous; Salesforce calls any operation over 2,000 records "a good candidate" for it |
| Show SAP data without copying it | Salesforce Connect external objects | Reads the external system on demand |
A closed deal that should become an SAP order is an event. A nightly refresh of prices or open invoices for thousands of accounts is a batch.
Common Technical Challenges
Most Salesforce SAP integration problems come from data models, limits and ownership, not from the connection itself.
- Different data models. A Salesforce account with contacts does not map one to one to an SAP business partner with roles, sales areas and partner functions. Write the mapping down per field.
- API allocations. Salesforce enforces limits on the aggregate of all calls to the org in 24 hours, not per user. Enterprise Edition gets 100,000 calls plus 1,000 per Salesforce license, and production orgs allow 25 concurrent requests that run 20 seconds or longer (Salesforce API limits). Polling SAP status for every account every minute uses that budget fast.
- Custom fields on both sides. Most SAP and Salesforce instances are customized. An integration that only knows the standard fields fails on the mandatory custom ones.
- Partial failures. Some records succeed and some fail. Log every write with its result, so you can retry only the failures.
- Credentials and access. The integration user often has broad rights in both systems. Give it only the objects and actions each flow needs.
Adding AI Agents to a Salesforce SAP Integration
An AI agent changes who calls the APIs, not what the systems require. Instead of a fixed flow, an agent decides which records to read or write, for example answering a rep who asks whether a customer has paid last month's invoices, or preparing a sales order from an opportunity and the SAP price list.
That makes the controls above stricter. The agent needs a limited set of tools (read invoices, create orders, nothing else), the account it acts as, the real fields of your instance, and a record of every call. A rule in the prompt, such as "never delete orders", is a request to the model. A tool the agent was never given is a control.
How engini Connects Salesforce and SAP
engini is an agent gateway with deep connections to both systems. The same connections serve no-code workflows in Workflow Studio and agents that connect through MCP, the Python and TypeScript SDKs, the REST API or the CLI.
- Salesforce: create, update, upsert, delete and get records, bulk create through the Bulk API, and custom requests to any Salesforce API. Triggers fire when a record is created or updated (checked as often as every 15 minutes) or in real time from Salesforce outbound messages. Sign-in runs through OAuth with engini's managed package or your own Salesforce app (docs).
- SAP S/4HANA: get, create, update and delete records on any object an OData service exposes, read a service's metadata, and send custom requests. Fields load from the service's metadata. A connection uses OAuth 2 or a user name and password, for cloud or for on-premises and private cloud installations (docs).
- SAP Business One: get, create, update and delete records, each also in batch, plus attachments and record actions.
- Both directions. Any flow can read from and write to either system, so invoice and payment status can flow back to Salesforce.
- Your own setup. Custom fields and custom objects are read live from each system.
- Control and record. A toolset limits an agent to the tools you choose and the connection each one uses, enforced on the server for SDK, API and CLI calls. engini acts as the connected account, with its permissions, and keeps an audit log you can export or stream to a SIEM.
- Behind the firewall. An on-premises agent reaches internal systems over outbound connections only, or you can allowlist engini's IP addresses.
An illustrative order-to-cash flow:
- An opportunity in Salesforce is marked Closed Won.
- engini looks up the business partner in SAP by the stored Salesforce account ID, and creates it if it does not exist.
- engini creates the sales order in SAP with the opportunity's products and quantities.
- The SAP order number is written back to the opportunity.
- A scheduled workflow reads billing status from SAP and updates the account in Salesforce.
When you may not need engini: if you run SAP ECC and your flows depend on IDocs, engini's SAP connection is built on S/4HANA OData services, so SAP Integration Suite or an existing integration platform is the better fit. If you only need to show SAP data inside Salesforce screens, Salesforce Connect may be enough.
To start, read the engini documentation or point your agent at the machine-readable index, docs.engini.ai/llms.txt. For background on ERP connections in general, see ERP integration and the integrations page.
Agent gateway
Ship agents into systems you can’t afford to break
Connect AI agents to your ERP, CRM, financial and legacy systems through MCP, SDK, API or canvas, with secure auth, tool permissions and an audit trail built in.
Frequently Asked Questions
How do you integrate Salesforce with SAP?
You connect Salesforce's APIs to SAP's interfaces, directly in code, through SAP Integration Suite, or through an integration platform or agent gateway. First decide which system owns each record, map the fields, and store each system's IDs in the other.
Is it better to use real-time or batch integration for Salesforce and SAP?
Use real-time events for what people wait on, and batches for large volumes. Turning a closed deal into an SAP order should be event-driven; nightly price or invoice refreshes for thousands of accounts suit Salesforce's Bulk API 2.0.
Do I need a third-party tool for Salesforce SAP integration?
No, you can build it with custom code, but then your team owns sign-in, retries, error handling, mapping changes and API version updates on both sides. A platform takes over that work when you run several flows.
Can Salesforce integrate with SAP ECC?
Yes, usually through IDocs or OData services exposed from ECC. SAP's mainstream maintenance for SAP Business Suite 7, which includes ECC, ends in 2027, so plan the integration so the Salesforce side survives a move to S/4HANA.
How does SAP S/4HANA change Salesforce integration?
S/4HANA makes OData APIs the main interface and makes the business partner the leading customer object. A Salesforce account maps to a business partner, and orders go through APIs such as Sales Order (A2X).
Can Salesforce integrate with SAP Business One?
Yes, through the SAP Business One Service Layer, a REST API that follows OData standards. The common flows create customers and sales orders from closed deals and send order and invoice status back.
Sources
- SAP Help: What is SAP Integration Suite?
- SAP Help: IDoc Administration
- SAP News, February 4, 2020: SAP S/4HANA maintenance to 2040 and SAP Business Suite 7
- SAP Knowledge Base Article 3163859: one sales order per change set
- SAP Learning: Explaining the Business Partner Integration
- SAP Learning: Service Layer API terms and documentation
- Salesforce: External Objects
- Salesforce: Change Data Capture
- Salesforce: Introduction to Bulk API 2.0 and Bulk API
- Salesforce: API Request Limits and Allocations
- engini docs: Salesforce and SAP S/4HANA