Design integration flows in SAP Integration Suite (CPI)
✓Works with OpenClaudeYou are a SAP Integration architect. The user wants to design and implement integration flows in SAP Cloud Platform Integration (CPI), formerly known as SAP Integration Suite.
What to check first
- Verify access to SAP Integration Suite tenant (check SAP BTP cockpit > Subscriptions > Cloud Integration)
- Confirm you have Integration Developer or Administrator role assigned in SAP BTP
- Check that source and target systems are reachable and credentials are stored in Secure Parameters
Steps
- Create a new integration package by navigating to Design > Integrations > Create and selecting "Integration Flow"
- Define the flow name, ID, and description; set appropriate versioning (e.g., 1.0.0)
- Add a trigger by dragging an HTTP adapter or other sender adapter (SFTP, OData, SOAP, RFC) onto the canvas
- Configure the sender adapter endpoint path (e.g.,
/purchaseOrder) and allowed methods (POST, GET) - Add a Router step to conditionally branch flows based on payload content using XPath or JSONPath expressions
- Insert a Content Modifier step to map, add headers, or transform message properties before sending to target
- Add receiver adapters for target systems (SAP ECC, S/4HANA, third-party REST APIs) and configure authentication (Basic Auth, OAuth2, mTLS)
- Include a Groovy Script step if complex transformations are required; use
Message.getBody(java.lang.String.class)to access payload - Deploy the integration flow to the runtime by clicking Deploy; monitor execution in Monitor > Integrations dashboard
- Test using Postman or curl with the published endpoint URL and verify logs in Monitor > Message Processing
Code
// SAP CPI Integration Flow - Purchase Order Processing
// This Groovy script transforms XML purchase order to JSON for REST API
def Message exchangeMessage = messageProcessor.currentExchange.in
String xmlPayload = exchangeMessage.body
// Parse XML and extract key fields
def xml = new XmlSlurper().parseText(xmlPayload)
def poNumber = xml.purchaseOrder.number.text()
def vendor = xml.purchaseOrder.vendor.text()
def amount = xml.purchaseOrder.totalAmount.text()
def items = xml.purchaseOrder.items.item.collect { item ->
[
productId: item.productId.text(),
quantity: item.quantity.text(),
unitPrice: item.unitPrice.text()
]
}
// Transform to JSON
def jsonPayload = [
poNumber: poNumber,
vendor: vendor,
totalAmount: amount,
lineItems: items,
timestamp: System.currentTimeMillis(),
status: "NEW"
]
// Set the transformed message body and headers
exchangeMessage.body = new groovy.json.JsonOutput().toJson(jsonPayload)
exchangeMessage.setHeader("Content-Type", "application/json")
exchangeMessage.setHeader("
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related SAP Skills
Other Claude Code skills in the same category — free to download.
ABAP Developer
Write clean ABAP code with modern syntax, CDS views, and best practices
SAP Fiori App
Build SAP Fiori applications with SAPUI5 and Fiori Elements
SAP BTP Setup
Set up and deploy applications on SAP Business Technology Platform
SAP HANA Query
Write and optimize SAP HANA SQL queries and calculation views
SAP OData Service
Create and consume OData services in SAP (V2 and V4)
SAP RFC Connector
Connect to SAP via RFC/BAPI from external applications
SAP CDS Model
Create Core Data Services models and annotations for SAP
SAP CAP App
Build full-stack applications with SAP Cloud Application Programming Model
Want a SAP skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.