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: 
istvanbokor
Advisor
Advisor
How to group SAP SuccessFactors employees based on their hireDate attribute via Identity Provisioning into Identity Authentication user store?

The goal to achieve in this blog is to group SAP SuccessFactors employees based on their hireDate attribute. If the hire date is today or already passed, users should go to the 'ExistingEmployees' group in Identity Authentication. If the hire date is further than today, the users should go to the 'ToBeEmployees' group.

1. SAP SuccessFactors source system - Identity Provisioning


In Identity Provisioning, for SAP SuccessFactors source system add hireDate value to the sf.user.attributes property, so that Identity Provisioning will load (read) this user attribute from SAP SuccessFactors. Remember, the extra attribute has to be separated by a comma.


Add the following mapping to the SAP SuccessFactors source system transformation into the User part:
 {
"sourcePath": "$.hireDate",
"targetPath": "$.hireDate",
"functions": [
{
"function": "manipulateDate",
"sourceDateFormat": "Date(milliseconds)",
"targetDateFormat": "yyyy-MM-dd HH:mm:ss.SSS"
}
]
},


The manipulateDate function converts one date format into another after JSONPath transformations: In our case, it reads the given date in Unix Time Stamp format (in milliseconds) and writes the converted value in the target system as a standard Java date format. More info: Transformation Functions.

2. Identity Authentication target system - Identity Provisioning


Add the following mapping to the Identity Authentication target system transformation into the User part:
 {
"condition": "($.hireDate < '${currentDate}')",
"constant": "ExistingEmployees",
"targetPath": "$.groups[0].value"
},
{
"condition": "($.hireDate >= '${currentDate}')",
"constant": "ToBeEmployees",
"targetPath": "$.groups[0].value"
},


These mappings will assign the user groups to the users who are applying the given condition.

3. Identity Authentication


In Identity Authentication Administration Console, create the two user groups:

  • ExistingEmployees

  • ToBeEmployees


4. Identity Provisioning


Run a new Read job from Identity Provisioning from SAP SuccessFactors source system, and monitor in Identity Authentication that the employees are getting assigned to the desired groups.


I hope that this example will help you to discover grouping possibilities based on dates.
10 Comments