S4HANA Integration With Salesforce Configuration Guide
S4HANA Integration With Salesforce Configuration Guide
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 ........................................................................................ 4
4.1.1 Create Technical Communication User ............................................................................................4
4.1.2 Activating SAP Gateway ...................................................................................................................4
4.1.3 Activate OData API in Gateway ........................................................................................................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 ............................................................................7
4.2.3 Activate Quotes in Salesforce ..........................................................................................................8
4.2.4 Activate Multiple Currencies ............................................................................................................8
4.2.5 Adding SAP S/4HANA 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 to Salesforce ................................................................... 11
4.3.2 Replicate Product from SAP S/4HANA to Salesforce .................................................................... 17
4.3.3 Replicate Sales Prices from S/4HANA to Salesforce ..................................................................... 22
4.3.4 Replicate Sales Order from Salesforce to SAP S/4HANA .............................................................. 28
4.3.5 Replicate Sales Contract from Salesforce to SAP S/4HANA .......................................................... 34
4.3.6 Receive Product Availability from SAP S/4HANA .......................................................................... 40
4.3.7 Update Account from Salesforce to SAP S/4HANA ....................................................................... 44
4.3.8 Replicate Sales Order from SAP S/4HANA to Salesforce .............................................................. 50
4.3.9 Receive Sales Order History from SAP S/4HANA .......................................................................... 57
5 Appendix ..................................................................................................................61
5.1 Generating Schema from Eclipse Plug-in and Replacing Standard Schema Used in
Integration Flow ..................................................................................................................... 61
5.2 Deploying Salesforce User Credentials, Token, and OAuth in SAP Cloud Platform Interface
61
5.2.1 Deploying User Credentials ........................................................................................................... 62
5.2.2 Deploying Token............................................................................................................................ 62
5.2.3 Deploying OAuth ........................................................................................................................... 62
1
SAP S/4HANA Integration with Salesforce Configuration Guide
1 Introduction
This is the official guide for the configuration of SAP S/4HANA 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 is the ERP business suite based on the SAP HANA in-memory database. It
is an on-premise based system that customers can use to manages various business
processes.
The Integration content in SAP Cloud Integration for SAP S/4HANA 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 to Salesforce through SAP Cloud Platform Integration.
Information is retrieved from SAP S/4HANA 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 using the OData
adapter.
2
SAP S/4HANA Integration with Salesforce Configuration Guide
3.1 Prerequisites
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:
• Salesforce Tenant
o Appropriate authorizations for the use of Tenant Salesforce too, among
other things, configure Custom Fields for certain objects that we will detail.
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
SAP S/4HANA, Salesforce, and SAP Cloud Platform Integration need to be configured and
prepared before the integration content package can be configured and deployed. Follow
the steps mentioned in the next sections.
3
SAP S/4HANA Integration with Salesforce Configuration Guide
This section describes the mandatory configurations which need to be performed in the
SAP S/4HANA system before you can start implementing the configuration for Salesforce
or configuring the Integration content in SAP Cloud Platform Integration. Follow the steps
mentioned in the following sub-sections.
A Technical Communication User is needed to call OData services in SAP S/4HANA from
Cloud Platform Integration. Communication Users in SAP S/4HANA are used for inbound
communication and for processing messages in the system. Follow the steps below to
create a communication user in SAPS/4HANA.
Procedure
<Last Name>
Logon data tab page
User Type: Communication Data
Password: <password>
Note: Ensure the user is assigned relevant authorizations to execute ODATA API Calls.
5. Click Save.
Before you can use the SAP Gateway functionality, it needs to be globally activated in your
system.
If SAP Gateway is not activated, OData services will not run, consumer servers cannot
communicate with it, and an error message will be sent to any system that calls the
services.
You can perform configuration activities via: SAP Reference IMG (transaction SPRO) SAP
NetWeaver > SAP Gateway > OData Channel > Configuration User Settings and
Connection Settings. After you have completed these configuration activities, you must
activate SAP Gateway using the steps below:
1. In the transaction SPRO, open the SAP Reference IMG and navigate to SAP
NetWeaver > SAP Gateway > OData Channel > Configuration > Activate or
Deactivate SAP Gateway and click on the Activity icon. A message will display.
2. Choose Activate. A message will inform you of the current status.
4
SAP S/4HANA Integration with Salesforce Configuration Guide
Follow the steps below to activate the ODATA APIs used by the Integration Content.
Procedure
1. API_SALES_CONTRACT_SRV
2. API_SALES_ORDER_SRV
These activities need to be performed before you can start with the implementation and
configuration of the Integration content in SAP Cloud Platform Integration.
5
SAP S/4HANA 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 select fill in basic details such as App Name, API Name ,
and Contact Email. In the API (Enable OAuth Settings) select Enable OAuth
Settings, see Figure 4.2.
4. In the API section (see Figure 4.3) perform the following actions:
6
SAP S/4HANA Integration with Salesforce Configuration Guide
5. In the next overview, when you select the specific connect app, you can find the
Client ID and Client Secret in the respective Consumer Key and Consumer
Secret fields, see Figure 4.4.
Entitlement management is a collection of Salesforce features that help you provide the
correct service levels to your customer. Its features let you define, enforce, and track
service levels as part of your support management process.
7
SAP S/4HANA Integration with Salesforce Configuration Guide
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
currencies, the feature must be activated in Salesforce. Multiple currencies activation
enables selecting multiple currencies throughout Salesforce.
8
SAP S/4HANA 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.
Products SAP_Material_Ref
Accounts SAP_BusinessPartner_Ref
Orders SAP_SalesOrder_Ref
9
SAP S/4HANA Integration with Salesforce Configuration Guide
To have control over the Service Contracts that need to be replicated to SAP S/4HANA, a
custom field needs to be created in Salesforce. Follow the below 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.
3. Click on New and create two new Records:
• SAP Ship-To
• SAP SoldTo
Note: These names are for reference, adapt as necessary for your organization.
10
SAP S/4HANA Integration with Salesforce Configuration Guide
9. Select components and drag and drop Orders and Contracts to the layout and click
on save.
10. Type Page Layouts in the Quick Find box and select Page Layouts in
Opportunities.
11. Edit Opportunity Layout.
12. Select Related Lists and drag and drop Orders to the layout.
13. Save.
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 replication of the customer data by replicating the Customer
master data from SAP S/4HANA to Salesforce as Accounts. Whenever a Customer in SAP
S/4HANA is created or modified, it gets replicated to SAP S/4HANA in the next run of the
integration flow (if scheduled to recur). Figure 4.5 depicts the business process to be
implemented.
The SAP CPI implementation of the process in Figure 4.5 is shown in Figure 4.6.
11
SAP S/4HANA Integration with Salesforce Configuration Guide
4.3.1.2 Prerequisites
• Deploy the security artifacts that will be required during the configuration of
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 S/4HANA 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).
12
SAP S/4HANA Integration with Salesforce Configuration Guide
Note: Replace the default values of the parameters in the configurations based on your
scenario and landscape.
4. Go to Receiver.
5. Configure the “Receiver” connector named “S4HANA” to fit your specific landscape.
See Figure 4.8.
The description of each of the fields in Figure 4.8 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your SAP S/4HANA 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 SAP S/4HANA system. The port is part of the
Address.
(https://hostname:port/sap/opu/odata/sap/API_BUSINESS_PARTNER)
13
SAP S/4HANA Integration with Salesforce Configuration Guide
Location Enter the Location identifier for your SAP S/4HANA tenant.
ID
Credential Enter the name of the credential you have deployed for/4HANA. See
Name below about deploying credential artifacts.
The description of each of the fields in Figure 4.9 is presented in the table below.
Parameter Description
E.g.: 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.
14
SAP S/4HANA Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.10 are 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).
InitialHour Time from when the integration flow will replicate for the
first time.
(E.g.: PT00H00M00S).
15
SAP S/4HANA 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 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 to “RecordType” in Salesforce. In the current version of the content
package, there are two records – see Figure 4.12.
Note: Users should rename these Record Types according to their organization.
16
SAP S/4HANA Integration with Salesforce Configuration Guide
This integration flow enables the synchronization of the Materials data by replicating the
Product master data from SAP S/4HANA to Salesforce as Products. Whenever a Material
in SAP S/4HANA is created, it will be replicated to Salesforce in the next run of the
integration flow (If scheduled).
The SAP CPI implementation of the process in Figure 4.13 is shown in Figure 4.14.
17
SAP S/4HANA 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 initial time run date from when the data should be
replicated.
4.3.2.3 Scope
SAP S/4HANA 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 the replications.
4.3.2.4 Configuration
1. Open the integration flow “Replicate Product from SAP S4HANA 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).
18
SAP S/4HANA Integration with Salesforce Configuration Guide
Note: Replace the default values of the parameters in the configurations based on your
scenario and landscape.
4. Configure the “Receiver” connector named “S4HANA” to fit your specific landscape.
See Figure 4.16.
The description of each of the fields in Figure 4.16 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your SAP S/4HANA 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 SAP S/4HANA system. The port is part of
the Address.
(https://hostname:port/sap/opu/odata/sap/API_PRODUCT_SRV)
19
SAP S/4HANA Integration with Salesforce Configuration Guide
Location ID Enter the Location identifier for your SAP S/4HANA tenant.
Credential Enter the name of the credential you have deployed for S/4HANA.
Name See below about deploying credential artifacts.
The description of each of the fields in Figure 4.17 is presented in the table below.
Parameter Description
E.g.: https://login.salesforce.com
Basic Credential Name Name of a deployed User Credentials artifact that holds
Username and Password used to authenticate with
Salesforce.
20
SAP S/4HANA Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.18 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).
21
SAP S/4HANA Integration with Salesforce Configuration Guide
This integration flow allows the replication of Pricing by replicating the sales pricing data
from SAP S/4HANA to Salesforce as pricebook entry. Whenever a new condition in SAP
S/4HANA is created, it gets replicated to SAP S/4HANA in the next run of the integration
flow (if scheduled to recur).
22
SAP S/4HANA Integration with Salesforce Configuration Guide
The SAP CPI implementation of the process in Figure 4.19 is shown in Figure 4.20.
4.3.3.2 Prerequisites
• Deploy security artifacts that will be required during the configuration of Integration
content.
• Products should have been replicated from SAP S/4HANA to Salesforce.
• Condition Type, Distribution Channel, Pricebook Name, and Sales Organization
must be configured before replicating the pricing condition.
4.3.3.3 Scope
• This integration flow only covers new sales pricing, update is not covered in this
version.
• Salesforce allows only one entry of each material per Price Book.
• The iFlow should be scheduled to recur once a day.
23
SAP S/4HANA Integration with Salesforce Configuration Guide
4.3.3.4 Configuration
1. Open the integration flow “Replicate Sales Prices from SAP S4HANA 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 based on your
scenario and landscape.
4. Go to Receiver.
5. Configure the “Receiver” connector named “S4HANA” to fit your specific landscape.
See Figure 4.22.
24
SAP S/4HANA Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.22 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your S/4HANA system. The hostname is part
of the Address.
(https://hostname:port/sap/opu/odata/sap/API_SLSPRICINGCONDITI
ONRECORD_SRV).
Port Enter the API port of your S/4HANA system. The port is part of the
Address.
(https://hostname:port/sap/opu/odata/sap/API_SLSPRICINGCONDITIO
NRECORD_SRV).
Credential Enter the name of the credential you have deployed for S/4HANA. See
Name below about deploying credential artifacts.
Parameter Description
25
SAP S/4HANA Integration with Salesforce Configuration Guide
E.g.: https://login.salesforce.com
The description of each of the fields in Figure 4.24 is presented in the table below.
26
SAP S/4HANA Integration with Salesforce Configuration Guide
Parameter Description
27
SAP S/4HANA Integration with Salesforce Configuration Guide
This integration flow allows the replication of sales orders data by replicating the Orders
data Salesforce to SAP S/4HANA as Sales Orders. Whenever an Order in Salesforce is
created or modified, it will be replicated to SAP S/4HANA in the next run of the integration
flow (if scheduled to recur), as long as it has the custom field Released, created in Section
4.2.6, checked.
The SAP CPI implementation of the process in Figure 4.25 is shown in Figure 4.26.
28
SAP S/4HANA Integration with Salesforce Configuration Guide
4.3.4.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.
• Customers/Accounts should have been replicated from SAP S/4HANA to Salesforce.
• Materials/Products should have been replicated from SAP S/4HANA to Salesforce.
• Orders were created with replicated Accounts and Products from SAP S/4HANA.
• 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.
4.3.4.3 Scope
4.3.4.4 Configuration
1. Open the integration flow “Replicate Sales Order from Salesforce to SAP S4HANA”.
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 based on your
scenario and landscape.
29
SAP S/4HANA Integration with Salesforce Configuration Guide
4. Configure the “Receiver” connector named “S4HANA” to fit your specific landscape.
See Figure 4.28.
The description of each of the fields in Figure 4.28 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your SAP S/4HANA 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 SAP S/4HANA system. The port is part of the
Address.
(https://hostname:port/sap/opu/odata/sap/API_SALES_ORDER_SRV).
Location ID Enter the Location identifier for your SAP S/4HANA tenant.
Credential Enter the name of the credential you have deployed for S/4HANA. See
Name below about deploying credential artifacts.
30
SAP S/4HANA Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.29 is presented in the table below.
Parameter Description
E.g.: https://login.salesforce.com
Basic Credential Name Name of a deployed User Credentials artifact that holds
Username and Password used to authenticate with
Salesforce.
31
SAP S/4HANA Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.30 is presented in the table below.
Parameter Description
Sales Order Type Specify the document type to be used in the iFlow.
32
SAP S/4HANA 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)
33
SAP S/4HANA Integration with Salesforce Configuration Guide
This integration flow allows the synchronization of Contracts by replicating the Service
Contracts from Salesforce to SAP S/4HANA as Sales Contracts, and by updating it with a
reference from SAP S/4HANA.
The SAP CPI implementation of the process in Figure 4.31 is shown in Figure 4.32.
34
SAP S/4HANA 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.
• Salesforce Entitlement Management feature should be enabled in the user’s
Salesforce instance.
• Customers/Accounts should have been replicated from SAP S/4HANA to Salesforce.
• Materials/Products should have been replicated from SAP S/4HANA to Salesforce
• Service Contracts were created with replicated Customer/Accounts and
Materials/Products from SAP S/4HANA.
• The custom field ‘Released’ 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.5.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 new service contracts, update is not covered in
this version.
4.3.5.4 Configuration
1. Open the Integration flow “Replicate Sales Contract from Salesforce to SAP
S4HANA”
2. Click on Configure.
3. Configure “Timer”. You can choose between:
35
SAP S/4HANA Integration with Salesforce Configuration Guide
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 based on your
scenario and landscape.
4. Configure the “Receiver” connector named “S4HANA” to fit your specific landscape.
See Figure 4.34.
The description of each of the fields in Figure 4.34 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your SAP S/4HANA system. The hostname is
part of the Address.
36
SAP S/4HANA Integration with Salesforce Configuration Guide
https://hostname:port/sap/opu/odata/sap/API_SALES_CONTRACT_SRV
Port Enter the API port of your SAP S/4HANA system. The port is part of the
Address
https://hostname:port/sap/opu/odata/sap/API_SALES_CONTRACT_SRV
Location ID Enter the Location identifier for your SAP S/4HANA tenant.
Credential Enter the name of the credential you have deployed for S/4HANA. See
Name below about deploying credential artifacts.
The description of each of the fields in Figure 4.35 is presented in the table below.
Parameter Description
E.g.: https://login.salesforce.com
Basic Credential Name Name of a deployed User Credentials artifact that holds
Username and Password used to authenticate with
Salesforce.
37
SAP S/4HANA Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.36 is presented in the table below.
Parameter Description
38
SAP S/4HANA Integration with Salesforce Configuration Guide
Sales Contract 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)
39
SAP S/4HANA Integration with Salesforce Configuration Guide
This integration flow allows users to obtain the availability of materials in a specified plant,
as delivered by your SAP S/4HANA through the SOAP protocol. This SOAP protocol can be
configured in other platforms to extract current stock or check the availability of a
requested quantity.
The SAP CPI implementation of the process in Figure 4.37 is shown in Figure 4.38.
40
SAP S/4HANA Integration with Salesforce Configuration Guide
4.3.6.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.6.3 Scope
The value of quantity returned in response is always the maximum quantity available of
the product in SAP S/4HANA.
4.3.6.4 Configuration
1. Open the integration flow “Receive product availability from SAP S4HANA”.
2. Click on Configure.
3. Go to Sender and Configure “Sender” Salesforce.
41
SAP S/4HANA Integration with Salesforce Configuration Guide
Parameter Description
Note: Replace the default values of the parameters in the configurations based on your
scenario and landscape.
4. Configure the “Receiver” connector named “S4HANA” to fit your specific landscape.
See Figure 4.40.
The description of each of the fields in Figure 4.40 is presented in the table below.
42
SAP S/4HANA Integration with Salesforce Configuration Guide
Parameter Description
Hostname Enter the API hostname of your S/4HANA system. The hostname is
part of the Address.
https://hostname:port/sap/opu/odata/sap/API_PRODUCT_AVAILY_I
NFO_BASIC
Port Enter the API port of your SAP S/4HANA system. The port is part of
the Address.
https://hostname:port/sap/opu/odata/sap/API_BUSINESS_PARTNER
Location ID: Enter the Location identifier for your SAP S/4HANA tenant.
Credential Enter the name of the credential you have deployed for/4HANA. See
Name below about deploying credential artifacts.
The description of each of the fields in Figure 4.41 is presented in the table below.
43
SAP S/4HANA Integration with Salesforce Configuration Guide
Parameter Description
This integration flow allows updating Accounts from Salesforce to Customers in SAP
S/4HANA. Whenever an Account is modified in Salesforce it can be replicated to SAP
S/4HANA in the next run of the integration flow (if scheduled to recur).
44
SAP S/4HANA Integration with Salesforce Configuration Guide
The SAP CPI implementation of the process in Figure 4.42 is shown in Figure 4.43.
4.3.7.2 Prerequisites
The following steps are the prerequisites for this integration scenario:
45
SAP S/4HANA Integration with Salesforce Configuration Guide
• Deploy the security artifacts which will be required during the configuration of
integration content.
• Customers should have been replicated from SAP S/4HANA to Salesforce.
• Users need to define the first run date-time from when to start updating.
4.3.7.3 Scope
• This integration flow will replicate only the Accounts of the category Customers.
• Only Accounts created by a pre-determined (communication user used for creation)
would be replicated.
• Since the number of field names in SAP and Salesforce is different, account names
are separated by spaces, the last value will be mapped to LastName in the case of
a person or GroupBusinessPartnerName2 in the case of a group, all other names
will go to FirstName and GroupBusinessPartnerName1, respectively.
4.3.7.4 Configuration
1. Open the Integration flow “Update Account from Salesforce to SAP S4HANA”.
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 based on your
scenario and landscape.
4. Go to Receiver.
5. Configure the “Receiver” connector named “S4HANA” to fit your specific landscape.
See Figure 4.45.
46
SAP S/4HANA Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.45 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your S/4HANA 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 system. The port is part of the
Address.
https://hostname:port/sap/opu/odata/sap/API_BUSINESS_PARTNER
Location ID Enter the Location identifier for your SAP S/4HANA tenant.
Credential Enter the name of the credential you have deployed for S/4HANA.
Name See below about deploying credential artifacts.
47
SAP S/4HANA Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.46 is presented in the table below.
Parameter Description
E.g.: https://login.salesforce.com
48
SAP S/4HANA Integration with Salesforce Configuration Guide
The description of each of the fields in Figure 4.47 is presented in the table below.
Parameter Description
CreatedBy Specify the salesforce identification for the user that is used
for the creation of Accounts.
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).
49
SAP S/4HANA Integration with Salesforce Configuration Guide
This integration flow allows sending updates to SAP S/4HANA Sales Orders to Salesforce.
Changes made in SAP S/4HANA, including the addition of new materials to the Sales Order,
would be replicated to Salesforce. Figure 4.48 depicts the business process to be
implemented.
The SAP CPI implementation of the process in Figure 4.48 is shown in Figure 4.49.
50
SAP S/4HANA Integration with Salesforce Configuration Guide
51
SAP S/4HANA Integration with Salesforce Configuration Guide
4.3.8.2 Prerequisites
The following steps are the prerequisites for this integration scenario:
4.3.8.3 Scope
52
SAP S/4HANA Integration with Salesforce Configuration Guide
4.3.8.4 Configuration
Note: Replace the default values of the parameters in the configurations based on your
scenario and landscape.
3. Go to Receiver.
4. Configure the “Receiver” connector named “S4HANA” to fit your specific landscape.
See Figure 4.51.
The description of each of the fields in Figure 4.51 is presented in the table below.
53
SAP S/4HANA Integration with Salesforce Configuration Guide
Parameter Description
Hostname Enter the API hostname of your S/4HANA 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 system. The port is part of the
Address.
https://hostname:port/sap/opu/odata/sap/API_SALES_ORDER_SRV
Location ID Enter the Location identifier for your SAP S/4HANA tenant.
Credential Enter the name of the credential you have deployed for S/4HANA.
Name See below about deploying credential artifacts.
The description of each of the fields in Figure 4.52 is presented in the table below.
54
SAP S/4HANA Integration with Salesforce Configuration Guide
Parameter Description
E.g.: 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.
6. Configure “More” to fit your use case, see example in Figure 4.53.
Parameter Description
55
SAP S/4HANA 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 the Salesforce API to connect to.
Default is 48.0.
Value mapping allows the customization for OverallSDProcessStatus from Sales Orders in
SAP S/4HANA 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.
56
SAP S/4HANA Integration with Salesforce Configuration Guide
Users should rename this Order Status to fit their organization's needs.
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 through the SOAP protocol. This
SOAP protocol can be configured in other platforms to extract the sales order history for
a specific period or sales order type.
The SAP CPI implementation of the process in Figure 4.55 is shown in Figure 4.56.
57
SAP S/4HANA Integration with Salesforce Configuration Guide
4.3.9.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.9.3 Configuration
1. Open the integration flow “Receive Sales Order History from SAP S4HANA”.
2. Click on Configure.
3. Configure “Sender” SOAP and define an address for the SOAP connection.
58
SAP S/4HANA Integration with Salesforce Configuration Guide
Note: Replace the default values of the parameters in the configurations based on your
scenario and landscape.
4. Configure the “Receiver” connector named “S4HANA” to fit your specific landscape.
See Figure 4.58.
The description of each of the fields in Figure 4.58 is presented in the table below.
Parameter Description
Hostname Enter the API hostname of your SAP S/4HANA 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 SAP S/4HANA system. The port is part of
the Address.
59
SAP S/4HANA Integration with Salesforce Configuration Guide
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 See below about deploying credential artifacts.
The description of each of the fields in Figure 4.59 is presented in the table below.
Parameter Description
60
SAP S/4HANA Integration with Salesforce Configuration Guide
5 Appendix
5.1 Generating Schema from Eclipse Plug-in and Replacing Standard Schema Used
in 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 Eclipse Plug-in, the 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 Cloud
Platform Interface
Note that the information in this section is also specified in the adapter documentation.
61
SAP S/4HANA Integration with Salesforce Configuration Guide
This is necessary to hold the Salesforce username and password information used in the
authentication.
62