Interfacing with SuccessFactors using SFSF adapter in SAP PI dual stack environment – Part I
Preface: SAP SuccessFactors Employee Central is a complete, cloud technology-based core HR system of record that combines HR transactions, processes and data with social collaboration features and mobile functionality. In today’s always-on, mobile, social and data-driven world it is imperative to enable the integration for real-time applications such as SuccessFactors with other On-premise / Cloud applications using a robust middleware layer.
With SuccessFactors having established itself as one of the leading Cloud based HR solutions in the market, it has seen a surge in SuccessFactors Employee Central integration with On-premise and Cloud based HR / Non HR applications.
The below blog is first in the series to understand the SuccessFactors Employee Central integration with such applications in details.
Objective: The objective of this guide is to illustrate the steps required to create and test a basic interface using SFSF Adapter in SAP PI dual stack environment.
- Connectivity Add-On is installed in SAP PI.
- Eclipse IDE for Java EE developers (With HCI Tools) is installed in the machine.
- SAP PI instance is up and running.
- User has necessary authorization to build, test and monitor an interface in SAP PI.
- SuccessFactors instance is up and running.
- SuccessFactors instance connectivity details are available.
- Entity “PerPersonal” contains some data.
- Third party system instance such as SAP HR is up and running.
- SAP PI connectivity with third party system instance such as SAP HR is setup.
- User is familiar with the necessary development tools such as SAP PI. Eclipse IDE.
- Interface is built in a dual stack SAP PI 7.11 environment.
SuccessFactors basic concepts:
SuccessFactors Employee Central: SuccessFactors Employee Central (SFEC) is next generation Cloud based Core HR System.
Objects: SuccessFactors application broadly maintains two types of information at object level.
- Foundation Objects: Contains details for Organization, Pay and Job Structure Details.
Some examples are Company/ Legal Entity, Business Unit, Location Group etc.
- Personal and Employment Objects: Contains Personal and Employment Details for Employees.
Some examples are User, PerAddress, PerDirectDeposit, PerEmail etc.
Entity: Entities are table structures, used to store the data within SF application.
SFAPI: The SFAPI is library of SF entities, exposed to the outside world for integration purposes.
Operations – Each entity supports some operations through API: Example of such operations are
Interface Scenario: The interface fetches the basic user information such as first name, last name, gender, marital status etc. from SFEC entity PerPersonal and puts it in a file (xml format) on the application server in SAP HR system.
The interface uses SAP PI as middleware.
1. Test the SF connectivity.
a. Get the below connectivity details from SF team.
- SuccessFactor URL or endpoint
- User name
- Company ID
b. Open the SF URL in the browser and download the WSDL
c. Import the WSDL in any external tool such as SOAP UI and provide the connectivity details such as User name, Password and the company ID in the
Login operation of request payload.
d. Trigger the request. Session Id is received in the Response.
e. This completes the successful connectivity with SF application.
f. Connectivity can further be confirmed by running other operations such as Query.
g. To run the Query operation, specify the Session Id in the header parameter, received through the login operation test.
h. Now specify the query using SFQL (Successfactors query language) and also specify the name and value parameters as specified in the screenshot.
i. Trigger the request.
j. Response is received with the first 5 users from the User entity.
2. Generate the XSD for SF entity PerPersonal.
The SFSF adapter generates an XSD file every time you perform an operation. You can use this XSD file for mapping purposes.
a. Launch the Eclipse IDE. During the launch, ensure to specify the correct workspace. If multiple Eclipse tools are installed in the system, then it is advisable to specify a separate workspace for every release of Eclipse. This is to avoid any confusion with other releases or with other tools such as NWDS.
b. Install the Operation modeler. To install, first open the Eclipse IDE and click on Install new software.
c. Click on Add and Specify the repository name and location. Please specify the relevant Eclipse release at the end of repository location. In this scenario it was luna.
d. Tick the SAP Hana Cloud Integration Tools and click on next.
e. Review the items to be installed and click on next.
f. Accept the license agreement and click on finish.
g. Click on Yes once you get the prompt for Eclipse restart.
Please refer to the SAP Help in the reference section for installing the operation modeler.
h. Create a new project. To create a new project, open the Integration designer perspective in the Eclipse IDE. To do so, click on Open other perspective under the windows menu, and then click on Integration designer.
i. Click on New and then Integration project under File menu option.
j. Specify the project name and keep the project type as integration flow.
k. Specify the integration flow name and keep the pattern as Point to Point. Click on finish.
l. Depending upon whether the SFSF adapter is to be used on Sender / Receiver side, click on the corresponding communication channel. In this scenario, SFSF adapter will be used as Sender adapter hence click on Sender communication channel.
m. Click on browse on the Adapter type input help and select the Successfactors adapter.
n. Click on Adapter Specific tab and then on Model operation.
o. Specify the SF URL, Company name, user id and password and then click on next.
p. Select the relevant entity and then click on next. In this interface “PerPersonal” entity is used, which contains user details such as first name, last name, gender, marital status etc.
q. Select the Operation as “Query” and the fields to be used in the interface. Operation modeler automatically creates the SFQL query. Please take note of this SFQL query for future reference.
r. The next two steps can be used to configure the filters and the sorting criteria for the SFQL query. We are not considering these two steps for the sake of ease in understanding wrt to our scenario. Click on finish.
s. The operation modeler generates the xsd.
t. Refer to the xsd file, which is now available at the specified location. Right click on the XSD name and download it to a location in your machine.
3. Configure design time objects in ESR.
a. Create a namespace.
b. Create an external definition and import the xsd, as created in step 2 above.
c. Observe the field names in the external definition after import.
Note: Steps such as creation of a new Product, SWC, installation of SWC on the SAP HR business system, creation of a new namespace are not covered in this guide.
d. Create an Outbound Asynchronous interface and assign the relevant request structure.
e. Create an Inbound Asynchronous interface and assign the same request structure. For ease of understanding, the structure on the receiver side is kept same as that from sender side.
f. Save and activate the ESR objects.