Human Capital Management Blogs by SAP
Get insider info on SAP SuccessFactors HCM suite for core HR and payroll, time and attendance, talent management, employee experience management, and more in this SAP blog.
cancel
Showing results for 
Search instead for 
Did you mean: 
NeeleshKamath
Product and Topic Expert
Product and Topic Expert

Overview


In most industries especially in health care, their employees are spread across different geographical locations and they need to meet some customer policies. Their important ask is Attendance marking in SF EC module. They would like to trigger a notification mail by the next day's early hours if employees haven’t marked their attendance for the previous day.  And this is a recurring mechanism that needs to take place for employees every day. And further, we have these complications: Do employees have a full day absence or partial day absences in the previous working day? Is the previous day a planned working day as per the work schedule? What happens if an employee records a partial day absence? What happens if the employee records a partial working time?

Below is a solution that can be used to tackle such requirements and constellations.

Disclaimer: The below is one of the solutions. You can have multiple customizations and some other ways of doing this. Please evaluate according to your requirements

Design


Create a custom MDF that has the following fields


User -> External Code

Previous working day -> Date

Has Time Records or Not a Planned working Day-> Boolean Yes/No


The custom MDF will be used as a tracker object which basically tracks if the employee has recorded times if the previous day has planned working time as per the employee’s work schedule



Create the below on Save Rule


 

 

 




The on Save rule basically checks the following

  • If previous day has planned working time. If planned working time is zero (like weekends), it does not process the emails and the flag is stored as yes

  • If there is a vacation and recorded working time on previous working day. It checks for all combinations of partial day absences and partial day time recording etc. Based on the situation, we store the flag as yes/no.

  • The flag value would be then used to trigger alerts to employees/managers.


 

Please note, this is a sample rule and you can add any number of time types to the function Get Absences for period. Moreover, you could also use additional attendance time types for recording such as Overtime, Business Travel etc. This needs to be created as additional variables and included in these if clauses above. Just extend the pattern that I have used in above rule

 

Alert Rule


 

Create an Alert Rule like below


The Alert Rule has to be attached to Post Save hook of the Custom MDF

Integration Center


 

An integration Center Report is created with Starting entity as “USER” and our “Custom MDF” as the target entity.

Drag and drop the user ID from USER to External Code (User field) of Custom MDF.

Also, ensure that you use operation as Upsert Single/Multiple in IC


You can add filters for ex: to run this only for a subset of employees

I have added a filter to run this for only a particular LE


Schedule the IC , every morning after 12AM Server time

TESTING


 

Today is Oct 21st, 2021 and we need to check for Oct 20th 2021

Run the IC for the employees


MDF records should be created or updated like below


User 1 has recorded time on 20th Wed


No Email Received as the employee has times recorded on previous working day

User 2 has no time recorded on 20th


Email received


User 3 has a full day absence on 20th



No Email Received as employee was absent for whole day

User 4 has a partial day absence, but no time sheet recorded for the remaining time



Email Received as employee is expected to work for remaining time


User 5 has both partial absence and 4 hours of time recorded on 20th


 

No Email received as the employee has worked for some part of the day

 

Part 2- Notifications for Pending time sheet in previous weeks


A similar requirement to the above feature which is commonly asked by many customers is to send an alert to the employee if there is a pending timesheet in the previous week i.e employee has not submitted the timesheet for the previous week for approval.

 

I will basically highlight some design aspects here for you to work on.

Create a similar custom MDF which looks like below with external code as USER field


Create an integration center report with the below design

The starting entity should be the employee time sheet and the user field from the time sheet object should be mapped to the external code field of the custom MDF


Create the below filters


We need to check only those records which are in "PENDING" state and where the start date and end date lie in the previous week range.

Finally, if the timesheet week period is from Monday to Sunday, make sure you run this IC every week on Monday or Tuesday

Further, Create an alert and workflow mechanism to send out alerts just as described in the above sections.

 

TESTING

The user has not submitted the previous timesheet record from Nov 1 - 7


When we run the IC on Nov 8th (next week), an email is sent out to the user as an alert


Hope this mechanism helps in your implementation projects

Stay Safe & Healthy

Neelesh

Senior Product Specialist, Best Practices for SF

Successfactors Product Management

SAP Labs
49 Comments