SAP
Connects to SAP systems (SAP S/4HANA, ERP, Business One) via the OData REST API. An agent can query, create, update and delete OData entities, list available services, and call custom function imports.
Add to an agent node's tools array with _node_type: "tool-sap". See Connector Reference — How connectors are used.
Authentication
| Field | Required | Description |
|---|---|---|
base_url | Yes | Base URL of the SAP system, e.g. https://mycompany.s4hana.ondemand.com. |
username | Yes | SAP username, used for HTTP Basic auth. |
password | Yes | SAP password, used for HTTP Basic auth. |
sap_client | No | SAP client number, e.g. 100 (default: 100). |
api_path | No | Base OData API path (default: /sap/opu/odata/sap/). |
{
"name": "sap",
"_node_type": "tool-sap",
"base_url": "https://mycompany.s4hana.ondemand.com",
"username": "{{ secret.SAP_USERNAME }}",
"password": "{{ secret.SAP_PASSWORD }}",
"sap_client": "100"
}
Tools
sap_query
Query SAP OData entities (business partners, sales orders, materials, etc.).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | OData service name, e.g. API_BUSINESS_PARTNER |
entity_set | string | Yes | EntitySet name, e.g. A_BusinessPartner |
filter | string | No | OData filter expression, e.g. BusinessPartner eq '1000000' |
select | string | No | Comma-separated fields to return |
top | number | No | Max records (default 20) |
order_by | string | No | Sort field and direction, e.g. BusinessPartner desc |
Returns: A summary line with the number of records found, followed by the matching records as indented JSON, or "No records found.".
sap_create
Create a new SAP entity (e.g. create a sales order, customer, material).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | OData service name |
entity_set | string | Yes | EntitySet name |
data | object | Yes | Entity fields as key-value pairs |
Returns: "Created:" followed by the created entity as indented JSON.
sap_update
Update an existing SAP entity using MERGE/PATCH (partial update).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | OData service name |
entity_set | string | Yes | EntitySet name |
key | string | Yes | Entity key, e.g. BusinessPartner='1000000' |
data | object | Yes | Fields to update |
Returns: A success message (e.g. "Entity <entity_set>(<key>) updated successfully."), or the raw response body if non-empty.
sap_delete
Delete an SAP entity by its key.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | OData service name |
entity_set | string | Yes | EntitySet name |
key | string | Yes | Entity key, e.g. MaterialDocument='5000000001' |
Returns: A success message (e.g. "Entity <entity_set>(<key>) deleted."), or the raw response body if non-empty.
sap_list_services
List available OData services on the SAP system.
No parameters.
Returns: A newline-separated list of <ServiceCollection> <Title> lines, or "No services found — check base_url and credentials.".
sap_function_import
Call a SAP OData function import (custom operations like posting goods movements, approvals, etc.).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | OData service name |
function | string | Yes | Function import name |
params | object | No | Function parameters |
method | string | No | HTTP method GET or POST (default GET) |
Returns: The function import's response body as indented JSON.