
If you enjoy my blogs, please let me know by clicking on the Kudo button just above! Your support inspires me to write more.
Recently, my friend Alex, a compensation consultant, approached me with an interesting problem. He said, "Stéphanie, I have a client who needs to determine the percentage of yearly presence for compensation purposes, so I can pro-rate the compensation calculation based on their presence rate. Can you think of something?" To which my response was, "Challenge accepted!"
In this blog, I'll share the Proof of Concept (PoC) I developed for Alex. It calculates the total number of days of absences (from time-off) and the presence rate for each employee for a specific year. Once this data is made available (in a custom object), Compensation Planning can work its magic with it. Although, to my knowledge, this PoC was not implemented, I thought it was too cool not to share and let it sit on a shelf!!
The solution is straightforward. I'll assume that if you're reading this blog, you have a basic understanding of creating custom MDF objects, rules, and attaching them to the object. So, let's skip to the important and fun stuff!
What I'm proposing is creating a custom MDF object (without an effective date). We'll add two decimal fields to it: one to store the number of absences in days (this field is technically optional, but it helps to explain the concept when both fields are visible) and another to store the attendance rate for the previous year (in this case, 2024), as shown below:
Once the object is created, you can add it to your People Profile (or, in my case, the Full Profile — how modern of me in early 2025! 😄).
Next, it's essential to know which rule functions are available. It's always a good practice to review the "Implementing Business Rules in SAP SuccessFactors" guide periodically, especially the Function A-Z section, or to check the Change History section for new features (yes, I really do that).
Let's try using a function that seems appropriate for this case and see the results. (Remember, this is a proof of concept—there might be a better function to use, but this one will do the trick for now!):
Count Number of Leave of Absence Days() | This function calculates the number of days for a given period of time. |
Let's build our rule for 2024. In the first field, we'll count the number of days of absences in 2024. In the second field, we'll calculate the "Presence Rate," which is defined as:
where the Absence Rate is calculated as:
And then let’s assign our rule On Save in our beautiful custom object (as shown in my first image). Time to test:
Our Absence Count shows 0 days of absence and a presence rate of 1 (or 100% present). Great!
Now, let's test when adding an absence:
Our Absence Count was updated to reflect 31 days of absence (the entire month of December 2024), and the presence rate was adjusted accordingly. Good again! It seems to work well.
The last step is to make the object available for all employees who were present in 2024. This is quite simple: you just need to create an import file for our custom object with the employees' IDs. The "On Save" rules will be triggered during the import, updating all employees in the file with their absence count and presence rate. Here is a sample of a one-line import and the result:
I presented the simple version of the solution to Alex, to which he replied: "But Stéphanie, can you exclude some absences from your count? I need more flexibility. Also, if an employee was hired during the year, can you count the period before they were hired as an absence?". To which my response was, "Ok then, challenge accepted…again!"
There are numerous rule functions available for handling absences in SuccessFactors, such as:
Get Absence Days() | With this function, you can calculate how long an employee has been absent within one year for a specific time type. |
Get Absence In Days For Period() | This function calculates cumulated absence days for the given date period and a given time type. |
Get Absence In Days For Period Based On Calendar Days For Time Types() | This rule function calculates the total number of absence days in given duration for the time types provided. |
Get Absence In Days For Period Based On Working Days For Leave Of Absence Time Types() | This rule function calculates the number of absence days during a given duration for the given time types. |
Get Absence In Days For Period Based On Working Days For Time Types() | This function calculates the cumulated absence days for the given duration and given time types. |
Get Absence In Days For Period Based On Working Days For Time Types Excluding Weekdays() | With this rule function, you can exclude the weekdays of your choice when getting the sum total of absence days |
Get Absence in Days For Period with Threshold() | This rule function calculates the sum of absence days in a given period for the time types provided where individual Employee Time duration exceeds a given threshold value. |
Get Absence In Days Or Hours For Period Based On Deduction Quantity For Time Types() | This rule function calculates the total deduction quantity, in days or hours, for absences in a specified period and with the specified time types. |
Get Absence In Hours For Period() | This function calculates cumulated absence hours for the given date period and a given time type. |
Get Absence In Hours For Period For Time Types() | This function calculates the cumulated absence hours for the given duration and given time types. |
Get Completed Months Of Time Types In Period() | This rule function calculates the number of complete months for which the employee was absent in a given period for the time types provided. |
Get Number of Absences for Period for Time Types() | This function calculates the number of absences of a list of time types within a given period. |
(my point being, you can do a lot with rules when you explore the available functions and experiment with them!)
The function to use to count days of absence for specific time type (absence) is Get Absence In Days For Period Based On Calendar Days For Time Types().
For employees hired in 2024, we'll count the days between January 1, 2024, and their hire date, adding this sum to our absence count.
I implemented these three calculations as variables:
Now, we'll set up two conditions:
Now, let’s test!
Paternity Leave (6003) is not included in our absence count. Let’s see the result of our object when an employee goes on Paternity Leave:
Long Term Disability (6001) is included in our absence count. Let’s see the result of our object when an employee goes on Long Term Disability:
Finally, for employees hired during the year (2024), the days prior to their hire are included in our absence count. Let's see the result of our object for an employee hired on July 1st, 2024:
There we go, challenge resolved! Now, we just need to load our import file again to update the values for all employees.
I went back to Alex to present the intermediary version of the solution. Alex said, "This is great, Stéphanie! I could use this in compensation planning. But for 2025, can you make your object reflect live calculations as time passes?”. Truth be told, Alex did not push it there, but I thought it would have been a good follow-up question. I also wanted to implement this it because it would look better in my demo system 😊.
So, here it goes...
For the expert mode solution, we'll create two new fields for the year 2025 (the ongoing year at the time of writing this blog) on our custom objects.
Here is a look at our variables, what they do, and where we will use them in our rule:
And now, the rule itself! (It's starting to look a bit more complicated, but remember, we're in the Expert version of the solution!):
What's left is to trigger the rule automatically every day so that the counts and rates get updated as time passes in 2025!
To achieve this, we'll need to use a mix of Integrations in Integration Center and Intelligent Services. I won't go into the details of Integration Center and Intelligent Services here (this blog has already taken way longer to write than planned), but I like the setup with the following three integrations:
Absence Count – Intelligent Service - Hire | Trigger: Hire intelligent Service |
Absence Count – Intelligent Service – Time-Off | Trigger: Time-Off intelligent Service |
Absence Count – Schedule Daily Job | Trigger: Schedule daily job |
Now, just ensure your intelligent services (hire and time-off) are set up to trigger the integrations mentioned above and schedule the third one. And there you go! The custom objects will reflect live data and get updated every day. Expert mode solution in a nutshell!
To finish…
First, the goal of this blog was to demonstrate how to make absence/presence pro-ratio data available in SuccessFactors for use in the Compensation Planning module. I presented three solutions to achieve this. I've developed these as proof of concepts and never had the chance to implement them. So, if you get to use this solution, please let me know. It will make me happy to know it was useful!
Second, many thanks to my friend, Alex Rodriguez, for bringing me these challenges every now and then!
Lastly, I just want to say that now I know how hard it is to keep it short when writing a blog about time 😉!
Cheers,
Stéphanie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
4 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |