This document describes how to create an inbound interface using Salesforce BULK mode with SKYVVA Salesforce CPI 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 middle-ware.
Here, in this case we are going to send the account data from POSTMAN to CPI, where SAP CPI adapter will send this data in both XML and JSON format. Also Salesforce Bulk supports only FLAT structure
- SkyvvaSalesforce adapter should be deployed in CPI tenant.
- Skyvva Package should be installed on Salesforce
- SAP CPI user with the required authorizations for message processing
2. Salesforce Interface Development
2.1 Create Integration in Salesforce
Logon to the Salesforce, and navigate to the Integration.
Click on New to create the new integration.
Provide the integration name and save it.
Once Integration is created navigate to the interfaces and click on “New Interface” to create the new interface.
Note: Here we need to update the below details in interface.
- MetaData Provider (To generate the Standard structure)
- Repository (To generate the Standard structure)
- Source/Target Message Type (To generate the Standard structure)
MetaData provider, Repository and Source/target message type are used in Skyvva standard template.
This is the standard template which needs to be used in Skyvva inbound interface for CPI integration.
Hierarchy level: MetaData contains Repository, repository contains Source/Target Message type
To create the metadata provider, navigate to the MetaData Providers and create “New” and provide the metadata provider name.
Note: Metadata provider name can be anything based on the project naming convention
Once metadata provider created then go down and create “Repository” as shown in below screenshot.
Under the Repository, there is option to create the Message type. Click on new and create message type.
For Inbound we can use normal message type as shown.
Create root message type as shown below
Click on new to create another child message type Account under Accounts
Click on new to create another child message type Contact under Account
Here is the created message type
New V3 works only with Skyvva message type.
Use the above created Metadata provider, Repository and Message type details while creating the Inbound interface.
Specify the Interface name, Description, Source/Target Name, Metadata Provider, Repository, Message type, Status, Direction and Operation Type as shown below
|Connect with Middleware||<check the box>|
Now save the interface.
When we use message type in the skyvva interface we have to do mapping in skyvva.
After providing the above parameters and mapping in the interface, save it.
SAP CPI Development
Create the package in SAP CPI in Design and add the integration flow.
Integration Package: Skyvva_V4_Integration
Integration Flow: Account_Contact_SkyvvaBulk_Test_V4
SAP CPI receives the request message from POSTMAN/SOAPUI in XML 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 “SkyvvaSalesforce” 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.
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.
Please find below screen shot for reference.
CPI Endpoint URL:
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 interface accepts the data in the below XML format. Since this example is using simple integration (without any transformation logic’s in CPI), below data format is sending from POSTMAN directly.
Use the above payload and CPI endpoint URL to trigger the data from the POSTMAN.
For Asynchronous mode we can see the response status as “New”
Monitor the message in SAP CPI:
Go to CPI > Monitor > Monitor Message Processing
Go to Salesforce > Message Monitoring
Account and contact related data posted successfully into the Salesforce system.