Build Your First SAP CPI Integration Flow: Sender and Receiver Explained (Using Postman)

Build and test your first integration flow step by step. Learn what sender and receiver really mean, how a deployed flow gets its URL and how to call it from Postman.

What You Will Build

In this article you build and test two small integration flows, step by step, with Postman acting as the outside system:

  1. Part A – a flow with only a sender. Postman sends a text message, CPI adds a timestamp and sends the result back.
  2. Part B – a flow with a sender and a receiver. CPI passes the message on to a public test service (Postman Echo), waits for its answer and returns that answer to Postman.
Integration flow with Postman as sender, a Content Modifier, Request Reply and Postman Echo as receiverPostmansenderHTTPSsender adapterIntegration flow in CPIContentModifierRequestReplyHTTPreceiver adapterPostman Echotest service (receiver)Part A: sender onlyPart B: adds Request Reply and a receiver
Figure 1: The flow you build in this article.

You need no coding. The goal is to understand what a sender and a receiver really are, how a deployed flow gets its URL and how a calling system proves who it is.

Sender and Receiver Explained

The words are always from the point of view of CPI:

SenderReceiver
Who is it?The system that sends a message to CPI.The system that CPI sends a message to, or calls.
AdapterSender adapter. It opens an endpoint on CPI, or polls a source.Receiver adapter. It makes an outgoing call from CPI.
In this articlePostman, using the HTTPS sender adapter.Postman Echo, using the HTTP receiver adapter.
Who authenticates?The sender proves its identity to CPI (role, OAuth, certificate).CPI proves its identity to the receiver (credentials, certificates).

One system can be both. For example, a payroll system could send employee data to CPI (as sender) and also receive a confirmation from CPI (as receiver).

Prerequisites

  • SAP Integration Suite with the Cloud Integration capability activated. A free trial works.
  • Permission to create integration content and to deploy it. Your BTP administrator assigns role collections for this.
  • A subaccount where you can create a service instance (Cloud Foundry environment with a space).
  • The Postman application, or Postman on the web.

Step 1: Create the Credentials for Postman

An integration flow with an HTTPS sender is protected. Postman must prove it is allowed to call it. In the Cloud Foundry environment you do this with a service instance of Process Integration Runtime, which works like an OAuth client.

  1. In the BTP cockpit, open your subaccount and choose Instances and Subscriptions.
  2. Choose Create and enter: Service Process Integration Runtime, Plan integration-flow, Runtime Environment Cloud Foundry, your Space, and any instance name, for example postman-test.
  3. On the Parameters screen, keep the defaults. They contain the role ESBMessaging.send and the grant type Client Credentials.
  4. Choose Create. Then open the instance, choose Create under Service Keys, enter a name and keep the default key type (client ID and secret).
  5. Open the new service key with View and copy these values: clientid, clientsecret, tokenurl and url.
Treat the client secret like a password

Never put it in an article, a screenshot, a chat or a public repository. In Postman, store it as a variable in an environment instead of typing it into many requests.

The role ESBMessaging.send is a predefined SAP role. It allows a sender to send messages to integration flows on the tenant.

Step 2: Build the Flow (Part A)

  1. In Cloud Integration, open Design → Integrations and APIs. Create an integration package (for example SAPwithSAI Practice) or open an existing one.
  2. On the Artifacts tab choose Add → Integration Flow, create a new flow, enter a name such as First_iFlow_Postman and open it.
  3. Choose Edit. A new flow contains a Sender, a Receiver and a start-to-end process. For Part A, delete the Receiver shape.
  4. Select the Sender shape, drag its arrow to the Start event of the process, and choose the adapter type HTTPS.
  5. On the Connection tab of the HTTPS adapter set Address to /hello. Keep Authorization on User Role with role ESBMessaging.send, and untick CSRF Protected for this practice flow (see the note below).
  6. In the palette choose Message Transformers → Content Modifier and drop it on the line between Start and End.
  7. In the Content Modifier, open the Message Body tab and enter:
You sent: ${in.body}
Current time (UTC): ${date:now:yyyy-MM-dd HH:mm:ss}

${in.body} and ${date:now:...} are Camel Simple expressions. Apache Camel is the open source framework behind Cloud Integration, so the same expressions work in many steps.

What is "CSRF Protected"?

CSRF protection defends against forged requests that come from a browser session. When it is on, calls that change data (such as POST) must first fetch a token, otherwise CPI can answer with a 403 error. For a simple test from Postman we switch it off. For real integrations, decide based on how the sender calls CPI and follow your security team's guidance.

  1. Choose Save, then Deploy, and confirm.

Step 3: Find the Endpoint URL

  1. Open Monitor → Integrations and APIs and choose the tile under Manage Integration Content.
  2. Select your flow. Check that its status is Started. If it shows an error, go back to Design and make sure the flow saves without errors.
  3. Open the Endpoints tab and copy the endpoint address.

The address has this shape. Your host name will differ, so always copy it from the Endpoints tab:

https://<your-runtime-host>/http/hello

The part after /http/ is exactly the Address you entered in the sender adapter.

Step 4: Call the Flow from Postman

  1. In Postman create a new request. Set the method to POST and paste the endpoint address.
  2. Open the Authorization tab and choose OAuth 2.0.
  3. Set Add auth data to to Request Headers and Grant Type to Client Credentials.
  4. For Access Token URL paste the tokenurl from the service key (it ends with /oauth/token). Enter the clientid and clientsecret.
  5. Set Client Authentication to Send as Basic Auth header. If the token request fails, try Send client credentials in body.
  6. Choose Get New Access Token, then Use Token.
  7. Open the Body tab, choose raw → Text and type Hello CPI.
  8. Choose Send.

What happens behind the scenes: the first call goes to the token server, which checks your client ID and secret and returns an access token. The second call goes to your flow with that token in the header. CPI checks the token and the role, then runs the flow.

The response should look like this (your time will differ):

You sent: Hello CPI
Current time (UTC): 2026-11-14 10:15:30
Alternative: basic authentication

SAP's training material also describes calling the endpoint with basic authentication, using the clientid as user name and the clientsecret as password. If that gives a 401 error on your tenant, use the OAuth method above, which is the documented route.

Congratulations: you have built a flow with a sender only. Postman was the sender, and the answer simply travelled back on the same connection.

Step 5: Add a Receiver (Part B)

Now CPI will call another system. We use Postman Echo, a public test service that returns whatever it receives.

  1. Open the flow and choose Edit.
  2. In the palette choose Call → External Call → Request Reply and place it on the line between the Content Modifier and the End event.
  3. From Participants add a Receiver and place it below or to the right of the process.
  4. Draw a line from the Request Reply step to the new Receiver and choose the adapter type HTTP.
  5. On the Connection tab of the HTTP adapter set Address to https://postman-echo.com/post, Method to POST and Authentication to None.
  6. Save and Deploy again. A changed flow only runs after redeployment.
  7. Send the same request from Postman.

This time Postman receives a JSON answer from Postman Echo. Look for the text You sent: Hello CPI in the answer, normally in a field such as data. That proves the whole round trip:

Postman → CPI (HTTPS sender) → Content Modifier → Request Reply → Postman Echo (HTTP receiver) → back through CPI → Postman.

StepBehaviourWhen to use
Request ReplyCalls the receiver and waits. The receiver's answer becomes the new message body.You need the response, for example data from an API.
SendSends the message and continues without waiting for an answer.One-way delivery where no answer is needed.
Never send real data to a public test service

Postman Echo is for learning only. Use made-up text. Never send employee, customer or any confidential data to a public service.

Step 6: Check the Message Processing Log

  1. Open Monitor → Integrations and APIs → Monitor Message Processing.
  2. Find your flow by name. The list shows the status, the processing time and the message ID.
  3. Select the message and open the Logs section. Use Open Text View for a plain text version of the log.

For more detail, go to Manage Integration Content, select your flow and raise the log level to Debug or Trace for a short test. In the graphical view of the log you can then follow the message step by step. Set the level back afterwards.

Common Errors and What They Usually Mean

You seeUsual causeWhat to check
401 UnauthorizedWrong or expired credentials.Client ID, secret, token URL, and that the token is added to the request header.
403 ForbiddenThe caller is missing the role, or the CSRF check failed.The service instance has role ESBMessaging.send; the sender adapter uses the same role; CSRF Protected is off for POST tests.
404 Not FoundFlow not deployed, or wrong URL.Status is Started; the path matches /http/<address> exactly, including upper and lower case.
500 Internal Server ErrorThe flow failed while processing.Open the message in Monitor Message Processing and read the error in the log.
SSL or handshake error to the receiverCPI does not trust the receiver's certificate.Certificates in the Keystore; try the connectivity test if available.
Old behaviour after a changeThe new version was not deployed.Save and deploy again, then check the deployment status.

Interview Questions

1. What is the difference between a sender and a receiver in CPI?

The sender sends a message to CPI through a sender adapter. The receiver is the system that CPI sends a message to or calls through a receiver adapter. The terms always describe the direction as seen from CPI.

2. What is the role ESBMessaging.send?

It is the predefined role that allows a calling system to send messages to integration flows on the tenant. It is assigned to the service instance or user that calls the flow.

3. What is the difference between the HTTPS and the HTTP adapter?

The HTTPS adapter is a sender adapter. It creates an endpoint that other systems call. The HTTP adapter is a receiver adapter. CPI uses it to call another HTTP service.

4. What is the difference between Request Reply and Send?

Request Reply is synchronous: it waits for the answer and uses it as the new message. Send does not wait for any answer.

5. Why must you redeploy after changing a flow?

Saving only stores the design. The running version on the tenant changes only when you deploy again.

Frequently Asked Questions

Do I always need Postman?

No. Postman is a convenient way to act as a sender while learning. In real projects the sender is a real system, such as an application or a scheduler.

Where does the endpoint URL come from?

After deployment, CPI generates it from the runtime host and the address of the sender adapter. You find it on the Endpoints tab under Manage Integration Content.

Can a flow have more than one receiver?

Yes. You can add several receivers and use routing steps such as Router or Multicast to decide which one gets the message.

Conclusion

You created credentials, built a flow with an HTTPS sender, added a receiver with Request Reply and tested everything from Postman. You also know where to look when something goes wrong. In the next article you protect a message with encryption and decryption inside CPI.

SAPwithSAI

Practical SAP SuccessFactors Employee Central and SAP CPI learning for consultants.