6. How to create an inbound interface using Asynchronous mode with SkyvvaSalesforce Adapter
Overview
This tutorial sends a DEBMAS06 customer IDoc XML from Postman through SAP CPI to Salesforce. CPI Message Mapping converts the SAP customer and contact fields into the Account/Contact structure defined by the SKYVVA-generated target schema. The SkyvvaSalesforce receiver then submits that data with V3 / Asynchronous processing.
The test contains one customer and two contacts. After processing, verify one Account with both Contacts linked to it. Postman simulates the source system; this tutorial uses an HTTPS sender rather than an SAP IDoc sender adapter.
Before starting, confirm that the SkyvvaSalesforce adapter is deployed, the CPI and Salesforce credentials are available, and the integration user can read the SKYVVA configuration and create/update Accounts and Contacts. The fields Account.ERP_DEBTOR_ID__c and Contact.ERP_CONTACT_ID__c must exist as Text External ID fields. This tutorial uses these names without a package prefix.
It covers the following steps:
- Create and configure a SKYVVA Inbound Interface in Salesforce, including the field that controls how the request is processed.
- Create an integration flow in SAP CPI and map DEBMAS06 XML to the SKYVVA-generated target structure.
- Configure the HTTPS sender channel.
- Configure the SKYVVA Salesforce receiver channel with
Skyvva API Version = V3andMode = Asynchronous. - Deploy the integration flow.
- Send a test request from Postman through SAP CPI.
- Monitor the message in SAP CPI.
- Verify the resulting records in Salesforce.
In this example:
| Item | Value |
|---|---|
| Salesforce Object | Account / Contact (nested) |
| Message Source | DEBMAS06 XML sent from Postman |
| CPI transformation | Message Mapping: DEBMAS06 → SKYVVA Account/Contact |
| Middleware | SAP CPI |
| SkyvvaSalesforce adapter version | 1.3.0 |
| SKYVVA package version | 2.51.18 |
| SKYVVA API Version | V3 |
| Mode (CPI receiver) | Asynchronous |
| Processing Mode (SKYVVA interface in Salesforce) | Asynchronous |
| Processing Behavior (CPI receiver) | None |
| Inbound Processing Behavior (SKYVVA interface in Salesforce) | (leave blank — uses Batch Apex for reprocessing) |
Context Before You Start
DEBMAS06 carries SAP customer master data. In this example, each E1KNA1M customer segment becomes an Account, and each nested E1KNVKM contact segment becomes a Contact under that Account.
CPI changes the SAP field names into the Salesforce field names before the receiver sends the request. The SKYVVA interface in Salesforce uses External Mapping and the Account → Contact hierarchy configured below.
The receiver's Mode = Asynchronous selects the adapter processing path. Set Processing Behavior = None in CPI so the adapter creates the messages and requests processing. Leave Inbound Processing Behavior blank on the SKYVVA interface to use the default Batch Apex background job in Salesforce. Keep the interface's Processing Mode = Asynchronous and verify the final Account and Contacts in Salesforce.
POSTMAN
↓
SAP CPI (HTTPS Sender → Message Mapping → SkyvvaSalesforce Receiver, Mode = Asynchronous)
↓
SKYVVA Inbound Interface
↓
IMessage__c record(s) created (root + hierarchical children)
↓
SKYVVA processes the messages in Salesforce
↓
Salesforce Account / Contact
Figure 1: Postman → SAP CPI → Salesforce. CPI maps the DEBMAS06 request before sending it.
1. Set Up the SKYVVA Interface in Salesforce
1.1 Create the Interface
In Salesforce, open the SKYVVA app, then open the Integration record you want to use. Create an Inbound Interface under that Integration. If the Integration does not exist, create it first.
For this example, create the interface AccountContactAsync_IN. Leave the Message Type field blank. For a V3 Inbound interface, leaving Message Type unset is what triggers Hierarchical Mapping — there is no MetaData Provider/Repository/Message Type hierarchy to build first; the Mapping Tool derives the parent/child tree directly from Salesforce's own schema instead.
Configure the interface:
| Setting | Value |
|---|---|
| Interface Name | AccountContactAsync_IN |
| Integration | Your SKYVVA Integration record; SAP Cloud Integration in this example |
| Source/Target Name | Account |
| Status | Deployed |
| Interface Direction | Inbound |
| Processing Mode | Asynchronous |
| Operation Type | Upsert |
| Message Type | (leave blank) |
| External Mapping | Enabled |
| Bypass Message Layer | Disabled |
Figure 2: SKYVVA Inbound Interface AccountContactAsync_IN, no Message Type linked.
On the main interface's Inbound Setup, enable External Mapping and set Salesforce External ID = ERP_DEBTOR_ID__c. This field identifies the Account to create or update.
Figure 3: Main interface AccountContactAsync_IN — Inbound Setup, External Mapping enabled with Salesforce External ID ERP_DEBTOR_ID__c (Account).
1.2 Map Account → Contact in the Hierarchical Mapping Tool
In the SKYVVA app, open AccountContactAsync_IN and choose Open Mapping. Because Message Type is blank, the Mapping Tool shows the Salesforce Account structure, including its child relationships. Expand the tree to find Contact(AccountId).
With External Mapping enabled, SKYVVA maps fields by name. You still need to connect the Account and Contact nodes to create the parent-child structure:
- Drag the source Account root onto the target Account root. This makes the target Contact relationship available.
- Expand Contact(AccountId) and drag it onto the matching target node.
Map the nodes in this order. You do not need to drag individual fields. The Contact relationship mapping creates the child interface needed to process the nested Contacts.
Figure 4: Hierarchical Mapping Tool — Account → Contact(AccountId) node mapping, External Mapping handles field-level mapping.
Save the mapping, then check the generated Contact sub-interface. Enable External Mapping and set its Salesforce External ID to ERP_CONTACT_ID__c. The main Account interface uses ERP_DEBTOR_ID__c; check both settings separately.
Figure 5: Auto-generated sub-interface (Contact) — Inbound Setup, External Mapping enabled with Salesforce External ID ERP_CONTACT_ID__c (Contact).
1.3 Configure Processing Behavior
In the SKYVVA app, open AccountContactAsync_IN, select Details, and leave Inbound Processing Behavior blank, as shown in Figure 6. SKYVVA uses the default Batch Apex background job in Salesforce to process the messages after the adapter requests reprocessing.
This example uses SkyvvaSalesforce adapter 1.3.0 and SKYVVA package 2.51.18, with Bypass Message Layer disabled. Enter the actual installed package version in the CPI receiver; confirm the processing behavior separately if you use an earlier release.
| Setting | Value | Description |
|---|---|---|
| Inbound Processing Behavior — SKYVVA interface in Salesforce | Leave blank | Use the default Batch Apex job for message reprocessing. |
| Processing Behavior — CPI receiver | None | Create the messages and request processing. Configure this in section 2.3.2. |
These are separate settings. If you choose Create Message Only in the CPI receiver, the adapter creates the messages but does not request automatic processing. Keep None for this tutorial so the Account and Contacts can be created or updated.
Figure 6: SKYVVA interface Details tab in Salesforce, with Inbound Processing Behavior left blank.
Save the SKYVVA interface and its mapping before configuring the CPI flow.
2. SAP CPI Development
2.1 Create the Integration Flow
In SAP Integration Suite, open Cloud Integration → Design, then open or create your integration package and add the integration flow.
Example:
| Item | Example |
|---|---|
| Integration Package | Skyvva Salesforce Adapter Testing |
| Integration Flow | AccountContact_Skyvva_Asynchronous |
The flow uses an HTTPS Sender, CPI Message Mapping, and a SkyvvaSalesforce Receiver. The mapping converts the DEBMAS06 customer and contact segments into the structure expected by the SKYVVA interface.
Figure 7: Integration flow with Message Mapping before the SkyvvaSalesforce receiver.
Map DEBMAS06 to the SKYVVA target structure
Use the DEBMAS06 source schema for the incoming IDoc XML. In Salesforce's SKYVVA app, open AccountContactAsync_IN and generate the target schema using Generate MetaData → XSD Schema → V3/Integrate. Confirm that it includes the Account and nested Contact structure. Use this generated schema as the target in CPI Message Mapping.
Create one target Account for each source customer and one target Contact for each nested contact. Use the target element names and namespace exactly as they appear in the generated schema.
| DEBMAS06 source | SKYVVA target field | Description |
|---|---|---|
E1KNA1M/KUNNR | Account ERP_DEBTOR_ID__c | Customer matching key. Keep leading zeros. |
E1KNA1M/NAME1 | Account Name | Customer name. |
E1KNA1M/TELF1 | Account Phone | Customer phone. |
E1KNVKM/PRSNR + - + E1KNVKM/PARNR | Contact ERP_CONTACT_ID__c | Contact matching key, for example 0000600001-0001. Both values must be present; keep leading zeros. |
E1KNVKM/NAMEV | Contact FirstName | Contact first name. |
E1KNVKM/NAME1 | Contact LastName | Contact last name. |
E1KNVKM/TELF1 | Contact Phone | Contact phone. |
The table uses the field labels from this example. Match them to the corresponding fields in your generated schema. This tutorial uses field names without a SKYVVA package namespace prefix. Keep each Contact under its source customer. The Salesforce Account → Contact relationship mapping from section 1.2 links the resulting records; do not put the SAP customer number directly into Salesforce AccountId.
Before deployment, simulate the mapping with the test request in section 3. Check that it produces one Account and two Contacts, with distinct contact keys 0000600001-0001 and 0000600002-0002.
2.2 Configure the HTTPS Sender Channel
Select the standard SAP HTTPS sender adapter.
General tab: Direction Sender, Adapter Type HTTPS, Transport Protocol HTTPS, Message Protocol None — fixed values, identical in every tutorial that uses this sender.
Connection tab:
| Field | Example value |
|---|---|
| Address | /skyvva/AccountContactIntegrateAsynchronousV3 |
| Authorization | User Role |
| User Role | ESBMessaging.send |
| CSRF Protected | Unchecked |
Important: The configured User Role must already exist and be assigned to the CPI user/credential that Postman authenticates as, or the sender rejects the request with 403 Forbidden.
Figure 8: HTTPS sender channel — Connection tab.
2.3 Configure the SkyvvaSalesforce Receiver Channel
Select SkyvvaSalesforce as the receiver adapter. The receiver channel has three tabs: General, Connection, Processing.
General tab: Direction Receiver, Adapter Type SkyvvaSalesforce, Transport Protocol https, Message Protocol skyvva — fixed values, identical for every SkyvvaSalesforce receiver channel.
2.3.1 Connection Tab
| Field | Example value |
|---|---|
| Authentication Type | OAuth2 |
| OAuth2 Flow | Username-Password Credential (or Client Credential) |
| Login Url | Your Salesforce login URL. For Client Credential, use the org's My Domain base URL. |
| User Credential | Your CPI Security Material alias for the Salesforce user (shown only for the Username-Password flow) |
| Client Credential | Your application credential alias from CPI Security Material, required for either flow. |
Note: Enter credential aliases from CPI Security Material. The Client Credential alias supplies the application client ID and secret. User Credential is needed only for Username-Password Credential. For the full field reference see the receiver guide’s Connection tab section.
2.3.2 Processing Tab — Request Settings
Select Processing Type = Skyvva and Operation = Integrate, then configure the fields below:
| Field | Value |
|---|---|
| Operation | Integrate |
| Skyvva API Version | V3 |
| Integration | Your SKYVVA Integration |
| Interface | AccountContactAsync_IN |
| Mode | Asynchronous |
| Processing Behavior | None (leave at default — see note below) |
| Request Format | XML |
| Response Format | XML |
| Structure Format | Skyvva Format — CPI maps the request into the SKYVVA-generated target structure. |
| Skyvva App Version | your Salesforce package version, e.g. 2.51.18 |
| Salesforce Api Version | 59.0 (or your org's current API version) |
Set Processing Behavior = None so CPI requests processing after creating the messages. SKYVVA then uses the interface's Inbound Processing Behavior setting in Salesforce to select the background job; leaving that field blank uses Batch Apex. See section 1.3.
For V3 / Asynchronous, the adapter checks Skyvva App Version to decide how to send and process the request. Versions below 2.51.18, such as 2.51.0, use the earlier processing method. Versions 2.51.18 and later use the newer method described in this tutorial.
Enter the SKYVVA package version actually installed in Salesforce. Changing this field does not upgrade the package.
Figure 9: SkyvvaSalesforce receiver channel — Processing tab, Mode = Asynchronous.
2.3.3 Processing Tab — Adapter Settings
| Field | Value |
|---|---|
| Logging option | Default |
| Enable retry for fatal connectivity errors | Unchecked (leave disabled for this test) |
| HTTP client timeout (sec) | 60 |
Once all channel parameters are defined, save the integration flow and deploy it.
Figure 10: Integration flow deployed.
2.4 Get the SAP CPI Endpoint URL
In Cloud Integration, open Monitor → Manage Integration Content, select the deployed AccountContact_Skyvva_Asynchronous flow, and copy its endpoint URL.
Figure 11: Manage Integration Content — endpoint URL.
Copy the endpoint exactly as shown in your tenant. Do not build it manually.
3. Testing with Postman
Use the endpoint URL from section 2.4.
Create a new request with the following configuration:
| Setting | Value |
|---|---|
| Method | POST |
| URL | Your SAP CPI endpoint URL |
| Authorization | Authentication configured for the HTTPS Sender |
| Content-Type | Match the configured Request Format |
Set Content-Type: application/xml. In Postman, choose Body → raw → XML, paste the request below, then click Send.
Send this DEBMAS06 source XML. CPI Message Mapping converts it into the SKYVVA-generated target structure before the receiver submits it to AccountContactAsync_IN.
<?xml version="1.0" encoding="UTF-8"?>
<DEBMAS06>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<DOCNUM>0000000000006000</DOCNUM>
<IDOCTYP>DEBMAS06</IDOCTYP>
<MESTYP>DEBMAS</MESTYP>
</EDI_DC40>
<E1KNA1M SEGMENT="1">
<KUNNR>0000006000</KUNNR>
<NAME1>CPI DEBMAS Test Customer</NAME1>
<TELF1>+49-89-2867825</TELF1>
<E1KNVKM SEGMENT="1">
<PARNR>0001</PARNR>
<NAMEV>Max</NAMEV>
<NAME1>Mueller</NAME1>
<TELF1>+49-89-2719583</TELF1>
<PRSNR>0000600001</PRSNR>
</E1KNVKM>
<E1KNVKM SEGMENT="1">
<PARNR>0002</PARNR>
<NAMEV>Anna</NAMEV>
<NAME1>Schmidt</NAME1>
<TELF1>+49-89-2719584</TELF1>
<PRSNR>0000600002</PRSNR>
</E1KNVKM>
</E1KNA1M>
</IDOC>
</DEBMAS06>
Use Body → raw → XML for this small test. The request contains customer 0000006000 and contacts 0001 and 0002. For each contact, concatenate PRSNR, a hyphen, and PARNR. The mapping creates the contact keys 0000600001-0001 and 0000600002-0002. Do not send the previous Account-format payload into this DEBMAS06 mapping.
Send the DEBMAS06 request above and keep the response from your test. The example uses SkyvvaSalesforce adapter 1.3.0 and SKYVVA package 2.51.18.
Figure 12: DEBMAS06 Postman request and successful asynchronous submission response.
With V3 / Asynchronous, Skyvva App Version = 2.51.18 and Processing Behavior = None, the expected success response for the reviewed adapter code is:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Message>Processing Integration With IMessage Successfully</Message>
<StatusMsg>Successful</StatusMsg>
<StatusCode>OK</StatusCode>
</Response>
This confirms that the adapter submitted the messages for processing. It does not include a JobId or individual message details, and it does not confirm that the Account and Contacts have finished processing. Continue with section 4 to check the result in CPI and Salesforce.
4. Monitoring
4.1 SAP CPI
In Cloud Integration, open Monitor → Monitor Message Processing. Find the test message for AccountContact_Skyvva_Asynchronous and check that its status is Completed.
Figure 13: CPI Monitor Message Processing.
4.2 SKYVVA Message Monitoring in Salesforce
In Salesforce, open the SKYVVA app and go to Message Monitoring. Find the message for AccountContactAsync_IN to check how SKYVVA processed the request.
Wait for the Account and Contact messages in SKYVVA to show Completed. If a message fails, open its error details before resending. A Completed CPI message confirms the CPI flow finished; check the SKYVVA processing result and resulting Salesforce records separately.
Figure 14: SKYVVA Message Monitoring in Salesforce, showing the Account and Contact processing results.
After SKYVVA processing finishes, open the Account in Salesforce and check its related Contacts. Verify these results:
| Record | Expected result |
|---|---|
| Account | External ID 0000006000, name CPI DEBMAS Test Customer, phone +49-89-2867825. |
| Contact 1 | External ID 0000600001-0001, name Max Mueller, linked to that Account. |
| Contact 2 | External ID 0000600002-0002, name Anna Schmidt, linked to that Account. |
For a fresh test, expect one Account and two Contacts. If those external IDs already exist, Upsert should update those records. Record their IDs before and after the test and confirm no duplicate records were created.
Summary
The complete integration flow is:
POSTMAN
↓
HTTPS Sender
↓
CPI Message Mapping (DEBMAS06 → SKYVVA Account/Contact)
↓
SkyvvaSalesforce Receiver (Mode = Asynchronous)
↓
SKYVVA Inbound Interface
↓
IMessage__c record(s) created (root + hierarchical children)
↓
SKYVVA processes the messages in Salesforce
↓
Salesforce Account / Contact
Configuration Summary
| Setting | Configuration |
|---|---|
| Source | DEBMAS06 XML: one customer and two contacts |
| CPI Message Mapping | DEBMAS06 source schema → SKYVVA-generated target schema |
| SkyvvaSalesforce adapter version | 1.3.0 |
| SKYVVA package version | 2.51.18 |
| SKYVVA interface | AccountContactAsync_IN — Inbound, Upsert |
| Processing Mode (SKYVVA interface in Salesforce) | Asynchronous |
| Inbound Processing Behavior (SKYVVA interface in Salesforce) | Leave blank — default Batch Apex reprocessing |
| Processing Behavior (CPI receiver) | None — create messages and request processing |
| SKYVVA API Version | V3 |
| Mode (CPI receiver) | Asynchronous |
| Request/Response Format | XML |
| Structure Format | Skyvva Format — matches the SKYVVA-generated target structure |
CPI maps the DEBMAS06 customer and contact data into the SKYVVA target structure. The receiver submits it using V3 / Asynchronous. Verify the Account and both linked Contacts in Salesforce before accepting the test.