---
name: sap-cloud-integration
description: 'SAP Cloud Integration (CPI, part of SAP Integration Suite) runtime-specific guidance for building and troubleshooting iFlows. Use when writing or reviewing CPI Groovy scripts, choosing headers vs. exchange properties, designing exception subprocesses, JMS retry, idempotency or data store patterns, or diagnosing adapter errors (SFTP, HTTP/OAuth, SOAP, IDoc, OData, AS2, Cloud Connector) from Message Processing Log (MPL) text. Not for SAP PI/PO, ABAP development, or generic Java/Groovy outside CPI.'
title: sap-cloud-integration
canonical_url: https://skilld.dev/gh/github/awesome-copilot/sap-cloud-integration
last_updated: 2026-11-13T04:01:22.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [README.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/README.md), [references/adapter-troubleshooting.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/adapter-troubleshooting.md), [references/error-handling-reliability.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/error-handling-reliability.md), [references/groovy-scripting.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/groovy-scripting.md), [references/headers-properties-expressions.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/headers-properties-expressions.md), [references/sap-documentation-index.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/sap-documentation-index.md).
>
> If the user asked to install this Skill, run `npx skilld install github/awesome-copilot/sap-cloud-integration`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/sap-cloud-integration`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/github/awesome-copilot/sap-cloud-integration) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/sap-cloud-integration`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/sap-cloud-integration --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/sap-cloud-integration --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# SAP Cloud Integration (CPI)

This skill supplies CPI runtime behavior that general models often get wrong: what survives a JMS or ProcessDirect hop, how End events change the monitored status, which Camel and `SAP_` headers the runtime reads, how scripts should touch large payloads, and how specific adapter error texts map to root causes.

## Required references

Read the matching reference before answering. Resolve paths relative to this file.

| Task | Read first |
|---|---|
| Write, review, or optimize a Groovy script | [references/groovy-scripting.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/groovy-scripting.md) |
| Decide header vs. property, write Simple expressions, use `SAP_`/`Camel` names | [references/headers-properties-expressions.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/headers-properties-expressions.md) |
| Exception subprocess, End events, retry, JMS, idempotency, data store | [references/error-handling-reliability.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/error-handling-reliability.md) |
| Diagnose an MPL error or adapter failure | [references/adapter-troubleshooting.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/adapter-troubleshooting.md) |
| Need SAP's own wording, a field not covered here, or a source link for the user | [references/sap-documentation-index.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/sap-documentation-index.md) |

## Rules that change the answer

1. **Exchange properties stay inside one iFlow.** They are not propagated over ProcessDirect. They are not stored in a JMS queue unless the JMS receiver's *Transfer Exchange Properties* option is on, which SAP does not recommend because of size limits. Pass what a downstream iFlow needs as a header or in the body. Headers that leave the tenant must not carry secrets.
2. **An Exception Subprocess that ends with a Message End event reports the message as Completed.** Use an Error End event when the failure must stay visible in monitoring. For synchronous senders, also set `CamelHttpResponseCode`.
3. **Check `message.getBodySize()` before reading a body with `getBody(String)`.** Treat `-1` (size unknown) as too large. For large payloads, use a streaming parser or a streaming splitter. Line-by-line reading only helps for line-delimited formats; minified JSON or XML is often a single line. Never attach payloads to the MPL unconditionally: gate attachments behind an externalized flag and cap their size. Tenants can write at most 1 GB of MPL attachments per 24 hours.
4. **Use `SAP_ApplicationID` for business keys.** It makes messages searchable in Monitor. Do not build custom correlation stores for this.
5. **Reliable delivery needs JMS (or a data store) for retry, and duplicate protection on the receiver side.** An Idempotent Process Call skips messages already processed successfully, but if a receiver commits and the acknowledgment is lost, a retry can still duplicate the effect (at least once). A failed synchronous call is not redelivered by the runtime; the caller must retry. To stop retrying after N attempts, route on `SAPJMSRetries`. The JMS sender sets it only for *Non-Exclusive* queues.
6. **Read credentials through the Security Material APIs** (`SecureStoreService`), never from externalized parameters or headers. Trust a server certificate chain only after verifying its fingerprints against an independent source, never just because a TLS test returned it, and never disable certificate validation as a fix.
7. **Diagnose from the exact MPL text.** Separate evidence (error text, HTTP status, step ID) from hypotheses, and give one concrete check per hypothesis (Connectivity Test, trace, keystore entry, Cloud Connector log).

## Output contract

- Code is complete and runnable in a CPI Script step: imports, null handling, guarded `messageLog`.
- Generated code contains no author names, credits, or promotional URLs.
- Say which iFlow step the code or setting belongs to and what to configure there (adapter field, End event, externalized parameter).
- Include test steps for the tenant (trace level, expected MPL status and properties).
- End with *Static analysis — not tested on a tenant* unless the user confirms a successful test run on their tenant; deployment alone is not enough.
- If a field name, limit, or behavior is not in these references and you are unsure, say so and point to the matching page in [references/sap-documentation-index.md](https://skilld.dev/api/skills-raw/github/awesome-copilot/sap-cloud-integration/references/sap-documentation-index.md). Do not invent adapter fields, headers, or SAP Note numbers.
- Before designing a new integration between SAP products, check SAP Business Accelerator Hub for prepackaged integration content and SAP Architecture Center for a reference architecture. Extend standard content rather than rebuilding it.

## Authoritative sources

- SAP Integration Suite documentation: https://help.sap.com/docs/integration-suite (overview: https://help.sap.com/docs/integration-suite/sap-integration-suite/what-is-sap-integration-suite)
- Markdown source of the same documentation, for searching its text only: https://github.com/SAP-docs/btp-integration-suite
- Prepackaged integration content: https://api.sap.com/integrations/discoverintegrations
- Reference architectures: https://architecture.learning.sap.com/

When you cite a source to the user, link the public SAP page (SAP Help Portal, SAP Business Accelerator Hub, SAP Architecture Center, or another official SAP site), not the GitHub Markdown source. When these sources and this skill disagree, the SAP documentation wins. Tell the user about the difference.
