SAP Integration

SAP CPI iFlow Basics: Structure, Steps, and Troubleshooting

Learn how SAP CPI integration flows are structured, how common steps work, and how to troubleshoot message processing in a practical operations workflow.

SAP CPI iFlow message pathShow the main components of an integration flow from sender to receiver.SAP CPI iFlow message pathShow the main components of an integration flow from sender to receiver.message enters flowprocessed messageruntime traceSenderadapterAccepts orpolls for the…ProcessingstepsValidates,transforms,…ReceiveradapterDelivers theprocessed…Messageprocessing…Providesruntime…CertPas original visual explanation
Architecture diagram showing a sender adapter passing a message through processing steps to a receiver adapter, with runtime details available in the message processing log.
On this page
  1. Understand the iFlow structure
  2. Choose the right iFlow steps
  3. Build a basic integration flow
  4. Configure adapters and credentials
  5. Use mappings and content modifiers effectively
  6. Design routing and error handling
  7. Test a deployed iFlow
  8. Troubleshoot message failures
  9. Apply operational design practices
  10. Use a practical review checklist

An SAP CPI integration flow, commonly called an iFlow, defines how a message enters Cloud Integration, is transformed, routed, and delivered to a target system. A reliable iFlow design separates connectivity, message processing, business rules, and error handling so that each part can be tested independently.

This guide focuses on the practical structure of an iFlow and the checks that help when a deployed flow does not behave as expected.

Understand the iFlow structure

An iFlow usually contains a sender, one or more processing steps, and a receiver. The sender adapter accepts the message, the processing pipeline changes or evaluates it, and the receiver adapter sends the result to the target endpoint.

The integration flow designer shows these elements as connected steps. The visual layout helps explain the route, but runtime behavior also depends on adapter settings, credentials, endpoint availability, message headers, and externalized parameters.

A simple synchronous pattern looks like this:

Sender adapter
    |
Content Modifier or Groovy Script
    |
Message Mapping or Converter
    |
Request Reply or Router
    |
Receiver adapter

The exact sequence depends on the interface. For example, an asynchronous file interface may use a sender and receiver without a Request Reply step, while an API call may require a request-response exchange and explicit exception handling.

Build and validate an SAP CPI iFlowSummarize the operational sequence for creating, deploying, and testing an integration flow.Build and validate an SAP CPI iFlowSummarize the operational sequence for creating, deploying, and testing an integration flow.requirements readyconfiguration completeflow availablemessage processedDefinecontractDocumentpayloads,…ConfigureflowAddadapters,…DeployValidate anddeploy the…TestmessageSendcontrolled…ReviewruntimeCheck themessage…CertPas original visual explanation
Process diagram showing an iFlow moving from contract definition through configuration, deployment, testing, and runtime review.

Choose the right iFlow steps

Use each step for a clear responsibility. This makes the flow easier to test and reduces the chance that a later change will affect unrelated processing.

  • Content Modifier: Set or remove message headers, properties, and body content.
  • Message Mapping: Transform fields between structured source and target messages.
  • XML Modifier: Apply targeted XML changes when a complete mapping is unnecessary.
  • Converter: Convert between formats such as XML, JSON, CSV, and plain text.
  • Router: Direct messages to different branches according to conditions.
  • Filter: Continue processing only when a condition is satisfied.
  • Request Reply: Send a request and wait for a response from a receiver.
  • General and Local Integration Process: Group reusable or complex processing logic.
  • Exception Subprocess: Catch processing exceptions and create a controlled error path.

A Content Modifier is useful for a small number of fixed values. Use externalized parameters for environment-specific values such as endpoint paths, company codes, or feature switches. Keep mapping logic in Message Mapping or a script rather than embedding large expressions throughout the flow.

iFlow failure troubleshooting pathProvide a repeatable order for investigating failed message processing.iFlow failure troubleshooting pathProvide a repeatable order for investigating failed message processing.flow is runningstep identifieddata reviewedcause understoodCheckdeployment…Confirm thatthe deployed…Find firstfailed stepUse themessage…Inspectpayload and…Comparemessage dat…Verifyendpoint an…Check URLs,credentials,…AssessreprocessingConfirm thecause and…CertPas original visual explanation
Troubleshooting flow from checking deployment status to locating the first failed step, inspecting data, verifying connectivity and security, and assessing reprocessing.

Build a basic integration flow

Start by documenting the source payload, target payload, transport protocol, authentication method, and expected response behavior. This information determines the adapters and processing steps that the flow needs.

  1. Create an integration package and add an integration flow.
  2. Define a meaningful flow name and description.
  3. Add the sender adapter and configure its endpoint or polling behavior.
  4. Add processing steps for validation, enrichment, conversion, mapping, or routing.
  5. Add the receiver adapter and configure the target connection.
  6. Add an Exception Subprocess when the interface needs controlled error handling.
  7. Externalize values that differ between development, test, and production.
  8. Validate the flow, deploy it, and send a controlled test message.
  9. Review the message processing log and confirm the target response.

Use names that describe purpose rather than implementation. Names such as ValidateOrder, MapInvoice, and SendToWarehouse make the runtime trace easier to follow than names based only on step type.

Configure adapters and credentials

An adapter determines how the iFlow communicates with an external system. Common choices include HTTPS, SOAP, SFTP, IDoc, OData, and process-direct communication. Select the adapter based on the protocol required by the endpoint, then configure authentication and endpoint details separately from message transformation logic.

Store credentials in the security material area and reference the required credential or key alias from the adapter configuration. Confirm that the deployed artifact can access the intended security material and that the endpoint certificate chain is trusted where TLS is used.

For an IDoc-based interface, validate the sender or receiver configuration, message type, basic type, and target connection together. The practical processing sequence is covered in SAP CPI IDoc Integration Basics.

Use mappings and content modifiers effectively

Message Mapping is appropriate when source and target structures differ and the relationship between fields should remain visible to maintainers. Define required source fields, target fields, queues, and value transformations before testing optional or repeating segments.

Use a Content Modifier for small, explicit changes such as setting a property, adding a header, or supplying a constant body. For reusable code or complex conditional logic, use a Groovy Script with clear input and output expectations.

When business values differ between systems, keep the relationship in a maintained value mapping rather than duplicating conditional expressions in several flows. SAP CPI Value Mapping and Content Modifier explains how these two mechanisms fit different use cases.

Design routing and error handling

A Router evaluates conditions and sends the message through the matching branch. Make conditions mutually understandable and define a deliberate path for messages that match no business branch. A default branch can route unexpected messages to a controlled error or quarantine process.

An Exception Subprocess can capture an error, add diagnostic context, notify an operations channel, or write the failed payload to a controlled recovery location. Avoid swallowing the original exception because the runtime message log needs enough information to identify the failed step and endpoint.

Include a correlation identifier in logs or message properties when a business process crosses several systems. This identifier makes it easier to connect the source request, transformed payload, receiver response, and retry activity.

Test a deployed iFlow

Test the flow in layers. First verify that the sender accepts a minimal valid message. Next test transformations and routing with representative payloads. Finally test receiver connectivity, authentication, response handling, and failure behavior.

Use test cases for valid data, missing mandatory fields, unexpected codes, repeated segments, empty collections, invalid credentials, unavailable endpoints, and receiver errors. Keep sanitized payloads and expected outcomes with the interface documentation.

After deployment, check the flow status and send a message through the actual configured entry point. A successful deployment confirms that the artifact was deployed; it does not confirm that every external endpoint, certificate, mapping rule, or business condition is correct.

Troubleshoot message failures

Start with the message processing log and identify the first failed step. The first failure is usually more useful than later errors caused by the same message being rolled back or routed into an exception path.

Check the following in order:

  1. Confirm that the iFlow is deployed and running.
  2. Confirm that the sender endpoint, authentication, and request method match the caller.
  3. Review the failed step and its exact error text.
  4. Inspect message headers and properties relevant to routing or authentication.
  5. Compare the payload at the sender, transformation, and receiver boundaries.
  6. Verify certificates, credential aliases, endpoint URLs, and network access.
  7. Check the receiver response and any returned application error.
  8. Reprocess only after the cause and duplicate-processing risk are understood.

For recurring operational failures, record the flow name, message identifier, timestamp, failed step, endpoint, response code, and corrective action. SAP CPI Monitoring and Error Handling Basics provides a focused workflow for runtime investigation.

Apply operational design practices

Keep interfaces small enough that a maintainer can understand the main path quickly. Move repeated logic into reusable local processes where that improves consistency, but avoid abstraction that hides important business decisions.

Externalize environment-specific values, restrict sensitive logging, and remove diagnostic logging that is no longer needed. Set clear ownership for retry behavior, duplicate detection, alerting, and payload retention.

For flows that expose or consume APIs, define the contract, authentication, error response, and versioning approach before adding implementation steps. The related integration boundary is discussed in SAP CPI API Management Basics.

Use a practical review checklist

Before promoting an iFlow, verify the following:

  • The sender and receiver protocols match the interface contract.
  • Credentials and certificates are available in the target environment.
  • Required fields are validated before mapping or delivery.
  • Mapping handles optional, repeating, and empty values.
  • Router conditions have an intentional default path.
  • Exceptions preserve useful diagnostic information.
  • Environment-specific values are externalized.
  • Sensitive payload data is excluded from unnecessary logs.
  • Retry and duplicate-processing behavior is documented.
  • A representative test message completes successfully.

A disciplined review makes the runtime trace easier to interpret and reduces the chance that a configuration-only change introduces a production failure.

Back to all articles