Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 

Hello,

One of two Scenarios for Integration between SuccessFactors Intelligent Services to SAP Cloud Identity using SAP HCP-Integration Service (HCI) is for New Employee.

Business Requirement:

When a new Employee is created(New Hire) in SuccessFactors system a corresponding User should be created in SAP Cloud Identity.

Scenario in Detail:

As soon as a New Employee is created in SuccessFactors, an Intelligent Services Event can be triggered. SAP HCP-Integration Service(HCI) Web service, the subscriber of this event is called and a custom integration iFlow is triggered. The Custom integration flow calls SAP Cloud Identity and creates a corresponding user. The created User detail is sent back to SAP HCP-Integration Service which sends a success/fail message to SuccessFactors.


Prerequisite:

Please refer the Main Blog ( Integration of SuccessFactors Intelligent Services with SAP Cloud Identity using SAP HCP-IS(HCI) ) in the series, to see the Prerequisites to continue.


Custom iFlow:

Process Overview.


1. Deploy User Credentials: Deploy Users for SuccessFactors and SAP Cloud Identity onto the SAP HCP-Integration Service tenant (HCI)

    • In Eclipse Open the Integration Operations Perspective to see the SAP HCP-IS(HCI) tenant node.
      • Deploy the SCI technical user credentials (user/pwd) onto the SAP HCP-Integration Services (HCI) Tenant. This user should have authorization to create user on Sap Cloud Identity. (Integrations Operations--> Deploy --> Deploy Artifacts --> User Credentials --> Enter Sap Cloud Identity Technical User Login Details)
      • Similarly Deploy the SuccessFactors user Credentials. This is used to fetch detailed Employee Data from SuccessFactors

                   

2. Integration Project: Create a New Integration Project with Point-to-Point Channel n Eclipse.

   

3. Import the SuccessFactors Intelligent Services Event wsdl into the project (See Prerequisites). This is needed to define the incoming payload format.


4. Import the xsd file that represents the SAP Cloud Identity user creation (See Prerequisites). This is needed during mapping step.

5. In Eclipse in the Integration Designer, click on empty canvas. Enter the Runtime Configuration --> NameSpace Mapping (will be available in the SuccessFactors wsdl)

6. Add a Sender element to represent the Sender Endpoint, SuccessFactors New Hire Event. Set the Authentication mode to Role-Based Authentication( this authentication is used at the sender side during event trigger to trigger iFlow/Endpoint URL)


7. Add a SOAP Channel from Sender into the HCI Integration Process Start Event and enter SOAP Adapter details. This creates the Endpoint URL. Use the imported successfactors event wsdl (See Prerequisite : that describes format of incoming payload)

8. Extract User ID: The incoming payload has the SuccessFactors New Employee User ID. This needs to be stored. I added a Content Modifier to get the value of the User ID.

9. Read Employee Data from SuccessFactors: Once the User ID is available, add step to read Employee data from SuccessFactors like Personal Information, Address Information, Email Information, Employment Information etc., based on the incoming User ID. Some of this information is needed to be sent to Sap Cloud Identity to create a user

In the iFlow I added a Request-Reply Step. A Receiver representing SuccessFactors. A SuccessFactors Adapter Channel between these two.

A query is written to pull SuccessFactors Employee Data (Compound Employee) based on the incoming userID

Example Query. Entity: CompoundEmployee

Operation: Query

Query : SELECT person, personal_information, address_information, phone_information, email_information, employment_information FROM CompoundEmployee WHERE person_id_external = '${property._userID}'

   

10. Mapping: The previous step creates xsd already (this represents the source). Target xsd (Create_User)was created (Prerequisite) and imported in the Project.

  Map the result of Compound Employee Read onto the SCI user creation fields. The two important fields used in this scenario on the target are userName and emails -->value

11. XML to JSON conversion: The mapping results in an xml but SAP Cloud Identity user creation needs json format, hence I used a XML to JSON Convertor

12. API to create User on SAP Cloud Identity: Add step to write the User data to SAP Cloud Identity. In the iFlow I added a receiver to represent Sap Cloud Identity. A HTTP channel, to POST data with Basic Authentication on the URL  https://<tenant ID>.accounts.ondemand.com/service/scim/Users

(Documentation for REST API to create User can be found at SAP Cloud Identity Service)

13. Sap Cloud Identity Reponse: To identify if User was successfully created in Sap Cloud Identity.The response from Sap Cloud Identity can be stored in a Content Modifier header.

  A Router can then be used to verify if a P User was created onto SAP Cloud Identity.

14. Response back to SuccessFactors: If User is created on Sap Cloud Identity, then send a Success response back to SuccessFactors. A Content Modifier can be used to build the content for response. Please refer to the SuccessFactors Intelligent Services Event Guide to check the most recent Response format

My completed iFlow looks like this:

15. Execute Checks. Save the iFlow. and Deploy it onto the tenant.

16. Note he Endpoint URL after Deployment: In the Integration Operations section, Under the Tenant Nodes IFLMAP,

17. Event Notification Subscription: Logon to SuccessFactors. The Endpoint URL from previous step must be maintained in the SuccessFactors Event Notification Subscription Tool. Mention the Subscriber (Created via Business Rule). In Authentication, Enter User/Password for SAP HCP-IS (HCI) tenant.

18. Now when a New Employee is created in SuccessFactors, a corresponding User will be created in SAP Cloud Identity.

The Employee should get an email from the SAP Cloud Identity to Activate their User.

This roughly explains the Process Step needed for simple Integration between SuccessFactors Intelligent Services and SAP Cloud Identity.

Thanks and Regards,

Sunita

3 Comments