Employee Central Integration with Cloud for Customer via CPI – Part III

In this blog we will see how to do an extension for the employee central integration with Cloud for Customer via CPI scenario. We will only look at the steps required on C4C and SAP Cloud Platform, integration service (CPI).

Extending CompoundEmployee API on EC side is out of scope.

Steps in C4C

Currently extensiblity is only supported for PersonalDetails node of the interface Replicate Employee from SAP Business Suite.

Adding an extension for Employee is a 2-step process in C4C. First, we need create and add an extension to the staging BO and then add the extension to the Employee BO.

To add an extension to the staging BO, open the OWL Employee Master Data Replication in the Administrator work center view. (Navigation Path General Settings->Data Integration-> Employee Master Data Replication)

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

In the Employee Master Data Replication OWL, select any employee and click on edit to open the OIF for the employee.

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

To add an extension via Key User Tool (KUT), Click on Adapt-> Edit Master Layout.

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

In the instance floor-plan navigate to facet Biographical Data and under the Details section add a field

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Now create a new extension field (in this example we are creating an extension field called Job Profile)

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Select the newly added extension field and click on Apply, to make the field visible under Details section

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Now we need to add this extension field to the web service. Using change property option click on Field Definition

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Navigate to the EXTENSION SCENARIOS facet and add the field using the action button Add Field (You should be edit mode)

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Now navigate to SERVICES facet and add the extension field to the web service. Make sure to add it for both services HumanCapitalManagementMasterDataReplicationEmployeeMasterDataReplicationIn and HumanCapitalManagementMasterDataReplicationEmployeeMasterDataReplicationWithCodeListMapIn

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Save the changes for the field, this will make the extension field available in the WSDL that we can map in CPI.

Download the updated WSDL for the inbound service Replicate Employee from SAP Business Suite in communication arrangement Employee Replication using Intermediate Staging Area from SAP Business Suite

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

After downloading to your local system, rename the WSDL file. I have renamed it to Employee_Replication_In_extended.wsdl (it is important have .wsdl extension for the file).

To make the extension field available in the Employee screen, add the Extended field to the Employee TI in the adaption mode in People Work Center.

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Steps in CPI

For this blog we will manually replicate an employee from Employee Central, so we will add the WSDL to the iFlow, Replicate Employee manually from SAP SuccessFactors Employee Central in the CPI package SAP Hybrid Cloud for Customer Integration with SAP SuccessFactors Employee Central.

Do note we need to use Eclipse tooling with Cloud Integration plugin to enhance the iFlow.

Add the downloaded WSDL file in eclipse under src.main.resources.wsdl folder.

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Open the mapping SFSF_COD_EmployeeReplication.mmap and replace the target element in the standard mapping with the target element from extended WSDL

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Select the element (message type) EmployeeCompleteMasterDataReplicateRequest from the option

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Now go to the definition tab and on the target element navigate to our extension element. (/ns0:EmployeeCompleteMasterDataReplicateRequest/EmployeeCompleteMasterDataReplicateRequest/CompleteEmployeeMasterData/PersonalDetails/ns12:JobProfile)

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Here I am mapping it from a constant value (Presales Specialist), but in real scenario this can be mapped from an extension element of CompoundEmployee

Save iFlow changes and deploy the iFlow.

Outcome

Now in C4C, we can see the Job Profile extension field populated in the replication request.

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

Once the employee is replicated from staging area, you should be able see the mapped value for extension field in the Employee screen as well.

SAP Hybris Cloud for Customer, SAP Cloud Platform Integration tools, SAP SuccessFactors Employee Central

For initial and delta load of employee data from EC, adapt the mapping in the iFlow Replicate Employee from SAP SuccessFactors Employee Central as well.

Rating: 0 / 5 (0 votes)