4. How to create an inbound synchronous interface using integrateSynchronous() with SkyvvaSalesforce Adapter?
This document explains how to create a SKYVVA Inbound Synchronous Interface in Salesforce using the IntegrateSynchronous API with the SkyvvaSalesforce Adapter.
It covers the following steps:
- Create and configure the SKYVVA request interface.
- Create and configure the SKYVVA response interface.
- Map the response fields.
- Link the request and response interfaces.
- Create an integration flow in SAP CPI.
- Configure the HTTPS sender channel.
- Configure the SKYVVA Salesforce receiver channel.
- Deploy the integration flow.
- Test the synchronous flow using Postman.
- Monitor the message in SAP CPI and Salesforce.
In this example:
| Item | Value |
|---|---|
| Salesforce Object | Account |
| Message Source | Postman |
| Middleware | SAP CPI |
| SKYVVA API Version | V2 |
| SKYVVA API | IntegrateSynchronous |
| Processing Mode | Synchronous |
| Operation Type | Upsert |
Context Before You Start
In short: this pairs a SKYVVA request Interface with a linked response Interface so the legacy IntegrateSynchronous REST API (Skyvva API Version = V2) can return Salesforce's own result — mapped Account fields, not just a bare success flag — to the caller within the same HTTP call, instead of processing the record asynchronously and leaving the caller with nothing to inspect.
Reasons to pick this path:
- The caller (Postman here, but any HTTP client in practice) needs the outcome of the upsert immediately — record status, mapped field values — to act on right away, not by polling or waiting on a separate monitoring step.
- It matches an existing/legacy
IntegrateSynchronouscaller you're routing through CPI instead of hitting Salesforce directly, the same rationale as the plainIntegratepattern in How to Create a SKYVVA Inbound Interface Using the Integrate() with the SkyvvaSalesforce Adapter?but for the synchronous case.
Good fit for:
- A single predictable object (here,
Account) where a fixed set of fields needs to come back in the response — the response Interface's own mapping decides exactly what's returned. - Scenarios where blocking the caller for the duration of the Salesforce call is acceptable — this is a synchronous HTTP round trip end to end, not a fire-and-forget push.
End-to-end sequence: the steps below — build the request/response Interface pair and link them in Salesforce, build the CPI iFlow (HTTPS sender → SkyvvaSalesforce receiver), deploy, then send and verify a synchronous test request from Postman.
How the Synchronous Flow Works
A synchronous interface processes the request and returns the response within the same HTTP call.
The end-to-end flow is:
Postman
│
│ Request
▼
SAP CPI
│
│ SKYVVA Salesforce Adapter
▼
SKYVVA Request Interface
│
│ Process Account
▼
SKYVVA Response Interface
│
│ Response
▼
SAP CPI
│
▼
Postman
Figure 1. End-to-end synchronous message flow. SAP CPI forwards the request to Salesforce and returns Salesforce's response to the source system within the same call.
Because IntegrateSynchronous is used, the Salesforce response is returned to Postman within the same request.
1. Configure the SKYVVA Request Interface
Create a SKYVVA Inbound Interface under Integration in Salesforce.
For this example, create:Account_CPI_Integrate_Sync
Configure the interface as follows:
| Setting | Value |
|---|---|
| Interface Name | Account_CPI_Integrate_Sync |
| Interface Direction | Inbound |
| Processing Mode | Synchronous |
| Operation Type | Upsert |
Figure 2. SKYVVA request interface AccountCPIIntegrateSync configured with Inbound direction, Synchronous processing, and the Upsert operation.
1.1 Configure the Inbound Setup
In the request interface's Inbound Setup section:
| Setting | Value |
|---|---|
| External Mapping | Enabled |
| Salesforce External ID | ERP_DEBTOR_ID__c |
External Mapping allows incoming JSON field names to map directly to matching Salesforce field names without a separate mapping definition.
Important: External Mapping is required for this integration. If it is not enabled and no mapping is defined, the integration may fail with: No Mapping Defined for Interface
The ERP_DEBTOR_ID__c field is used to match the incoming Account record during the upsert operation.
Figure 3. Request interface Inbound Setup section with External Mapping enabled and Salesforce External ID set to ERP_DEBTOR_ID__c.
2. Create the SKYVVA Response Interface
Create a second SKYVVA interface using the same Salesforce object: Account
Name the response interface:Account_CPI_Integrate_Sync_Response
Configure it as follows:
| Setting | Value |
|---|---|
| Interface Name | Account_CPI_Integrate_Sync_Response |
| Interface Direction | Outbound |
| Processing Mode | Synchronous |
| Operation Type | Upsert |
Figure 4. SKYVVA response interface AccountCPIIntegrateSyncResponse configured with Outbound direction and Synchronous processing.
3. Configure the Response Mapping
Open the response interface's Data Mapping tool and map the Account fields that should be returned in the response.
You can either:
- Drag each Source field to its matching Target field, or
- Use Auto Mapping to map fields with matching names automatically.
After completing the mapping, save the configuration.
Note: Saving the mapping automatically generates the response interface's underlying query (the SOQL used to fetch the record for the response) from the mapped fields — there is no separate query to write by hand.
Figure 5. Data Mapping tool showing Salesforce Account fields mapped to the corresponding fields on AccountCPIIntegrateSyncResponse.
4. Link the Request and Response Interfaces
Open the request interface:Account_CPI_Integrate_Sync
In the Inbound/Outbound Setup section, set the Response Interface to:Account_CPI_Integrate_Sync_Response
Figure 6. Request interface Inbound/Outbound Setup section with the Response Interface linked to AccountCPIIntegrateSyncResponse.
5. Create the SAP CPI Integration Flow
In SAP CPI, create an integration package under Design, and then create an integration flow.
Example:
| Item | Example |
|---|---|
| Integration Package | Skyvva Salesforce Adapter Testing |
| Integration Flow | Account Interface to Salesforce_integrateSync |
The integration flow receives the JSON request from Postman and forwards it to Salesforce through the SKYVVA Salesforce Adapter.
For this example, the flow contains:
- HTTPS Sender Adapter
- SKYVVA Salesforce Receiver Adapter
No Content Modifier or transformation step is required because the request is sent directly to Salesforce.
Figure 7. Integration flow showing HTTPS Sender → Start → End → SKYVVA Salesforce Receiver.
6. Configure the HTTPS Sender Channel
Select the standard SAP HTTPS sender adapter.
General
Configure the required settings in the General tab.
Figure 8. HTTPS sender channel — General tab. (screenshot to be added)
Connection
Configure the connection settings as follows:
| Parameter | Value / Description |
|---|---|
| Address | /skyvva/Account/CPI/ReceiverChannel/integrateSync |
| Authorization | User Role |
| User Role | ESBMessaging.send |
The Address becomes part of the SAP CPI endpoint URL.
The configured user role must exist and be assigned to the CPI user authenticated by Postman.
Important: If the authenticated CPI user does not have the required role, the HTTPS sender may reject the request with a 403 Forbidden response.
Figure 9. HTTPS sender channel — Connection tab. The Address field becomes part of the CPI endpoint URL.
7. Configure the SKYVVA Salesforce Receiver Channel
Select:SkyvvaSalesforce as the receiver adapter.
Figure 10: SkyvvaSalesforce receiver channel — General tab.
7.1 Configure the Connection
Configure the OAuth2 connection according to the Salesforce Connected App or External Client App configuration.
| Parameter | Value / Description |
|---|---|
| Authentication Type | OAuth2 |
| OAuth2 Flow | Client Credential in this example |
| Login URL | Your Salesforce login URL |
| Client Credential | OAuth2 Client Credential deployed in the CPI keystore |
Example login URL:https://yourdomain.my.salesforce.com
Figure 11: SkyvvaSalesforce receiver channel — Connection tab (OAuth2, Client Credential flow).
8. Configure the SKYVVA API
Open the Skyvva tab and configure:
| Parameter | Value | Description |
|---|---|---|
| Skyvva API Version | V2 | Specifies the SKYVVA API version. |
| Skyvva API | IntegrateSynchronous | Processes the request synchronously and returns the Salesforce response within the same call. |
| Apex Method | POST | Specifies the HTTP method used to call the Apex URL. |
Figure 12: SkyvvaSalesforce receiver channel — Skyvva tab, Skyvva API set to IntegrateSynchronous.
After completing the channel configuration, save and deploy the integration flow.
Figure 13: Integration flow deployed — Account Interface to SalesforceintegrateSync, Runtime Status Started.
9. Get the SAP CPI Endpoint URL
After deploying the integration flow, navigate to: → Monitoring→ Manage Integration Content
Locate the deployed integration flow and copy its endpoint URL.
Figure 14. Manage Integration Content showing the endpoint URL of the deployed integration flow.
The endpoint includes the address configured in the HTTPS sender channel:
/skyvva/Account/CPI/ReceiverChannel/integrateSync
Important: Always copy the exact endpoint URL displayed by your SAP CPI tenant instead of constructing the URL manually.
10. Test the Synchronous Integration with Postman
In this scenario, Postman sends the request to the SAP CPI endpoint. SAP CPI forwards the request to Salesforce through the SKYVVA Salesforce Adapter.
Salesforce processes the request and returns the mapped response through the response interface. SAP CPI then returns that response to Postman within the same HTTP call.
Because this example does not use transformation logic in SAP CPI, the JSON payload is sent directly from Postman.
10.1 Request Payload
Use the following JSON payload:
{
"integrationid": "a0Wg5000000UJq1EAG",
"interfacename": "Account_CPI_Integrate_Sync",
"messages": [
{
"Name": "CPI Test Account",
"BillingStreet": "CPI Test Street",
"BillingCity": "Ismaning",
"BillingPostalCode": "82140",
"BillingCountry": "DE",
"ERP_DEBTOR_ID__c": "0000301557"
}
]
}
The payload parameters are:
| Parameter | Description |
|---|---|
integrationid | The ID or Name of the SKYVVA Integration in Salesforce. |
interfacename | The name of the SKYVVA request interface. |
messages | An array containing the Account records to process. |
The interfacename value must match: Account_CPI_Integrate_Sync
10.2 Send the Request
Configure the Postman request as follows:
| Setting | Value |
|---|---|
| Method | POST |
| URL | Your deployed SAP CPI endpoint URL |
| Authorization | According to the HTTPS sender configuration |
| Content-Type | application/json |
| Body | Raw JSON |
Click Send.
Because the integration is synchronous, the response is returned immediately within the same request.
Figure 15. Postman request and response showing 200 OK. The response body contains GlobalStatus, Result with the mapped Account fields, and RecordStatus.
11. Monitor the Message in SAP CPI
Navigate to: Monitor→ Monitor Message Processing
Verify that the message was completed successfully.
Figure 16: CPI Monitor Message Processing — message completed successfully.
12. Monitor the Message in Salesforce
In Salesforce, navigate to: SKYVVA Integration Suite → Message Monitoring
Locate the message for:Account_CPI_Integrate_Sync
Verify that the message was completed successfully.
Figure 17. Salesforce Message Monitoring showing a completed message for AccountCPIIntegrateSync.
The Account data should now be posted successfully, and the mapped response should have been returned to Postman.
Summary
The complete synchronous integration flow is:
Postman
↓
HTTPS Sender
↓
SAP CPI Integration Flow
↓
SKYVVA Salesforce Adapter
↓
SKYVVA Inbound Request Interface
↓
Salesforce Account
↓
SKYVVA Response Interface
↓
SAP CPI
↓
Postman Response
The key configuration is:
| Component | Configuration |
|---|---|
| Request Interface | Inbound |
| Request Processing Mode | Synchronous |
| Request Operation Type | Upsert |
| External Mapping | Enabled |
| Salesforce External ID | ERP_DEBTOR_ID__c |
| Response Interface | Outbound |
| Response Processing Mode | Synchronous |
| SKYVVA API Version | V2 |
| SKYVVA API | IntegrateSynchronous |
| Apex Method | POST |