Salesforce API wiith SAP CPI
Salesforce API wiith SAP CPI
Integration with
Salesforce
Configuration Guide
For SAP Cloud Platform Integration
Contents
1 Introduction .............................................................................................................. 2
1.1 Coding Samples .............................................................................................................. 2
1.2 Internet Hyperlinks ......................................................................................................... 2
2 Business Scenario ...................................................................................................... 2
3 Preparing the Systems for Integration ........................................................................ 3
3.1 Prerequisites .................................................................................................................. 3
3.2 Adapter Installation ........................................................................................................ 3
3.3 Plug-in Installation.......................................................................................................... 3
4 Configuration ............................................................................................................ 3
4.1 Configuration in SAP S/4HANA Cloud .............................................................................. 4
4.1.1 Create a Technical Communication User .........................................................................................4
4.1.2 Create a Communication System .....................................................................................................4
4.1.3 Create a Communication Arrangement ...........................................................................................5
4.2 Configuration in Salesforce.com ...................................................................................... 5
4.2.1 Configuration of Security Token and OAuth Credentials .................................................................6
4.2.2 Activate Entitlement Management in Salesforce ............................................................................8
4.2.3 Activate Quotes in Salesforce ..........................................................................................................8
4.2.4 Activate Multiple Currencies ............................................................................................................8
4.2.5 Adding SAP S/4HANA Cloud References ..........................................................................................9
4.2.6 Adding a Released Custom Field ................................................................................................... 10
4.2.7 Configuration for Order Process Flow........................................................................................... 10
4.3 Configuration in SAP Cloud Platform Integration ........................................................... 11
4.3.1 Replicate Account from SAP S/4HANA Cloud to Salesforce ......................................................... 11
4.3.2 Replicate Product from SAP S/4HANA Cloud to Salesforce .......................................................... 17
4.3.3 Replicate Sales Order from Salesforce to SAP S/4HANA Cloud .................................................... 23
4.3.4 Replicate Sales Contract from Salesforce to SAP S/4HANA Cloud................................................ 29
4.3.5 Receive Product Availability from SAP S/4HANA on Cloud .......................................................... 35
4.3.6 Replicate Sales Prices from S/4HANA on Cloud to Salesforce ...................................................... 39
4.3.7 Update Account from Salesforce to SAP S/4HANA Cloud ............................................................ 45
4.1.18 Replicate Sales Order from S/4HANA Cloud to Salesforce ........................................................... 50
4.3.8 Receive Sales Order History from SAP S4HAHA Cloud ................................................................. 58
5 Appendix ..................................................................................................................62
5.1 Generating Schema from Eclipse plug-in and replacing standard schema used in the
Integration Flow ..................................................................................................................... 62
5.2 Deploying Salesforce User Credentials, Token, and OAuth in SAP CPI ............................. 62
5.2.1 Deploying User Credentials ........................................................................................................... 62
5.2.2 Deploying Token............................................................................................................................ 62
5.2.3 Deploying OAuth ........................................................................................................................... 63
1
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
1 Introduction
This is the official guide for the configuration of SAP S/4HANA Cloud Integration with
Salesforce for SAP Cloud Platform Integration (SAP CPI). This guide covers relevant
information for integration developers to configure and deploy the Integration content.
Any software coding and/or code lines/strings ("Code") included in this documentation are
only examples and are not intended to be used in a productive system environment. The
Code is only intended to better explain and visualize the syntax and phrasing rules of
certain coding. We do not warrant the correctness and completeness of the Code given
herein.
The documentation may contain hyperlinks to the Internet. These hyperlinks are intended
to serve as a hint about where to find related information. We do not warrant the
availability and the correctness of this related information or the ability of this information
to serve a particular purpose.
2 Business Scenario
SAP S/4HANA Cloud is a future-ready enterprise resource planning (ERP) system with
built-in intelligent technologies. It is a cloud-based system that customers can use to
manages various business processes.
The Integration content in SAP Cloud Integration for SAP S/4HANA Cloud Integration with
Salesforce enables the synchronization of master data like Product, Customer, Pricing, etc.
This integration content helps with the automation of some business processes by
integrating SAP S/4HANA Cloud to Salesforce through SAP Cloud Platform Integration.
Information is retrieved from SAP S/4HANA Cloud with the OData adapter. Data retrieved
from SAP S/4Hana is then mapped and transformed to a structure that fits SObjects in
Salesforce. Lastly, the data is sent to Salesforce using the Salesforce Adapter. Some
integration flows also retrieve data from the Salesforce. In which case the data is
transformed and mapped in SAP CPI and later sent to SAP S/4HANA Cloud using the OData
adapter.
2
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
To configure the integration content using this guide, you would need to have access and
authorizations to the systems listed below.
Access required:
Authorization required:
For the adapter installation, refer to the Salesforce Adapter and Plug-in Installation Guide
that is included as part of the Salesforce adapter package.
For the plug-in installation, refer to the Salesforce Adapter and Plug-in Installation Guide
that is included as part of the Salesforce adapter package.
4 Configuration
Some activities need to be performed in SAP S/4HANA Cloud, Salesforce, and SAP Cloud
Platform Integration before the integration content package can be configured and
deployed.
3
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
This section describes the mandatory configurations which need to be performed in the
SAP S/4HANA Cloud system before you can start the configuration in Salesforce or
Integration content in SAP Cloud Platform Integration.
A Technical Communication User is needed to call OData services in SAP S/4HANA Cloud
from SAP CPI(Cloud Platform Integration). Communication Users in SAP S/4HANA Cloud
are used for inbound communication and for processing messages in the system. Follow
the below steps to create a communication user in SAP S/4HANA.
Procedure
1. Access the S/4HANA Cloud Fiori UI and log in as SAP S/4HANA Cloud Admin.
2. Under Communication Management, choose Maintain Communication Users.
3. Choose New to create a new user.
4. Enter a description and password for the user and click on Create.
Example:
• Username: ODATAUSER
• Description: S/4HANA Cloud Communication User
• Password: **********
Procedure
1. Log on to the SAP Fiori launchpad in your SAP S/4HANA Cloud system.
2. Under Communication Management, choose Communication Systems.
3. Choose New to create a system.
4. Enter a system ID as required (e.g.: CPI_INSTANCE) and be descriptive in the
System Name field. Click on Create.
5. In the Host Name field, enter the SAP Cloud Platform Integration Runtime URL
6. Enter a name in the Logical System ID field (e.g.: CPI).
4
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The communication arrangement in S/4HANA Cloud defines all relevant information for
the interface. It contains the communication system, outbound, and inbound
authentication.
Procedure
1. Log on to the SAP Fiori launchpad in your SAP S/4HANA Cloud system with the
required authorization.
2. Under Communication Management, choose Communication Arrangements.
3. Search for a scenario (E.g.: SAP_COM_008), if it does not exist, choose new.
4. Search for the scenario again and click Create.
5. Click on Communication System and choose the Communication System that
you created in the previous step.
6. Under Inbound Communication, in the Username field, select the user you
created and choose Save.
7. Repeat the steps for all the other communication arrangements mentioned in the
previous step.
5
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Security Token and OAuth Credentials are needed for a secure connection to
Salesforce, to access them an app needs to be created in the Salesforce tenant. To retrieve
the Security Token and OAuth Credentials follow the below procedure.
Procedure
3. In the next screen, fill in basic details such as App Name, API Name, and Contact
Email. In the API (Enable OAuth Settings) section, select Enable OAuth
Settings.
6
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
5. In the next overview, select the concerned app. You can find the Client ID and
Client Secret in the respective Consumer Key and Consumer Secret fields, see
Figure 4.4.
7
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Entitlement management is a collection of Salesforce features that help you provide the
correct service levels to your customer. It has features that let you define, enforce, and
track service levels as part of your support management process
To enable entitlement management modules in your Salesforce instance, follow the guide
below:
https://help.salesforce.com/articleView?id=entitlements_enabling.htm&type=5
Procedure
1. From Setup, enter Entitlement Settings in the Quick Find box, then select
Entitlement Settings.
2. Select Enable Entitlement Management.
3. Click Save. This takes you to a page where you can customize entitlement
management settings. You will come back to those settings later on in the
entitlement management setup process.
Quotes in Salesforce represent the proposed prices of your company’s products and
services. You create a quote from an opportunity and its products. Each opportunity can
have multiple associated quotes, and any one of them can be synced with the opportunity.
Follow the Salesforce guide below to enable quotes modules in your Salesforce instance:
https://help.salesforce.com/articleView?id=quotes_enable.htm&type=5
Procedure
1. From Setup, enter Quote in the Quick Find box, then select Quote Settings
(Lightning Experience) or Quotes Settings (Salesforce Classic).
2. Select the option for enabling quotes.
3. To display the Quotes related list on the standard opportunity page layout,
select Opportunity Layout.
4. To add the Quotes related list to all opportunity page layouts that users have
customized, select Append to users' personal related list customization.
5. Save your changes.
In case support for multiple currencies is required for your scenario, this section gives an
overview of how this can be achieved. Before your organization can use multiple
8
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
https://help.salesforce.com/articleView?id=admin_enable_multicurrency_implications.ht
m&type=5
Follow the Salesforce guide to activate multiple currencies in your Salesforce instance:
https://help.salesforce.com/articleView?id=admin_enable_multicurrency.htm&type=0
Procedure
The Integration content synchronizes data between SAP S/4HANA Cloud and Salesforce.
For this purpose, an SAP S/4HANA Cloud unique identifier needs to be added in Salesforce
which will hold SAP S/4HANA Cloud key value. To achieve that, follow the steps below.
Procedure
The above steps need to be repeated for more Objects. The table below contains a list of
fields per object that needs to be added. Perform the above steps for all fields listed in the
table below.
9
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Products SAP_Material_Ref
Accounts SAP_BusinessPartner_Ref
Orders SAP_SalesOrder_Ref
To have control over the Service Contracts that need to be replicated to SAP S/4HANA
Cloud, a custom field needs to be created in Salesforce. Follow the steps below.
Procedure
In Salesforce we need to create a record type corresponding to the partner function in SAP
S/4HANA Cloud. Record types determine the business processes, page layouts, and picklist
values users have access to.
Procedure
1. Go to Setup.
2. Type Record Types in the Quick Find box and select Record Types in Accounts.
10
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Note: These record types are for reference, adjust and fill in as necessary for your
organization.
In this section, the settings of the Integration Flows are discussed, including the
prerequisites, parameters of the Sender and Receiver systems, as well as others specific
to each iFlow.
This integration flow allows the replication of the customer data by replicating the
Customer master data from SAP S/4HANA Cloud to Salesforce as Accounts. Whenever a
Customer in SAP S/4HANA Cloud is created or modified, it gets replicated to Salesforce in
the next run of the integration flow (if scheduled).
11
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The SAP CPI implementation of the process in Figure 4.5 is shown in Figure 4.6.
12
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.1.2 Prerequisites
• Deploy the security artifacts that will be required during the configuration of the
integration content.
• Users need to define the time zone in configuration and the first time run date and
hour from when to start replicating.
4.3.1.3 Scope
Note that this integration flow will only replicate the Business Partners of the category
Customers.
4.3.1.4 Configuration
1. Open the integration flow “Replicate Account from SAP S4HANA Cloud to
Salesforce”.
2. Click on Configure.
3. Configure “Timer”. You can choose between:
Run Once: iFlow will be executed only once, can be used for the initial load.
Schedule on Day: iFlow will be executed on a specific date/time.
Schedule to Recur: iFlow will be executed at a regular interval and will replicate
the changes from the source system to the target system (suggested mode).
Note: Replace the default values of the parameters in the configurations as per your
landscape.
4. Go to Receiver.
5. Configure “Receiver” named “S4HANA_Cloud” to fit your specific landscape. See
Figure 4.8.
13
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.8 is provided in the table below.
Parameter Description
Hostname Enter the API hostname of your S/4HANA Cloud system. The hostname
is part of the Address.
https://hostname:port/sap/opu/odata/sap/API_BUSINESS_PARTNER
Port Enter the API port of your S/4HANA Cloud system. The port is part of
the Address.
https://hostname:port/sap/opu/odata/sap/API_BUSINESS_PARTNER
Credential Enter the name of the credential you have deployed for S/4HANA
Name Cloud. See below about deploying credential artifacts.
14
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.9 are provided in the table below.
Parameter Description
E.g.: https://login.salesforce.com
The description of each of the fields in Figure 4.10 are presented in the table below.
15
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Parameter Description
InitialDate Date from when the integration flow will replicate for the first
time. Correct format: YYYY-MM-DD’T’hh:mm:ss.sss’Z’
E.g.: 1970-01-01T00:00:00.000Z
InitialHour Time from when the integration flow will replicate for the first
time.
E.g.: PT00H00M00S
16
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
In case your organization uses custom fields in Salesforce, you might need to customize
the provided integration flow and adapt it to your needs. Users should update the existing
solution by creating a new XSD using the Eclipse the Salesforce Plug-in, change this
schema in the message mapping, and add custom connections as needed.
Value mapping facilitates the customization of Account Group for Customers in SAP
S/4HANA Cloud to “RecordType” in Salesforce. In the current version of the content
package, there are two Records. Note: Users should rename these Record Types according
to their organization.
This integration flow enables the synchronization of the Materials data by replicating the
Product master data from SAP S/4HANA Cloud to Salesforce as Products. Whenever a
Material in SAP S/4HANA Cloud is created or modified, it will be replicated to Salesforce in
the next run of the integration flow (if scheduled).
17
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The SAP CPI implementation of the process in Figure 4.12 is shown in Figure 4.13.
18
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.2.2 Prerequisites
• Deploy the security artifacts that will be required during the configuration of
Integration content.
• Users need to define the first run date from when to start replicating.
4.3.2.3 Scope
SAP S/4HANA Cloud does not save the modification or creation times, it only saves the
date. As a result, only the date is taken into consideration for defining intervals for
replications.
4.3.2.4 Configuration
1. Open the integration flow “Replicate Product from SAP S4HANA Cloud to
Salesforce”.
2. Click on Configure.
3. Configure “Timer”. You can choose between:
Run Once: iFlow will be executed only once, can be used for the initial load.
Schedule on Day: iFlow will be executed on a specific date/time.
Schedule to Recur: iFlow will be executed at a regular interval and will replicate
the changes from the source system to the target system (Suggested mode).
Note: Replace the default values of the parameters in the configurations as per your
landscape.
19
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.15 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your S/4HANA Cloud system. The
hostname is part of the Address.
https://hostname:port/sap/opu/odata/sap/API_PRODUCT_SRV
Port Enter the API port of your S/4HANA Cloud system. The port is part of
the Address.
https://hostname:port/sap/opu/odata/sap/API_PRODUCT_SRV
Credential Enter the name of the credential you have deployed for S/4HANA
Name Cloud. See below about deploying credential artifacts.
20
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.16Figure 4.10 is presented in the table
below.
Parameter Description
E.g.: https://login.salesforce.com
Security Token Name of a deployed Secure Parameter artifact that holds the
real Security Token. The security token is required to log in to
Salesforce from an untrusted network.
21
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.17 is presented in the table below.
Parameter Description
InitialDate Date from when the integration flow will replicate for the first
time. Correct format: YYYY-MM-DD’T’hh:mm:ss.sss’Z’
E.g.: 1970-01-01T00:00:00.000Z
22
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
This integration flow allows replication of sales orders data by replicating Orders data from
Salesforce to SAP S/4HANA Cloud as Sales Orders.
The SAP CPI implementation of the process in Figure 4.18 is shown in Figure 4.19.
23
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.3.2 Prerequisites
The following steps are the prerequisites for this Integration Scenario:
• Deploy the security artifacts that will be required during the configuration of
Integration content.
• Customers/Accounts should have been replicated from SAP S/4HANA Cloud to
Salesforce
• Materials/Products should have been replicated from SAP S/4HANA Cloud to
Salesforce
• Orders were created with replicated Accounts and Products from SAP S/4HANA
Cloud.
• Users need to define the first run date-time from when to start replicating.
• Customer Payment Terms, Distribution Channel, Organization Division, Sales Order
Type, Sales Organization, and Shipping Conditions are externalized in iFlow and
should be configured to correctly replicate to SAP S/4HANA Cloud.
4.3.3.3 Scope
4.3.3.4 Configuration
1. Open the integration flow “Replicate Sales Order from Salesforce to SAP S4HANA
Cloud”.
2. Click on Configure.
3. Configure “Timer”. You can choose between:
Run Once: iFlow will be executed only once, can be used for the initial load.
24
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Note: Replace the default values of the parameters in the configurations as per your
landscape.
The description of each of the fields in Figure 4.21 is presented in the table below.
25
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Parameter Description
Hostname Enter the API hostname of your S/4HANA Cloud system. The
hostname is part of the Address.
https://hostname:port/sap/opu/odata/sap/API_SALES_ORDER_SRV
Port Enter the API port of your S/4HANA Cloud system. The port is part of
the Address.
https://hostname:port/sap/opu/odata/sap/API_SALES_ORDER_SRV
Credential Enter the name of the credential you have deployed for S/4HANA
Name Cloud. See below about deploying credential artifacts.
The description of each of the fields in Figure 4.22 is presented in the table below.
Parameter Description
E.g.: https://login.salesforce.com
26
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Security Token Name of a deployed Secure Parameter artifact that holds the
real Security Token. The security token is required to log in to
Salesforce from an untrusted network
The description of each of the fields in Figure 4.23 is presented in the table below.
Parameter Description
27
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Sales Order Type Specify the document type to be used in the iFlow.
InitialDate Date from when the integration flow will replicate for the first
time.
E.g.: 1970-01-01T00:00:00.000Z
28
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
This integration flow allows the synchronization of Contracts by replicating the Service
Contracts from Salesforce to SAP S/4HANA Cloud as Sales Contracts, and by updating it
with a reference from SAP S/4HANA Cloud.
29
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The SAP CPI implementation of the process in Figure 4.24 is shown in Figure 4.25.
30
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.4.2 Prerequisites
The following steps are the prerequisites for this Integration Scenario:
• Deploy the security artifacts that will be required during the configuration of
integration content.
• Salesforce Entitlement Management feature should be enabled in the user’s
Salesforce instance.
• Customers/Accounts should have been replicated from SAP S/4HANA Cloud to
Salesforce.
• Materials/Products should have been replicated from SAP S/4HANA Cloud to
Salesforce.
• Service Contracts were created with replicated Customer/Accounts and
Materials/Products from SAP S/4HANA Cloud.
• Service Contracts have been marked as Released.
• The custom field Released created in Section 4.2.6 must be checked for the
replication to occur.
• Condition Type, Customer Payment Terms, Distribution Channel, Organization
Division, Sales Contract Type, and Sales Organization are externalized and should
be configured in iFlow before the replication.
4.3.4.3 Scope
• Users cannot create sales contracts until extending the master data to the
respective sales area.
• Users need to define the first run date-time from when to start replicating.
• This integration flow only covers the new service contracts, update is not covered
in this version.
4.3.4.4 Configuration
1. Open the integration flow “Replicate Sales Contract from Salesforce to SAP S4HANA
Cloud”.
2. Click on Configure.
3. Configure “Timer”. You can choose between:
• Run Once: iFlow will be executed only once, can be used for the initial load.
• Schedule on Day: iFlow will be executed on a specific date/time.
• Schedule to Recur: iFlow will be executed at a regular interval and will replicate
the changes from the source system to the target system (suggested mode).
31
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Note: Replace the default values of the parameters in the configurations as according to your landscape.
The description of each of the fields in Figure 4.27 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your S/4HANA Cloud system. The hostname
is part of the Address.
https://hostname:port/sap/opu/odata/sap/API_SALES_CONTRACT_SRV
Port Enter the API port of your S/4HANA Cloud system. The port is part of
the Address.
32
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
https://hostname:port/sap/opu/odata/sap/API_SALES_CONTRACT_SRV
Credential Enter the name of the credential you have deployed for S/4HANA Cloud.
Name See below about deploying credential artifacts.
The description of each of the fields in Figure 4.28 is presented in the table below.
Parameter Description
Eg: https://login.salesforce.com
Security Token Name of a deployed Secure Parameter artifact that holds the
real Security Token. The security token is required to log in to
Salesforce from an untrusted network.
33
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.29Figure 4.10 is presented in the table
below.
Parameter Description
Customer Payment Specify the Customer Payment Terms to be used in the iFlow.
Terms
The default value is “0004”.
Sales Contract Type Specify the document type to be used in the iFlow.
34
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
InitialDate Date from when the integration flow will replicate for the first
time.
E.g.: 1970-01-01T00:00:00.000Z
This integration flow allows users to obtain the availability of materials from a specified
plant, as delivered by your SAP S/4HANA Cloud through the SOAP protocol. This SOAP
35
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
protocol can be configured in other platforms to extract current stock or to check the
availability of a requested quantity.
The SAP CPI implementation of the process in Figure 4.30 is shown in Figure 4.31.
36
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.5.2 Prerequisites
The following steps are the prerequisites for this Integration Scenario:
• Deploy the security artifacts that will be required during the configuration of
Integration content.
• Users need to implement classes to consume this web service with APEX (for
reference, see Invoking Callouts Using Apex).
4.3.5.3 Scope
4.3.5.4 Configuration
1. Open the integration flow “Receive product availability from SAP S4HANA Cloud”.
2. Click on Configure.
3. Go to Sender and configure “Sender” Salesforce.
Parameter Description
Note: Replace the default values of the parameters in the configurations as per your
landscape.
37
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.32 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your S/4HANA Cloud system. The
hostname is part of the Address.
https://hostname:port/sap/opu/odata/sap/API_PRODUCT_AVA
ILY_INFO_BASIC
Port Enter the API port of your S/4HANA Cloud system. The port is
part of the Address.
https://hostname:port/sap/opu/odata/sap/API_PRODUCT_AVAI
LY_INFO_BASIC
Credential Name Enter the name of the credential you have deployed for
S/4HANA Cloud. See below about deploying credential artifacts.
The description of each of the fields in Figure 4.33 is presented in the table below.
Parameter Description
38
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
This integration flow allows the replication of Pricing by replicating the Sales Pricing data
from SAP S/4HANA Cloud to Salesforce as a price book entry. Whenever a new condition
in SAP S/4HANA Cloud is created, it is replicated to Salesforce in the next run of the
integration flow (if scheduled to recur).
39
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The SAP CPI implementation of the process in Figure 4.34 is shown in Figure 4.35.
40
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.6.2 Prerequisites
The following steps are the prerequisites for this integration scenario:
• Deploy security artifacts that will be required during the configuration of integration
content.
• Products should have been replicated from SAP S/4HANA Cloud to Salesforce.
• Condition Type, Distribution Channel, Pricebook Name, and Sales Organization
must be configured before replicating the pricing condition
4.3.6.3 Scope
• Note that this integration flow only covers new sales pricing, updates are not
included in this version.
• Salesforce allows only one entry of each material per Price Book.
• The integration Flow should be scheduled to run once a day.
41
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.6.4 Configuration
1. Open the integration flow “Receive Sales Pricing from S4HANA Cloud”.
2. Click on Configure.
3. Configure “Timer”. You can choose between:
Run Once: iFlow will be executed only once, can be used for the initial load.
Schedule on Day: iFlow will be executed on a specific date/time.
Schedule to Recur: iFlow will be executed at a regular interval and will replicate
the changes from the source system to the target system (suggested mode).
Note: Replace the default values of the parameters in the configurations as per your
landscape.
4. Go to Receiver.
5. Configure the “Receiver” connector named “S4HANA_Cloud” to fit your specific
landscape. See Figure 4.37.
The description of each of the fields in Figure 4.37 is presented in the table below.
42
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Parameter Description
Hostname Enter the API hostname of your S/4HANA Cloud system. The
hostname is part of the Address.
https://hostname:port/sap/opu/odata/sap/API_SLSPRICINGCO
NDITIONRECORD_SRV
Port Enter the API port of your S/4HANA Cloud system. The port is
part of the Address.
https://hostname:port/sap/opu/odata/sap/API_SLSPRICINGCO
NDITIONRECORD_SRV
Credential Name Enter the name of the credential you have deployed for
S/4HANA Cloud. See below about deploying credential artifacts.
The description of each of the fields in Figure 4.38Figure 4.10 is presented in the table
below.
Parameter Description
43
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.39 is presented in the table below.
Parameter Description
44
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
This integration flow allows updating Accounts from Salesforce to Customers in SAP
S/4HANA Cloud. Whenever an Account is modified in Salesforce it is replicated to SAP
S/4HANA Cloud in the next run of the integration flow (if scheduled to recur).
45
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The SAP CPI implementation of the process in Figure 4.40 is shown in Figure 4.41.
4.3.7.2 Prerequisites
The following steps are the prerequisites for this integration scenario:
• Deploy the security artifacts which will be required during the configuration of
integration content.
• Customers should have been replicated from SAP S/4HANA Cloud to Salesforce.
• Users need to define the first run date and time from when to start updating.
46
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.7.3 Scope
4.3.7.4 Configuration
1. Open the Integration Flow “Update Account from Salesforce to SAP S4HANA
Cloud”.
2. Click on Configure.
3. Configure “Timer”. You can choose between:
• Run Once: iFlow will be executed only once, can be used for the initial load.
• Schedule on Day: iFlow will be executed on a specific date/time.
• Schedule to Recur: iFlow will be executed at a regular interval and will replicate
the changes from the source system to the target system (suggested mode).
Note: Replace the default values of the parameters in the configurations as per your
landscape.
4. Go to Receiver.
5. Configure the “Receiver” connector named “S4HANA_Cloud” to fit your specific
landscape. See Figure 4.43.
47
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.43 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your S/4HANA Cloud system. The hostname
is part of the Address.
Example:
https://hostname:port/sap/opu/odata/sap/API_BUSINESS_PARTNER
Port Enter the API port of your S/4HANA Cloud system. The port is part of
the Address.
Example:
https://hostname:port/sap/opu/odata/sap/API_BUSINESS_PARTNER
Credential Enter the name of the credential you have deployed for S/4HANA Cloud.
Name See below about deploying credential artifacts.
48
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.44 is presented in the table below.
Parameter Description
Example: https://login.salesforce.com
The description of each of the fields in Figure 4.45 is presented in the table below.
Parameter Description
49
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
InitialDate Date from when the integration flow will replicate for the
first time. Correct format: YYYY-MM-DD’T’hh:mm:ss.sss’Z’
E.g.: 1970-01-01T00:00:00.000Z
This integration flow allows sending updates made to SAP S/4HANA Cloud Sales Orders
to Salesforce. Changes made in SAP S/4HANA Cloud, including the addition of new
materials to the Sales Order, would be replicated to Salesforce.
50
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The SAP CPI implementation of the process in Figure 4.46 is shown in Figure 4.47.
51
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
52
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.7.6 Prerequisites
The following steps are the prerequisites for this Integration Scenario:
4.3.7.7 Scope
4.3.7.8 Configuration
1. Open the integration flow “Replicate Sales Order from SAP S4HANA Cloud to
Salesforce”.
2. Configure “Timer”. You can choose between:
Run Once: iFlow will be executed only once, can be used for the initial load.
Schedule on Day: iFlow will be executed on a specific date/time.
Schedule to Recur: iFlow will be executed at a regular interval and will replicate
the changes from the source system to the target system (suggested mode).
53
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Note: Replace the default values of the parameters in the configurations as per your
landscape.
The description of each of the fields in Figure 4.49 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your S/4HANA Cloud system. The
hostname is part of the Address.
Example:
https://hostname:port/sap/opu/odata/sap/API_SALES_ORDER_SRV
Port Enter the API port of your S/4HANA Cloud system. The port is part of
the Address.
Example:
https://hostname:port/sap/opu/odata/sap/API_SALES_ORDER_SRV
54
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Credential Enter the name of the credential you have deployed for S/4HANA
Name Cloud. See below about deploying credential artifacts.
4. Go to Receiver .
5. Configure the “Receiver” connector named “Salesforce”. See the example in Figure
4.50.
The description of each of the fields in Figure 4.50 is presented in the table below.
Parameter Description
Eg: https://login.salesforce.com
Basic Credential Name Name of a deployed User Credentials artifact that holds
Username and Password used to authenticate with
Salesforce.
Security Token Alias Name of a deployed Secure Parameter artifact that holds
the real Security Token. The security token is required to
log in to Salesforce from an untrusted network. Salesforce
automatically generates this key. If you do not have the
security token, log into your account, go to Setup > My
Personal Information > Reset My Security Token.
55
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
6. Configure “More” to fit your use case, see example in Figure 4.51.
The description of each of the fields in Figure 4.51 is presented in the table below.
Parameter Description
56
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
InitialDate Date from when the integration flow will replicate for the
first time. Correct format: YYYY-MM-DD’T’hh:mm:ss.sss’Z’
E.g.: 1970-01-01T00:00:00.000Z
Salesforce API Version Choose the version of Salesforce API to connect to.
Default is 48.0.
Value mapping allows customization for OverallSDProcessStatus from Sales Orders in SAP
S/4HANA Cloud to Status in Salesforce. In the current version of the content package,
there are two Record Types values as guidance: In Approval Process and Draft.
Users should rename this Order Status as fit for your organization.
57
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
This integration flow allows users to check the order history for a specific customer in a
defined time frame, as delivered by your SAP S/4HANA Cloud through the SOAP protocol.
This SOAP protocol can be configured in other platforms to extract the sales order history
for a specific period and sales order type.
The SAP CPI implementation of the process in Figure 4.53 is shown in Figure 4.54.
58
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
4.3.8.2 Prerequisites
The following steps are the prerequisites for this Integration Scenario:
• Deploy the security artifacts that will be required during the configuration of
Integration content.
• Users need to implement classes to consume this web service with APEX (for
reference, see Invoking Callouts Using Apex).
4.3.8.3 Configuration
1. Open the integration flow “Receive Sales Order History from SAP S4HANA
Cloud”.
2. Click on Configure.
3. Configure “Sender” SOAP and define an address for the SOAP connection.
59
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
Note: Replace the default values of the parameters in the configurations as per your
landscape.
The description of each of the fields in Figure 4.56Figure 4.10 is presented in the table
below.
Parameter Description
https://hostname:port/sap/opu/odata/sap/API_SALES_ORDE
R_SRV
Port Enter the API port of your S/4HANA Cloud system. The port is
part of the Address.
https://hostname:port/sap/opu/odata/sap/API_SALES_ORDER
_SRV
Credential Name Enter the name of the credential you have deployed for
S/4HANA Cloud. See below about deploying credential
artifacts.
60
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.57Figure 4.10 is presented in the table
below.
Parameter Description
61
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
5 Appendix
5.1 Generating Schema from Eclipse plug-in and replacing standard schema used
in the Integration Flow
Currently, the integration package works with the standard fields for Salesforce, except
for specific fields created in previous chapters. In case other custom fields are needed a
new XSD must be generated with the Salesforce’s Plug-in, default XSD on mapping must
be replaced by the created one, and these fields should also be mapped.
1. Open Eclipse.
2. Go to Windows > Perspective > Open Perspective > Other.
3. Select Salesforce Adapter and click open.
4. Go to XSD Generator XSD (or XSD Generator Aggregation/Composite if more than
one object is needed).
5. Select a Version.
6. Select an API.
7. Select the operation that accommodates the integration flow.
8. Select an Object (or many in case of Aggregation/Composite).
9. Select Request XSD or Response XSD depending on the case.
10. Click on Save XSD and select a folder.
11. Replace default XSD from mapping in SAP CPI to recently created XSD.
5.2 Deploying Salesforce User Credentials, Token, and OAuth in SAP CPI
This is necessary to hold the Salesforce username and password information used in the
authentication.
62
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide
63