Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 


In below blog, I would like to share how we can integrate SalesForce Sales Cloud with third party (HTTPS) using SAP CPI & SAP Cloud Platform Open Connectors service.

Scenario: Third Party will make a call to CPI using HTTPS and CPI will get the Accounts data from Salesforce using Open Connectors.

Configuration in SalesForce:

Step 1:  Go to Setup --> PLATFORM TOOLS --> Apps  -- > App Manager --> New Connected App

Step 2: Provide the Basic Information

Provide below details:

Enable OAuth Settings

Callback URL:

Full Access (full)
Perform requests on your behalf at any time (refresh_token, offline_access)

Click Save and then open the App again to get the Consumer key and Secret.

SAP Open Connector Configuration

Login to SAP Cloud Platform and launch Open Connectors service.Search for Salesforce Sales Cloud and click on authenticate

Fill all the required details like below ( API Key,Secret and Endpoint Address) and click on Create Instance.

Now you are successfully connected to SalesForce with below message and click on API Docs.

Go to API Docs and click on Try it out and execute it.

Navigate to response to copy the credentials and endpoint url to be used in SAP CPI.

SAP CPI Configuration:

Lets create an iflow to make a call from third party (HTTPS) and connect to OpenConnectors endpoint url, get the accounts and send it back to third Party.

Step 1: Configure the Sender HTTPS communication channel.

Step 2: Add a script to get the Secure Parameters and set it in message property.
import java.util.HashMap;

def Message processData(Message message) {
def body = message.getBody();
String password;
String _output="";
def service = ITApiFactory.getApi(SecureStoreService.class, null);
def credential = service.getUserCredential("SalesForce");
if (credential == null)
{ throw new IllegalStateException("No credential found for alias 'SalesForce'");

password= new String(credential.getPassword());
message.setProperty("P_Password", password);
return message;


Step 3: Set the Headers in Content Modifier

Step 4: Configure the HTTP communication Channel in Request/Reply.


Step 5: Deploy the Secure Parameters in the Security Material under User Credentials.

Now you can deploy the Iflow.

Testing and Result:

Take the HTTPS Endpoint from the CPI and use the postman client tool to make a Get request.


Vikas Agarwal