Home / Case study

Order-to-cash credit risk agent on S/4HANA 2025.

A clean-core API exposes credit exposure, overdue items and limits. A Joule agent answers in plain language, recommends an action and routes the order block for approval.

At a glance

SystemS/4HANA 2025
Custom APIZAPI_CUSTOMER_RISK
AgentJoule Studio
WorkflowSAP Build Process Automation
Core modifications0
The build, screen by screen
✦ Joule?  ◯

Good morning, Priya.
Here’s your credit desk.

3 items need attention today

◷ CREDIT RISK · LIVE

3 customers are above their credit limit.

Review customers

Overdue > 60 days

EUR 214,800 across 7 customers

Orders on credit hold

12 sales orders waiting

✦ Joule✕
Which customers are over their credit risk this week?
I checked live exposure in S/4HANA. 3 customers exceed their limit — one also has items overdue more than 60 days.
Nordwind GmbH128%
Alpenmetall AG112%
Rhein Logistics104%
Block new orders for Nordwind

Calls RAP action · blockOrders

←  Customer 10001
Risk review in progress

Nordwind GmbH

Hamburg · Credit segment 1000

Credit limitEUR 500,000
Current exposureEUR 640,000
Overdue > 60 daysEUR 72,400
Risk score87 · High

Agent recommendation

Block new orders and request a limit review from the credit manager.

← My Inbox?

Approve credit block

Requested by Joule agent · 09:42

SAP BUILD PROCESS AUTOMATION

CustomerNordwind GmbH
ReasonExposure 128%
Open orders4 · EUR 86,000

Comment (optional)

ApproveReject
GET /CustomerRisk(‘10001’)200
{
  "Customer": "10001",
  "Name": "Nordwind GmbH",
  "CreditLimit": 500000,
  "Exposure": 640000,
  "OverdueAmount": 72400,
  "RiskScore": 87,
  "RiskLevel": "HIGH",
  "Currency": "EUR",
  "_actions": [
    "blockOrders",
    "requestLimitReview"
  ]
}

// ZAPI_CUSTOMER_RISK
// RAP · OData V4 · ABAP Cloud
// S/4HANA 2025 · clean core

Order block applied

Nordwind GmbH · 09:44

Sales orders blocked4
Credit manager notified✓
Audit logSaved
Back to Joule
The story

From a manual credit check to a one-line answer.

01

The challenge

Credit teams checked exposure, overdue items and open orders across several transactions before deciding to block a customer.

02

The solution

A RAP API combines the data and offers blockOrders and requestLimitReview actions. The agent uses it to answer and act.

03

The result

The credit manager gets a clear answer and a ready-to-approve action, with every step logged in S/4HANA.

How it was built

01

Custom API

CDS views on credit, open items and orders; RAP actions for blocking.

02

Agent

Joule agent with instructions and API tools.

03

Approval

SBPA task to the credit manager before any block.

04

Go-live

Transported with docs; audit log in S/4HANA.

S/4HANAS/4HANA CloudRAPOData V4SAP BTPJoule StudioSAP Build Process Automation
Let’s talk

Want this agent on your system?

© 2026 erpai.blogSAP, S/4HANA and Joule are trademarks of SAP SE. Screens show illustrative sample data.