1. Home
  2. Dokumente
  3. SAP CPI Adapter
  4. 4. How to create an inbound synchronous interface using integrate Apex URL with SKYVVA CPI Salesforce Adapter

4. How to create an inbound synchronous interface using integrate Apex URL with SKYVVA CPI Salesforce Adapter

This document describes how to create an inbound synchronous interface using Integrate – Apex URL with SKYVVA CPI Salesforce adapter. And also, document briefs the implementation of SAP CPI and Salesforce interfaces which includes the testing as well.

In this case considering Account as an object API at Salesforce end and message will be triggered from POSTMAN client tool to Salesforce using SAP CPI as middleware.

Salesforce Interface Development

This is an inbound synchronous interface where request and response interface should create in Salesforce.

Create interfaces under Integration in Salesforce, in this example creating request interface name as “Account_CPI_Integrate_Sync” and response interface name as “Account_CPI_Integrate_Sync_Response”.

 

Request Interface (Account_CPI_Integrate_Sync):

Below are the necessary parameters need to provide while creating the interface.

Where above marked “Response Interface” will be explained in the response interface section.

Response Interface (Account_CPI_Integrate_Sync_Response):

Below are the necessary parameters need to provide while creating the response interface.

For the response interface need to define the mapping to send the required data as the response.

In this use case, all the fields got mapped as to generate the response. Used the auto mapping functionality to map all the fields and save.

SAP CPI Development

Create the package in SAP CPI in Design and add the integration flow.

Example:

Integration Package:      Apsara Salesforce Adapter Testing

Integration Flow:            Apsara Account Interface to Salesforce_Sync_Demo32

SAP CPI receives the request message from POSTMAN/SOAPUI in json format. Since this use case is defining the capabilities of the SKYVVA SAP CPI Salesforce adapter, simple integration flow is defined with required channel parameters.

Please find below integration flow:

 

On sender side, choose the sender adapter “HTTPS” and provide the channel parameters details as below including with the CPI endpoint URL.

 

On receiver side, choose the receiver adapter “Salesforce” Skyvva adapter and provide the channel parameters as below.

Where the Login Url,  User Credential details (deployed in CPI keystore), Client Id and Client Secret shared from the Salesforce system.

For Skyvva section below are parameters need to define for integrate.

Need to select the Apex Url as “IntegrateSynchronous” in the channel.

Bulk API section is not needed since this interface is not using the bulk mode in this use case.

Once all the above channel parameters are defined save the integration flow and deploy.

Go to CPI > Monitoring > Manage Integration Content to get the endpoint URL of CPI integration flow.

CPI Endpoint URL:

https://{{TenantId}}-iflmap.hcisbp.eu1.hana.ondemand.com/http/skyvva/Account/CPI/ReceiverChannel/IntegrateSync/32Demo

 

Testing:

In this scenario, using POSTMAN as the client to push the data to SAP CPI endpoint URL, then message will send to Salesforce through SAP CPI using SKYVVA CPI Salesforce adapter.

Note: Salesforce accepts the data in below Json format. Since this example is using simple integration (without any transformation logics), below data format is sending from POSTMAN directly.

Payload:

Where integrationid is name of the Integration in Salesforce & interfacename is interface name in Salesforce.

Use the above payload and CPI endpoint URL to trigger the data from the POSTMAN.

Below is the response from the Salesforce in JSON format.

 

Monitor the message in SAP CPI:

Go to CPI > Monitor > Monitor Message Processing.

 

Salesforce Monitoring:

Go to  Salesforce > Message Monitoring

Account related data posted and response received successfully.

Fandest du diesen Artikel hilfreich? Ja Nein

Wie können wir helfen?