0% found this document useful (0 votes)
9 views

Salesforce API wiith SAP CPI

The document is a configuration guide for integrating SAP S/4HANA Cloud with Salesforce using SAP Cloud Platform Integration. It outlines the necessary prerequisites, configuration steps in both SAP S/4HANA and Salesforce, and provides coding samples and business scenarios for effective integration. The guide aims to assist integration developers in deploying the integration content efficiently.

Uploaded by

tsreddy.sr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Salesforce API wiith SAP CPI

The document is a configuration guide for integrating SAP S/4HANA Cloud with Salesforce using SAP Cloud Platform Integration. It outlines the necessary prerequisites, configuration steps in both SAP S/4HANA and Salesforce, and provides coding samples and business scenarios for effective integration. The guide aims to assist integration developers in deploying the integration content efficiently.

Uploaded by

tsreddy.sr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

SAP S/4HANA Cloud

Integration with
Salesforce
Configuration Guide
For SAP Cloud Platform Integration

Version 1.0 – December 2020


SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

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.

Read this guide carefully before configuring the integration content.

1.1 Coding Samples

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.

1.2 Internet Hyperlinks

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.

Salesforce is a cloud computing service as a software (SaaS) company that specializes in


customer relationship management (CRM) and helps your automation of Sales and
marketing process in an Enterprise

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

3 Preparing the Systems for Integration


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:

• SAP S/4HANA Cloud Tenant Details


• SAP Cloud Platform Integration Tenant Details
• Salesforce Tenant Details

Authorization required:

• SAP S/4HANA Cloud Tenant Details


o Access to Communication Management Application
o Access to Master Data Business Partner
o Access to Master Data Product Master
o Access to Sales Master Data
o Access to Sales Order

• SAP Cloud Platform Integration Tenant Details


o AuthGroup.IntegrationDeveloper

• Salesforce Tenant Details


o Appropriate authorizations for the use of Tenant Salesforce too, among
other things, configure Custom Fields for certain objects that we will detail.

3.2 Adapter Installation

For the adapter installation, refer to the Salesforce Adapter and Plug-in Installation Guide
that is included as part of the Salesforce adapter package.

3.3 Plug-in Installation

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.

Follow the steps mentioned in the below sections.

3
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

4.1 Configuration in SAP S/4HANA Cloud

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.

Follow the steps mentioned in the following sub-sections.

4.1.1 Create a Technical Communication User

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.

Prerequisite: Administrator user should have the catalog role ID SAP_CORE_BC_COM


assigned in the SAP S/4HANA Cloud system.

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: **********

4.1.2 Create a Communication System

A communication system is a specification of a system that represents a communication


partner and all the necessary technical information needed for the communication, such
as hostname/IP-Address, identity, user information, certificates. The communication
system will later be used to establish communication arrangements for different
communication scenarios.

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

7. Enter a name in the Business System ID field (e.g.: CPI).


8. In the User for Inbound Communication section, choose the + button, enter the
technical communication user you created previously, and save.

4.1.3 Create a Communication Arrangement

The communication arrangement in S/4HANA Cloud defines all relevant information for
the interface. It contains the communication system, outbound, and inbound
authentication.

Communication arrangements need to be activated in SAP S/4HANA Cloud for


communication with OData APIs.

The following communication arrangements should be activated based on the


requirement:

• SAP_COM_0008: Business Partner, Customer and Supplier Integration


• SAP_COM_0009: Product Integration
• SAP_COM_0109: Sales Order Integration
• SAP_COM_0115: Product availability information Integration
• SAP_COM_0119: Sales Contract Integration
• SAP_COM_0294: Pricing Data Integration

Prerequisite: The administrator user should have the catalog role ID


SAP_CORE_BC_COM assigned in the SAP S/4HANA Cloud system.

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.

4.2 Configuration in Salesforce.com

This section describes the mandatory configurations which need to be performed in


Salesforce. Examples of such configurations include Security Token and OAuth Credentials
and the creation of custom fields (external id) in Salesforce to store the SAP S/4HANA
Cloud ID before you can start implementing configuration for Integration content in SAP
Cloud Platform Integration.

5
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

4.2.1 Configuration of Security Token and OAuth Credentials

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

1. Log on to your Salesforce console and select Setup.


2. On the left panel in the Build overview, select Create > Apps, then New for the
Connected Apps section.

Figure 4.1 Create Salesforce App

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.

Figure 4.2 New Connected App

6
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

4. Perform the following actions:

• Disable Enable for Device Flow.


• Fill in a Callback URL.
• Disable Use digital signatures.
• Set Selected OAuth Scopes to Full access (full).
• Enable Require Secret for Web Server Flow.
• Disable Include ID Token.
• Disable Enable Asset Tokens. Select Save to complete the creation of the
app.

Figure 4.3 Enable OAuth Settings

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.

Figure 4.4 Consumer Key and Secret

7
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

4.2.2 Activate Entitlement Management in Salesforce

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.

4.2.3 Activate Quotes in Salesforce

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.

4.2.4 Activate Multiple Currencies

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

currencies, the feature must be activated in Salesforce. Multiple currencies activation


enables selecting multiple currencies throughout Salesforce.

Note: Enabling multiple currencies introduces permanent changes in your Salesforce.


Before proceeding, be aware of the implications in the link below:

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

1. In Setup, enter Company Information in the Quick Find box.


2. Select Company Information and click Edit.
3. Ensure that your selected local currency is the default currency that you want to
use for current and future records.
4. Enable Activate Multiple Currencies and save your changes.

4.2.5 Adding SAP S/4HANA Cloud References

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

1. Enter the Setup screen.


2. In the Quick Find box type Accounts* and click on Fields.
3. Scroll down and click New.
4. Choose Text as field type and click on Next.
5. Enter field name: SAP_BusinessPartner_Ref**, enter a Length of 30, and select
the External ID checkbox.
6. Press next and next and then save.
7. Do the same for the below object types and field names.

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

Object* Field Name**

Products SAP_Material_Ref

Accounts SAP_BusinessPartner_Ref

Orders SAP_SalesOrder_Ref

Order Products SAP_OrderItem_Ref

Service Contracts SAP_SalesContract_Ref

Contract Line Items SAP_SalesContractItem_Ref

Price Book Entries SAP_PriceBookEntry_Ref

Table 1. SAP S/4HANA Cloud references in Salesforce

4.2.6 Adding a Released Custom Field

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

1. Enter the Setup screen.


2. Type Service Contracts in the Quick Find box and click on Fields.
3. Scroll down and click New.
4. Choose Checkbox as field data type and click Next.
5. Enter field name Released and choose Unchecked as the default value.
6. Press next and next and then save.
7. Repeat the steps for Orders.

4.2.7 Configuration for Order Process Flow

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

3. Click on New and create two new Records:


• SAP Ship-To
• SAP Sold-To

Note: These record types are for reference, adjust and fill in as necessary for your
organization.

4. Check Active and click on Next.


5. Select a layout (e.g.: Account Layout) and click on Save.
6. Repeat for the other Record.
7. Type Page Layouts in the Quick Find box and select Page Layouts in Accounts.
8. Edit Account Layout (or according to your organization).
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.

4.3 Configuration in SAP Cloud Platform Integration

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.

4.3.1 Replicate Account from SAP S/4HANA Cloud to Salesforce

4.3.1.1 Business Scenario

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).

Figure 4.5 depicts the business process to be implemented.

11
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.5 Process Diagram

The SAP CPI implementation of the process in Figure 4.5 is shown in Figure 4.6.

Figure 4.6 Integration Flow

12
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

4.3.1.2 Prerequisites

The following steps need to be taken as a prerequisite:

• 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

Follow the below steps to configure the integration flow:

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).

Figure 4.7 Configure Timer

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

Figure 4.8 Configure Receiver SAP S/4HANA Cloud

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.

Table 2. Configure Receiver SAP S/4HANA Cloud

6. Configure the “Receiver” connector named “Salesforce”. See Figure 4.9.

Figure 4.9 Configure Receiver Salesforce

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

Login URL The data store URL for Salesforce.

E.g.: https://login.salesforce.com

Basic Credential Name of a deployed User Credentials artifact that holds


Name Username and Password used to authenticate with Salesforce.

Security Name of a deployed Secure Parameter artifact that holds the


Token Alias real Security Token. The security token is required to log in to
Salesforce from an untrusted network.

OAuth Credential Name of deployed OAuth credential name.


Name

Table 3. Configure Receiver Salesforce

7. Configure “More” as shown in Figure 4.10.

Figure 4.10 Configure More options

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

ExceptionLogging Possible values “YES” / “NO”

Specify “YES” to log the exception if any.

Specify “NO” or leave blank otherwise.

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.

Correct format: ‘PT’hh’H’mm’M’ss’S’

E.g.: PT00H00M00S

LogMessageBody Possible values “YES” / “NO”

Specify “YES” to log the Message Body (Not recommended in a


live environment).

Specify “NO” or leave blank otherwise.

LogMessageHeader Possible values “YES” / “NO”

Specify “YES” to log the Message Header

Specify “NO” or leave blank otherwise.

LogMessageProperty Possible values “YES” / “NO”

Specify “YES” to log the Message Properties

Specify “NO” or leave blank otherwise.

Table 4 Configure More options

8. Save and Deploy.

16
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

4.3.1.5 Integration Message Mapping

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.

4.3.1.6 Value Mapping

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.

Figure 4.11 Value Mapping for Account Group

4.3.2 Replicate Product from SAP S/4HANA Cloud to Salesforce

4.3.2.1 Business Scenario

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).

Figure 4.12 depicts the business process to be implemented.

17
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.12 Process Diagram

The SAP CPI implementation of the process in Figure 4.12 is shown in Figure 4.13.

Figure 4.13 Integration Flow

18
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

4.3.2.2 Prerequisites

The following steps need to be taken as a prerequisite:

• 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

Follow the below steps to configure the integration flow:

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).

Figure 4.14 Configure Timer

Note: Replace the default values of the parameters in the configurations as per your
landscape.

4. Configure the “Receiver” connector named “S4HANA_Cloud” to fit your specific


landscape. See Figure 4.15.

19
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.15 Configure Receiver SAP S/4HANA Cloud

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.

Table 5. Configure Receiver SAP S/4HANA Cloud

5. Configure the “Receiver” connector named “Salesforce”. See Figure 4.16.

20
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.16 Configure Receiver Salesforce

The description of each of the fields in Figure 4.16Figure 4.10 is presented in the table
below.

Parameter Description

Login URL The data store URL for Salesforce.

E.g.: https://login.salesforce.com

Basic Credential Name of a deployed User Credentials artifact that holds


Name Username and Password used to authenticate with Salesforce.

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.

OAuth Credential Name of deployed OAuth credential name.


Name

Table 6. Configure Receiver Salesforce

6. Configure “More” as shown in Figure 4.17.

21
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.17 Configure More options

The description of each of the fields in Figure 4.17 is presented in the table below.

Parameter Description

ExceptionLogging Possible values “YES” / “NO”

Specify “YES” to log the exception if any.

Specify “NO” or leave blank otherwise.

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

LogMessageBody Possible values “YES” / “NO”

Specify “YES” to log the Message Body (Not recommended in a


live environment).

Specify “NO” or leave blank otherwise.

LogMessageHeader Possible values “YES” / “NO”

Specify “YES” to log the Message Header

Specify “NO” or leave blank otherwise.

LogMessageProperty Possible values “YES” / “NO”

Specify “YES” to log the Message Properties

22
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Specify “NO” or leave blank otherwise.

Table 7. Configure More options

4.3.3 Replicate Sales Order from Salesforce to SAP S/4HANA Cloud

4.3.3.1 Business Scenario

This integration flow allows replication of sales orders data by replicating Orders data from
Salesforce to SAP S/4HANA Cloud as Sales Orders.

Whenever an Order in Salesforce is created or modified, it would be replicated to SAP


S/4HANA Cloud 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.

Figure 4.18 depicts the business process to be implemented.

Figure 4.18. Process Diagram

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

Figure 4.19. Integration Flow

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

• Sales orders cannot be replicated until extending customers/accounts to the


respective sales area.
• This integration flow only covers new orders, update is not covered in this version.

4.3.3.4 Configuration

Follow the steps below to configure the integration flow:

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

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).

Figure 4.20 Configure Timer

Note: Replace the default values of the parameters in the configurations as per your
landscape.

4. Configure the “Receiver” connector named “S4HANA_Cloud” to fit your specific


landscape. See Figure 4.21.

Figure 4.21 Configure Receiver SAP S/4HANA Cloud

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.

Table 8. Configure Receiver SAP S/4HANA Cloud

5. Configure the “Receiver” connector named “Salesforce”. See Figure 4.22.

Figure 4.22 Configure Receiver Salesforce

The description of each of the fields in Figure 4.22 is presented in the table below.

Parameter Description

Login URL The data store URL for Salesforce.

E.g.: https://login.salesforce.com

26
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Basic Credential Name of a deployed User Credentials artifact that holds


Name Username and Password used to authenticate with Salesforce.

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

OAuth Credential Name of deployed OAuth credential name.


Name

Table 9. Configure Receiver Salesforce

6. Configure “More” as shown in Figure 4.23.

Figure 4.23 Configure More options

The description of each of the fields in Figure 4.23 is presented in the table below.

Parameter Description

Condition Type Specify the Condition Type to be used in the iFlow.

The default value is “PMP0”.

27
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Customer Payment Specify the Customer Payment Terms to be used in


Terms the iFlow.

The default value is “0004”.

Distribution Channel Specify the distribution channel to be used in the iFlow.

The default value is “10”.

Organization Division Specify the Organization Division to be used in the iFlow.

The default value is “00”.

Sales Order Type Specify the document type to be used in the iFlow.

The default value is “OR”.

Sales Organization Specify the sales organization to be used in the iFlow.

The default value is “1710”.

Shipping Condition Specify Shipping Condition to be used in the iFlow.

The default value is “01”.

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

ExceptionLogging Possible values “YES” / “NO”

Specify “YES” to log the exception if any.

Specify “NO” or leave blank otherwise.

LogMessageBody Possible values “YES” / “NO”

Specify “YES” to log the Message Body (Not recommended in


a live environment).

Specify “NO” or leave blank otherwise.

28
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

LogMessageHeader Possible values “YES” / “NO”

Specify “YES” to log the Message Header

Specify “NO” or leave blank otherwise.

LogMessageProperty Possible values “YES” / “NO”

Specify “YES” to log the Message Properties

Specify “NO” or leave blank otherwise.

Table 10. Configure More options

4.3.4 Replicate Sales Contract from Salesforce to SAP S/4HANA Cloud

4.3.4.1 Business Scenario

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.

Figure 4.24 depicts the business process to be implemented.

29
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.24 Process Diagram

The SAP CPI implementation of the process in Figure 4.24 is shown in Figure 4.25.

Figure 4.25 Integration Flow

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

Follow the below steps to configure the integration flow:

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

Figure 4.26 Configure Timer

Note: Replace the default values of the parameters in the configurations as according to your landscape.

4. Configure the “Receiver” connector named “S4HANA_Cloud” to fit your specific


landscape. See Figure 4.27.

Figure 4.27 Configure Receiver SAP S/4HANA Cloud

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.

Table 11. Configure Receiver SAP S/4HANA Cloud

5. Configure the “Receiver” connector named “Salesforce”. See Figure 4.28.

Figure 4.28 Configure Receiver Salesforce

The description of each of the fields in Figure 4.28 is presented in the table below.

Parameter Description

Login URL The data store URL for Salesforce.

Eg: https://login.salesforce.com

Basic Credential Name of a deployed User Credentials artifact that holds


Name Username and Password used to authenticate with Salesforce.

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.

OAuth Credential Name of deployed OAuth credential name.


Name

Table 12. Configure Receiver Salesforce

33
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

6. Configure “More” as shown in Figure 4.29.

Figure 4.29 Configure More options

The description of each of the fields in Figure 4.29Figure 4.10 is presented in the table
below.

Parameter Description

Condition Type Specify the Condition Type to be used in the iFlow.

The default value is “VTV1”.

Customer Payment Specify the Customer Payment Terms to be used in the iFlow.
Terms
The default value is “0004”.

Distribution Channel Specify the distribution channel to be used in the iFlow.

The default value is “10”.

Organization Specify the Organization Division to be used in the iFlow.


Division
The default value is “00”.

Sales Contract Type Specify the document type to be used in the iFlow.

The default value is “VC01”.

34
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Sales Organization Specify the sales organization to be used in the iFlow.

The default value is “1710”.

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

ExceptionLogging Possible values “YES” / “NO”

Specify “YES” to log the exception if any.

Specify “NO” or leave blank otherwise.

LogMessageBody Possible values “YES” / “NO”

Specify “YES” to log the Message Body (Not recommended in a


live environment).

Specify “NO” or leave blank otherwise.

LogMessageHeader Possible values “YES” / “NO”

Specify “YES” to log the Message Header

Specify “NO” or leave blank otherwise.

LogMessageProperty Possible values “YES” / “NO”

Specify “YES” to log the Message Properties

Specify “NO” or leave blank otherwise.

Table 13. Configure More options

4.3.5 Receive Product Availability from SAP S/4HANA on Cloud

4.3.5.1 Business Scenario

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.

Figure 4.30 depicts the business process to be implemented.

Figure 4.30 Process Diagram

The SAP CPI implementation of the process in Figure 4.30 is shown in Figure 4.31.

Figure 4.31 Integration Flow

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

The value returned is always the maximum quantity available, if any.

4.3.5.4 Configuration

Follow the below steps to configure the integration flow:

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

Address The endpoint URL where your service can be accessed by a


client application.

Table 14. Configure Sender Salesforce

Note: Replace the default values of the parameters in the configurations as per your
landscape.

4. Configure the “Receiver” connector named “S4HANA_Cloud” to fit your specific


landscape. See Figure 4.32.

Figure 4.32 Configure Receiver SAP S/4HANA Cloud

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.

Table 15. Configure Receiver SAP S/4HANA Cloud

5. Configure “More” as shown in Figure 4.33.

Figure 4.33. Configure More options

The description of each of the fields in Figure 4.33 is presented in the table below.

Parameter Description

ExceptionLogging Possible values “YES” / “NO”

Specify “YES” to log the exception if any.

Specify “NO” or leave blank otherwise.

38
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

LogMessageBody Possible values “YES” / “NO”

Specify “YES” to log the Message Body (Not recommended


in a live environment).

Specify “NO” or leave blank otherwise.

LogMessageHeader Possible values “YES” / “NO”

Specify “YES” to log the Message Header

Specify “NO” or leave blank otherwise.

LogMessageProperty Possible values “YES” / “NO”

Specify “YES” to log the Message Properties

Specify “NO” or leave blank otherwise.

Table 16. Configure More options

4.3.6 Replicate Sales Prices from S/4HANA on Cloud to Salesforce

4.3.6.1 Business Scenario

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).

Figure 4.34 depicts the business process to be implemented.

39
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.34 Process Diagram

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

Figure 4.35 Integration Flow

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

Follow the below steps to configure the integration flow:

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).

Figure 4.36. Configure Timer

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.

Figure 4.37. Configure Receiver SAP S/4HANA Cloud

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

Authentication Select “Basic” authentication Type.

Credential Name Enter the name of the credential you have deployed for
S/4HANA Cloud. See below about deploying credential artifacts.

Table 17. Configure Receiver SAP S/4HANA Cloud

6. Configure “Receiver” Salesforce.

Figure 4.38. Configure Receiver Salesforce

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

Login URL The data store URL for Salesforce. E.g.:


https://login.salesforce.com

Credential Name Name of a deployed User Credentials artifact that holds


Username and Password used to authenticate with
Salesforce.

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. Salesforce
automatically generates this key.

OAuth Credential Name OAuth credential name.

Table 18. Configure Receiver Salesforce

7. Configure “More” as shown in Figure 4.39.

Figure 4.39. Configure More options

The description of each of the fields in Figure 4.39 is presented in the table below.

Parameter Description

DistributionChannel Specify the distribution channel to be used in the iFlow.

The default value is “10”.

SalesOrganization Specify the sales organization to be used in the iFlow.

44
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

The default value is “1710”.

PricebookName Pricebook name in Salesforce.

The default value is “Standard Price Book”.

ExceptionLogging Possible values “YES” / “NO”

Specify “YES” to log the exception if any.

Specify “NO” or leave blank otherwise.

LogMessageBody Possible values “YES” / “NO”

Specify “YES” to log the Message Body (Not recommended in a


live environment).

Specify “NO” or leave blank otherwise.

LogMessageHeader Possible values “YES” / “NO”

Specify “YES” to log the Message Header

Specify “NO” or leave blank otherwise.

LogMessageProperty Possible values “YES” / “NO”

Specify “YES” to log the Message Properties

Specify “NO” or leave blank otherwise.

Table 19. Configure More options

4.3.7 Update Account from Salesforce to SAP S/4HANA Cloud

4.3.7.1 Business Scenario

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).

Figure 4.40 depicts the business process to be implemented.

45
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.40 Process Diagram

The SAP CPI implementation of the process in Figure 4.40 is shown in Figure 4.41.

Figure 4.41 Integration Flow

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

• This integration flow only replicates Accounts of the category Customers.


• Only Accounts modified by a pre-determined user would be replicated.
• Since the number of field names in SAP and Salesforce is different, the Names of
the Accounts are separated by spaces. The last value will be mapped to LastName
in case of a person or GroupBusinessPartnerName2 in case of a group. All other
names will go to FirstName and GroupBusinessPartnerName1, respectively.

4.3.7.4 Configuration

To configure the related iFlow, proceed as follows:

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).

Figure 4.42 Configure Timer

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

Figure 4.43 Configure Receiver SAP S/4HANA Cloud

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.

Table 20. Configure Receiver SAP S/4HANA Cloud

6. Configure the “Receiver” connector named “Salesforce”. See Figure 4.44.

Figure 4.44. Configure Receiver Salesforce

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

Login URL The data store URL for Salesforce.

Example: https://login.salesforce.com

Credential Name Name of a deployed User Credentials artifact which holds


Username and Password used to authenticate with
Salesforce.

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.

OAuth Credential Name OAuth credential name.

Table 21. Configure Receiver Salesforce

7. Configure “More” as shown in Figure 4.45.

Figure 4.45 Configure More options

The description of each of the fields in Figure 4.45 is presented in the table below.

Parameter Description

CreatedBy Specify the salesforce identification for the user that


modifies the Accounts.

49
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

ExceptionLogging Possible values “YES” / “NO”

Specify “YES” to log the exception if any.

Specify “NO” or leave blank otherwise.

LogMessageBody Possible values “YES” / “NO”

Specify “YES” to log the Message Body (Not recommended


in a live environment).

Specify “NO” or leave blank otherwise.

LogMessageHeader Possible values “YES” / “NO”

Specify “YES” to log the Message Header

Specify “NO” or leave blank otherwise.

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

LogMessageProperty Possible values “YES” / “NO”

Specify “YES” to log the Message Properties

Specify “NO” or leave blank otherwise.

Table 22. Configure More options

8. Save and Deploy.

4.1.18 Replicate Sales Order from S/4HANA Cloud to Salesforce

4.3.7.5 Business Scenario

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.

Figure 4.46 depicts the business process to be implemented.

50
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.46 Process Diagram

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

Figure 4.47 Integration Flow

4.3.7.6 Prerequisites

The following steps are the prerequisites for this Integration Scenario:

• Customers/Products should have been replicated from SAP S/4HANACloud to


Salesforce.
• The order should have been replicated from Salesforce to SAP S/4HANA Cloud.
• The query filter uses ‘createdBy’. A service user needs to be utilized in SAP
S/4HANA Cloud for Salesforce integration.
• Users need to define the first run date-time from when to start updating.

4.3.7.7 Scope

• Some information must be hardcoded to correctly replicate to Salesforce, such as:


Created by User and Pricebook Name.
• This integration flow only covers updating orders replicated from Salesforce,
included adding new items.

4.3.7.8 Configuration

To configure the integration Flow, follow the steps below:

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

Figure 4.48 Configure Timer

Note: Replace the default values of the parameters in the configurations as per your
landscape.

3. Configure the “Receiver” connector named “S4HANA_Cloud” to fit your specific


landscape. See Figure 4.49.

Figure 4.49 Configure Receiver SAP S/4HANA Cloud

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.

Table 23. Configure Receiver SAP S/4HANA Cloud

4. Go to Receiver .

5. Configure the “Receiver” connector named “Salesforce”. See the example in Figure
4.50.

Figure 4.50 Configure Receiver Salesforce

The description of each of the fields in Figure 4.50 is presented in the table below.

Parameter Description

Address The data store URL for Salesforce.

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

OAuth Credential Name OAuth credential name.

Table 24. Configure Receiver Salesforce

6. Configure “More” to fit your use case, see example in Figure 4.51.

Figure 4.51 Configure More options

The description of each of the fields in Figure 4.51 is presented in the table below.

Parameter Description

CreatedBy Specify the salesforce identification for the user that


modifies the Accounts. This ID is generated by Salesforce
can be extracted using the plug-in, the field name is
CreatdById.

ExceptionLogging Possible values “YES” / “NO”

Specify “YES” to log the exception if any.

Specify “NO” or leave blank otherwise.

LogMessageBody Possible values “YES” / “NO”

Specify “YES” to log the Message Body (Not recommended


in live environment).

Specify “NO” or leave blank otherwise.

LogMessageHeader Possible values “YES” / “NO”

56
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Specify “YES” to log the Message Header

Specify “NO” or leave blank otherwise.

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

LogMessageProperty Possible values “YES” / “NO”

Specify “YES” to log the Message Properties

Specify “NO” or leave blank otherwise.

PricebookName Pricebook name in Salesforce. The default value is


“Standard Price Book”

Salesforce API Version Choose the version of Salesforce API to connect to.

Default is 48.0.

Table 25. Configure More options

4.3.7.9 Value Mapping

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.

Figure 4.52 Configure Value Mapping Order Status

57
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

4.3.8 Receive Sales Order History from SAP S4HAHA Cloud

4.3.8.1 Business Scenario

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.

Figure 4.53 depicts the business process to be implemented.

Figure 4.53. Process Diagram

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

Figure 4.54 Integration Flow

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

Follow the below steps to configure the integration flow:

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.

Figure 4.55. Configure Sender SOAP

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.

4. Define an address for the SOAP connection


5. Configure the “Receiver” connector named “S4HANA_Cloud” to fit your specific
landscape. See Figure 4.56.

Figure 4.56 Configure Receiver SAP S/4HANA Cloud

The description of each of the fields in Figure 4.56Figure 4.10 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_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

Authentication Select “Basic” authentication Type.

Credential Name Enter the name of the credential you have deployed for
S/4HANA Cloud. See below about deploying credential
artifacts.

Table 26. Configure Receiver SAP S/4HANA Cloud

6. Configure “More” as shown in Figure 4.57.

60
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

Figure 4.57. Configure More options

The description of each of the fields in Figure 4.57Figure 4.10 is presented in the table
below.

Parameter Description

ExceptionLogging Possible values “YES” / “NO”

Specify “YES” to log the exception if any.

Specify “NO” or leave blank otherwise.

LogMessageBody Possible values “YES” / “NO”

Specify “YES” to log the Message Body (Not recommended


in live environment).

Specify “NO” or leave blank otherwise.

LogMessageHeader Possible values “YES” / “NO”

Specify “YES” to log the Message Header

Specify “NO” or leave blank otherwise.

LogMessageProperty Possible values “YES” / “NO”

Specify “YES” to log the Message Properties

Specify “NO” or leave blank otherwise.

Table 27. Configure More options

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.

Follow the steps below to create an XSD:

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

5.2.1 Deploying User Credentials

This is necessary to hold the Salesforce username and password information used in the
authentication.

Follow the steps below:

1. In your SAP CPI tenant go to Monitor.


2. In Manage Security click on Security Material.
3. Click in the Add dropdown and select User Credentials.
4. Fill Name for future use, User with Salesforce username and Password.
5. Click on Deploy.

5.2.2 Deploying Token

Follow the steps below:

1. In your SAP CPI tenant go to Monitor.


2. In Manage Security click on Security Material.
3. Click in the Add dropdown and select Secure Parameter.
4. Fill Name for future use and Secure Parameter with your Salesforce token.
5. Click on Deploy.

62
SAP S/4HANA Cloud Integration with Salesforce Configuration Guide

5.2.3 Deploying OAuth

Follow the steps below:

1. In your SAP CPI tenant go to Monitor.


2. In Manage Security click on Security Material.
3. Click in the Add dropdown and select User Credentials.
4. Fill Name for future use and User with your OAuth token.
5. Click on Deploy.

63

You might also like