Integrating Nordoon with SAP BTP for end-to-end PO automation
This articles explains how Nordoon integrates natively with SAP Business Technology Platform (BTP) Integration Suite to automate purchase order confirmation processing.

This articles explains how Nordoon integrates natively with SAP Business Technology Platform (BTP) Integration Suite to automate purchase order confirmation processing.
This articles explains how Nordoon integrates natively with SAP Business Technology Platform (BTP) Integration Suite to automate purchase order confirmation processing.
Nordoon, the agentic AI platform for supply chain automation, equips organizations with AI Agents that transform back-office operations by replicating, expanding, and consolidating day-to-day processes while structuring and cleaning data at each stage. SAP BTP Integration Suite ensures these workflows are connected, governed, and extensible across the SAP landscape.
Nordoon’s agentic platform does more than processing documents. It participates intelligently in enterprise workflows, validated by SAP data, and integrated with business processes. Together with SAP BTP Integration Suite, Nordoon's AI Agents provide companies with a scalable path to intelligent PO automation with full visibility and control.
Here are the 6 aspects of the integration that we are going to further explain in order to illustrate a production-ready, working integration (not a theoretical architecture).
1. Complete BPMN flow canvas: Full integration flow showing all steps and system connections.
2. Message processing log: Real execution showing 15.7-second processing time and processed PO data.
3. Groovy script editor: Implementation of Nordoon's API request construction.
4. Nordoon Agent data flow: Configuration of the PO Processing AI Agent.
5. Nordoon REST API connector: Secure API key management and multi-tenant setup.
6. SAP API Business Hub: Purchase Order OData service used for validation.
For a more hands-on understanding of what this integration entails you can watch the video, or you can go through each aspect detailed below.
The integration flow (POAgent) orchestrates a multi-step process that spans three systems:
.png)
Key technical participants:
1. Sender (HTTPS): External system sending PDF documents
2. Nordoon_AI: AI Agent platform processing documents
3. SAP_S4HANA: Enterprise system for validation and data persistence

The flow orchestrates the communication between three systems (Sender, Nordoon_AI, SAP_S4HANA) through a series of transformation steps, API calls, and validation logic. Each box represents a processing step (Content Enricher, Groovy Script, or HTTP Service Task), connected by sequence flows. This visual representation demonstrates the enterprise-grade orchestration capabilities of SAP BTP.
Key components visible in Figure 0:
Technology stack:
Integration flow file: PO Agent.iflw
Endpoint configuration:
URL Path:/po-confirmation/extract
Protocol: HTTPS (TLS 1.2+)
Authentication: Role-Based (ESBMessaging.send)
Max Body Size: 40 MB
XSRF Protection: Disabled (API endpoint)
Security model:
Step 3a: Prepare Nordoon request
Content Enricher Pattern (CallActivity_5):
Step 3b: Build request payload
Script: build_nordoon_request.groovy

The editor provides syntax highlighting, code folding, and integrated validation. Note the structured JSON construction and debug logging for security (only first 10 characters of API key logged).
def nordoonRequest = [
name: 'PO Confirmation ' + new Date().format('yyyy-MM-dd HH:mm:ss'),
input_file: [
filename: 'confirmation.pdf',
mimetype: 'application/pdf',
base64: pdfContent // Base64-encoded PDF from sender
]
]
Key technical aspects:
Step 3c: Call Nordoon API
Nordoon Agent configuration

The agent data flow consists of a RESTAPI trigger, business logic agent, and REST API output formatter.
The endpoint UUID (320da0f68c324e019547d2e8a8118cc2) uniquely identifies this agent configuration.

This connector is used by the “SAP BTP Order Confirmations Flow” as an Agent Data Flow, demonstrating how Nordoon Agents can be reused across multiple automation workflows.
HTTP adapter configuration:
Endpoint: https://app-eu.nordoon.ai/api/v2.0/public/extract/${property.nordoon.endpoint.uuid}/sync/
Method: POST
Timeout: 60000ms (60 seconds)
Retry: 1 iteration, 5-second interval
Authentication: API Key (x-api-key header)
Region: EU (app-eu.nordoon.ai)
Synchronous processing:
Response structure:
{
"result": [{
"General Info": {
"Purchase Order Number": "4500000001"
},
"Items": [
{
"Item Number": "10",
"Material Description": "VAI101 - Widget Type A",
"Confirmed Quantity": "100",
"Confirmed Delivery Date": "2025-11-20"
}
]
}]
}
Step 3d: Parse Nordoon Response
Script: parse_nordoon_response.groovy
def nordoonResult = jsonSlurper.parseText(responseBody)
// Extract structured data from AI agent response
def poNumber = nordoonResult.result[0]?.'General Info'?.'Purchase Order Number'
def items = nordoonResult.result[0]?.Items
// Store in message exchange properties
message.setProperty('po.number', poNumber)
message.setProperty('po.items.count', items?.size()?.toString() ?: '0')
message.setProperty('nordoon.result', responseBody) // Full result for transformation
// Set PO number as body for next step (SAP validation)
message.setBody(poNumber)
Data processing:
Step 4a: Validate that PO exists in SAP
Purpose: Verify that the PO number processed by Nordoon actually exists in SAP before posting confirmations.

This same OData service is used in the integration flow to validate PO numbers extracted by Nordoon.
HTTP GET request:
Endpoint: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder('${in.body}')
Method: GET
Headers:
- Accept: application/json
- apikey: ${property.sap.api.key}
Real-world example:
Dynamic URL construction:
Validation script: check_call_got_200.groovy
Endpoint: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder('${in.body}')
Method: GET
Headers:
- Accept: application/json
- apikey: ${property.sap.api.key}
Error handling:
Step 4b: Tranform to SAP OData format
Script: transform_to_sap_format.groovy
if (item.'Confirmed Quantity') {
sapConfirmations.add([
PurchaseOrder: poNumber,
PurchaseOrderItem: item.'Item Number',
ConfirmedQuantity: (item.'Confirmed Quantity' as Integer),
ScheduleLineDeliveryDate: item.'Confirmed Delivery Date' ?: null,
Material: extractMaterialNumber(item.'Material Description'),
Plant: "1000"
])
}
}
Data mapping:

Material number:
def extractMaterialNumber(String description) {
def parts = description.split(' - ')
return parts.length > 0 ? parts[0].trim() : description
}
Output payload:
{
"confirmations": [
{
"PurchaseOrder": "4500000001",
"PurchaseOrderItem": "10",
"ConfirmedQuantity": 100,
"ScheduleLineDeliveryDate": "2025-11-20",
"Material": "VAI101",
"Plant": "1000"
}
]
}
Step 4c: Post Confirmations to SAP
HTTP POST request:
Endpoint: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrderScheduleLine
Method: POST
Headers:
- Accept: application/json
- Content-Type: application/json
- apikey: ${property.sap.api.key}
Production considerations:
Step 4d: Response validation
Script: post_to_sap_check.groovy
if (responseCode >= 200 && responseCode < 300) {
// Success
String successResponse = """
{
"status":"success",
"message":"PO confirmation posted to SAP successfully",
"po_number":"${poNumber}",
"items_confirmed":${itemsCount},
"sap_response_code":${responseCode}
}
"""
message.setBody(successResponse)
} else if (responseCode == 405) {
// Sandbox limitation - treat as success
String successResponse = """
{
"status":"success_simulated",
"message":"PO validated successfully. Posting simulated (sandbox limitation)",
"note":"SAP sandbox does not allow POST operations..."
}
"""
message.setBody(successResponse)
}
Response codes:

Key information visible: Status(Completed), Processing Time (15.7 seconds), Log Level (Info), and custom attachments. The “Extracted_PO_Info” attachment shows PO Number: 4500003529 with 4 items processed. This demonstrates the enterprise-grade monitoring and transparency that SAP BTP provides for all integration flows.
Message processing logs:
Attachments for debugging:
if (messageLog != null) {
messageLog.addAttachmentAsString(
"Extracted_PO_Info",
"PO Number: ${poNumber}\nItems Count: ${items?.size()}",
"text/plain"
)
}
Real-world monitoring data (from Figure 5):
Key metrics available:
Exception propagation:
if (statusCode != 200) {
throw new Exception("HTTP call failed. Expected 200, but got: ${statusCode}")
}
Flow-level error handling:
Retry configuration:
Scenario: Trigger downstream processes when PO confirmations are posted.
<eventPublisher name="PO_Confirmation_Published">
<topic>nordoon/po/confirmed</topic>
<eventPayload>
{
"po_number": "${property.po.number}",
"items_confirmed": "${property.po.items.count}",
"source": "nordoon_integration"
}
</eventPayload>
</eventPublisher>
Use cases:
Extension point: After Nordoon parsing, before SAP posting
// Check if confirmation requires approval
if (totalValue > approvalThreshold) {
message.setProperty('approval.required', 'true')
message.setProperty('approval.workflow.id', 'WS99000001')
}
Workflow integration:
Example: Integrate with external logistics provider
Nordoon Processing → SAPValidation → Logistics API → SAP Confirmation
Additional steps:
1. After PO validation, call logistics provider API to check delivery capacity
2. If capacity available, reserve slot and get confirmation number
3. Include logistics confirmation number in SAP posting
4. All orchestrated in single integration flow
Dead letter queue pattern:
// In exception subprocess
message.setProperty('error.timestamp', new Date().toString())
message.setProperty('error.step', 'nordoon_api_call')
message.setProperty('error.original.payload', originalPayload)
// Route to error queue for manual review
Alerting integration:

Concurrent processing:
High-volume scenarios:
For SAP architects
For AI/ML engineers
For business process owners
For CTOs
Nordoon AI Platform:
BaseURL: https://app-eu.nordoon.ai
Endpoint:/api/v2.0/public/extract/{endpoint_uuid}/sync/
Method: POST
Authentication: x-api-key header
Response Time: 2-8 seconds (synchronous)
Max File Size: 40 MB
SAP S/4HANA OData(Sandbox):
BaseURL: https://sandbox.api.sap.com/s4hanacloud
PO Process API:/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV
Entities: A_PurchaseOrder,A_PurchaseOrderScheduleLine
Authentication: API Key (Production: OAuth 2.0)
SAP BTP integration suite:
External services:
This integration was developed to demonstrate production-ready, enterprise-scale integration between Nordoon’s agentic AI platform and SAP BTP. All code and configurations shown are from a working integration flow deployed to SAP Integration Suite. For questions about implementing similar integrations, get in touch with us.
Subscribe to our newsletter, and we will send AI automation insights like this straight to your inbox on a regular basis.