---
title: "SAP S/4HANA Integration"
description: "Connect AI agents to SAP S/4HANA through its OData v2 API services. Agents read business partners, sales orders, products, and purchase orders, create sales orders with automatic CSRF token handling, and run arbitrary OData queries against any exposed API service."
url: https://flowrunner.ai/integrations/sap-s4hana
date_modified: 2026-08-04T10:04:16-07:00
---

# SAP S/4HANA

[ERP](https://flowrunner.ai/integrations/category/finance-accounting)

Connect AI agents to SAP S/4HANA through its OData v2 API services. Agents read business partners, sales orders, products, and purchase orders, create sales orders with automatic CSRF token handling, and run arbitrary OData queries against any exposed API service.

[Verified](https://flowrunner.ai/integrations/verified "What does verified mean?") · 8 actions · Basic auth · available

[SAP S/4HANA website](https://sap.com/) · [Platform Documentation](https://api.sap.com) · Capability data verified 2026-07-28

1.  A closed-won deal lands from the CRM with account, products, and quantities attached
2.  Get Business Partner resolves the sold-to party against the SAP business partner master, expanding addresses and customer views
3.  List Products validates each line item against the material master, confirming product IDs and base units
4.  The agent assembles the order: order type, sales organization, sold-to party, and line items mapped to SAP's fields
5.  The order desk reviews the assembled order, the one step between a CRM deal and a document in the ERP
6.  Create Sales Order posts the order with its CSRF token handled automatically, returning the assigned SalesOrder number
7.  The fulfillment channel gets the order number and the CRM record updates with the SAP document reference
8.  Get Sales Order polls with to\_Item expanded so order status flows back to the account team without anyone opening the GUI

## What This Integration Enables

The ERP is where the company's commercial reality lives, and in most organizations it is also where automation stops, because touching SAP feels like surgery. The honest architecture is not to avoid the ERP but to structure how agents reach it: reads flow freely, writes pass through review. FlowRunner agents read business partners, sales orders, products, and purchase orders through S/4HANA's standard OData v2 API services, create sales orders with CSRF handling done for them, and reach any other exposed API service through a generic, read-only OData query.

-   Sync customers, suppliers, and contacts from the business partner master to CRMs, sheets, and warehouses
-   Answer order-status questions by reading sales orders and their line items directly
-   Raise sales orders in SAP from leads, forms, and upstream order events, behind approval
-   Pull material master and purchase order data for reporting and reconciliation
-   Query deliveries, stock, journal entries, and any other exposed entity set without waiting for a dedicated action

This is a gated, licensed system, and the connector respects that: the [human-in-the-loop](https://flowrunner.ai/concepts/human-in-the-loop) step in front of every write is not a formality, it is how AI agents earn a place next to an ERP.

### Without FlowRunner

**Swivel-chair order entry**: Deals close in the CRM and someone retypes them into SAP, with the delay and error rate retyping brings

**Order status lives behind a login**: Answering "where is my order" means finding someone with SAP access and time

**Master data drifts everywhere**: The CRM, the warehouse sheet, and the business partner master quietly disagree

### With FlowRunner

**Deals become orders through review**: Agents assemble and validate the order; a person approves; SAP assigns the number

**Status flows to where people ask**: Order and line-item state syncs to Slack, sheets, and the CRM on a schedule

**SAP is the master, visibly**: Partners, products, and POs sync outward from the ERP, so every system reads the same truth

## Use Case Scenarios

### Closed-won to SalesOrder number

A deal closes in [Salesforce](https://flowrunner.ai/integrations/salesforce-pro). The agent resolves the account with Get Business Partner, validates line items against List Products, and stages the order for the order desk. On approval, Create Sales Order posts the deep insert with line items through to\_Item, and the returned SalesOrder number writes back to the deal while [Slack](https://flowrunner.ai/integrations/slack) notifies fulfillment. The order entered SAP exactly once, typed by no one.

### Order status without the GUI tour

The account team asks about orders in their channel. The agent runs Get Sales Order with to\_Item expanded, translates the OData response into a plain-language summary, sold-to, net amount, line status, and posts it back. A scheduled sweep with List Sales Orders filtered on open status feeds the same summaries to [Google Sheets](https://flowrunner.ai/integrations/google-sheets) for the daily operations review, so the question is usually answered before it is asked.

### The reconciliation that reads SAP directly

Nightly, List Business Partners pages through the partner master with OData filters and field selection, syncing changes to the CRM. List Purchase Orders filtered by supplier feeds the procurement dashboard. When finance needs delivery or stock data that has no dedicated action, Run OData Query reaches API\_OUTBOUND\_DELIVERY\_SRV or API\_MATERIAL\_STOCK\_SRV with full control of filter, select, and expand, reads only, by design. Reports reconcile against the ERP itself instead of last week's export of it.

## Human-in-Loop Highlight

Create Sales Order does not write a row, it starts a machine. The moment an order posts, S/4HANA assigns a document number and the downstream chain begins: availability checks, delivery scheduling, warehouse tasks, and eventually an invoice with the customer's name on it. There is no quiet undo; unwinding a bad order means formal rejection steps and a paper trail that outlives the mistake. So the agent on this page assembles but never posts alone. It stages: "Order for sold-to 1000482 Meridian Foods, order type OR, sales org 1010, 3 lines totaling 48,200 EUR net. Line 2 quantity is 4x this customer's usual volume. Post?" The order desk catches the fat-fingered quantity that the CRM deal carried, corrects it, approves, and only then does the CSRF-tokened POST create the document. The same posture is why Run OData Query is read-only: an escape hatch into every exposed entity of an ERP is precisely where unreviewed writes must be impossible, not just discouraged.

Agent processes routinely

Detects exception requiring judgment

Clear match Continues automatically

Ambiguous Routes to human via preferred channel

Human decides

Agent resumes with decision

## Agent Capabilities

8 actions

### Business Partners

2

-   **List Business Partners** Lists customers, suppliers, and contacts from the API\_BUSINESS\_PARTNER service with OData filtering, field selection, ordering, and pagination. The sync source for partner master data.
-   **Get Business Partner** Retrieves a single partner by BusinessPartner key, optionally expanding related entities such as to\_BusinessPartnerAddress or to\_Customer. The resolution step before any order references a party.

### Sales Orders

3

-   **List Sales Orders** Lists sales orders from API\_SALES\_ORDER\_SRV with full OData query options, returning fields such as SalesOrder, SoldToParty, and TotalNetAmount. The sweep behind status dashboards.
-   **Get Sales Order** Retrieves one sales order by key, expanding to\_Item for line and schedule detail or to\_Partner for parties. The read behind every order-status answer.
-   **Create Sales Order** Creates a sales order, fetching the required X-CSRF-Token automatically before posting header fields and line items via deep insert. Returns the assigned SalesOrder number. Posts only after this page's human approval.

### Products

1

-   **List Products** Lists material master records from API\_PRODUCT\_SRV with OData query options, returning Product, ProductType, BaseUnit, and ProductGroup. The validation step for order line items.

### Purchase Orders

1

-   **List Purchase Orders** Lists purchase orders from API\_PURCHASEORDER\_PROCESS\_SRV with OData query options, returning PurchaseOrder, Supplier, and PurchasingOrganization. The feed for procurement reporting and reconciliation.

### OData

1

-   **Run OData Query** Read-only escape hatch against any exposed OData v2 API service and entity set, with full control of filter, select, top, skip, orderby, and expand. The path to deliveries, stock, journal entries, and everything else the dedicated actions do not cover.

## Frequently Asked Questions

### What can FlowRunner do with SAP S/4HANA?

FlowRunner agents can run List Business Partners, Get Business Partner, and List Sales Orders in SAP S/4HANA, plus 5 more actions.

### Does connecting SAP S/4HANA to FlowRunner require OAuth?

No. SAP S/4HANA connects to FlowRunner with basic authentication (a username and password), no OAuth flow required.

### Can SAP S/4HANA trigger a FlowRunner workflow automatically?

SAP S/4HANA doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.

**Work at SAP S/4HANA?** This integration exposes SAP S/4HANA to AI agents on every FlowRunner plan, including through MCP, at no cost to you. [See what FlowRunner offers integration partners](https://flowrunner.ai/integrations/partners), including how to keep this page current.

---
Markdown version of https://flowrunner.ai/integrations/sap-s4hana. Site index: https://flowrunner.ai/llms.txt
