Overview – As part of my recent Migration project from MuleSoft to SAP, I was able to explore the salesforce adapter. Sharing across the adapter configuration – which can be helpful for other project’s use cases.
Pre-reading –
Overview | Salesforce Adapter for SAP Integration Suite | SAP Business Accelerator Hub
sObject Types | Apex Developer Guide | Salesforce Developers
SOQL SELECT Syntax | SOQL and SOSL Reference | Salesforce Developers
Pre-requisites –
- OAuth Client Credentials are deployed in tenant
- Connectivity is working with salesforce
Basic PoC Flow –
Please find configuration of the adapter for different CRUD operation :
Operation 1 : SOQL Execute query
Fetches the data based on the query passed, one can select the payload as xml or json based on the interface requirement.
Operation 2 : CREATE – Custom Salesforce Object is being used.
Operation 3 : DELETE with External ID
Operation 4 : UPDATE – Custom Salesforce Object is being used. Upsert payload is set in content modifier in step ahead of SF adapter.
Operation 5 : UPSERT with External ID – Custom Salesforce Object is being used. Upsert payload is being sent in the field External ID Value. External ID Name consists of the mandatory key.
For custom object SD_Job_Activity__c as seen below Id is the key in the Salesforce
The upsert payload needs to be in single object format. Sample Reference upsert payload shared below –
{
“SD_DCFR_Sync_Action__c”:”None”,
“SD_DCFR_Sync_Status__c”:”Synced”,
“SD_DCFR_GUID__c”:”2f13ffdc-4101-434b-b94d-300a7c70e4c5″,
“Id”:”aEzDw00000006zSKAQ”,
“SD_DCFR_Sync_Message__c”:”Activity created successfully in DCFR | | Crew Details missing in the payload”
}
Alternatively, One can use salesforce objects – composite – for multiple records update scenario. Kindly refer to blog by SAP Champion @PriyankaChak – SAP Cloud Integration with Salesforce – Part 2 – SAP Community
Read More Technology Blog Posts by Members articles
#abap