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
3,649

If you have a business scenario where you would like to not just send alerts to managers, admins via time valuations but also email notifications to respective managers , admins then this blog is meant for you

There could be various uses cases like:

  • Alert managers, in case their employees have collected a certain amount of overtime hours (e.g. 40) over a certain time period
  • Late Comers, Early Goer alerts to managers
  • Rest period violation alerts
  • And the list goes on

We all know to create innovative and creative time valuations to send these alerts. But these alerts are restricted to Time management UIs like Time Sheet UI, Admin Alerts UI etc from where managers and HR Admins have to view them.

Ever wondered how we can further extend them in such a way that they not just see them in UI but also receive meaningful emails. Many partner friends had reached out to me seeking a way to achieve this

Well I have an idea and a solution to do this via Integration center and custom MDF. Go through my blog below to explore the solution

 

Disclaimer: This is a custom solution using IC and Custom MDF. Please do your due diligence in testing them and deploying them accordingly

To demonstrate this, I would use a use case of late comer's time valuation alerts. In General, this can be used for any time valuation alerts.

Create a custom MDF to store late comers info

 

NeeleshKamath_0-1714574246259.png

 

Add two custom fields

External code : type user to store user for whom alert is created

Cust_date : date field to store the alert date.

 

On Save rule attached to above MDF

 

In below rule you look up time valuation alert with group code relevant to your later comer info in time valuation . Please note all alerts are stored in MDF objects. For example a time valuation alert will be stored in MDF object ‘Time Valuation Alert’

For example I have configured the late comer alert logic in the below time valuations. The time type group below "LATECHECK" has the info if the employee was late or not on a particular day.

 

Please note : The purpose of the blog is not to explain the time valuation setup. If you are looking for each and every detail on how time valuations work and how they are configured, We have different resources for that.

The below is a sample time recording profile and list of time valuations. I am not going to explain each and every time valuation. I am stating the screenshots just for your info.  For now just remember the points I said above

This should work in general for any time valuation which raises an alert in Time type group above or below

NeeleshKamath_0-1720618216038.png

 

 

NeeleshKamath_1-1720618216042.png

 

 

NeeleshKamath_2-1720618216045.png

 

 

NeeleshKamath_3-1720618216049.png

 

NeeleshKamath_4-1720618216052.png

 

 

NeeleshKamath_0-1720619619472.png

 

The above highlighted time type group below (LATECHECK) stores the info/alert on late comer

 

NeeleshKamath_6-1720618216058.png

 

 

NeeleshKamath_7-1720618216062.png

Hence the rule will do a look up on Time Valuation Alert MDF Object which has a time type group with external code “LATECHECK”

 

NeeleshKamath_2-1714574246266.png

 

 

Post Save Rule to Send Alert

Write the below rule for sending alerts based on the alert date set on Custom MDF.

Attach the rule to Post Save hook of custom mdf

NeeleshKamath_3-1714574246272.png

 

 

Final Integration Center

 

Create a SF to SF Object Integration Center Report with  below details

Starting entity is USER

Target Entity is the custom MDF (as created above)

Map the user id field of USER Object to external code of MDF

NeeleshKamath_4-1714574246279.png

 

Operation: Upsert Multiple OR Upsert Single

Filter: You can add filter employees based on Job info attributes like time recording profile, Legal Entity etc.

 

Run the IC on a daily basis.

 

How this works?

  1. IC runs and creates/updates MDF on a daily basis
  2. On save rule is called on MDF and checks if there is a late comer alert with relevant time type group that day. If yes store the date
  3. If the date = today, an email is sent on the same day

 

TESTING

 

The sample employee clocks in late today say on May 1st 2024

NeeleshKamath_5-1714574246285.png

 

 

You see an alert in the UI

Now we need to notify the managers not just from UI but also send an email notification

An equivalent MDF record is created for this alert which can be viewed from manage data screen as shown.

NeeleshKamath_6-1714574246289.png

 

 

Now Run The IC to map this record to custom MDF which sends emails

NeeleshKamath_0-1714741385863.png

 

The custom MDF is updated for this user

NeeleshKamath_7-1714574246290.png

 

 

And an alert email is also sent once IC is run

 

NeeleshKamath_8-1714574246292.png

 

 

Say another employee also records a late comer event on May 1st

NeeleshKamath_9-1714574321347.png

If you have a similar requirement at your client, you can explore this method and test it

If you have any further ways to improve this, please do comment

Thanks

Neelesh

 

18 Comments
PetraRana
Participant
0 Kudos

@NeeleshKamath thank you very much for a very interesting blog. Can you please advise whether this solution requires Time Tracking Licenses? Thank you. 

NeeleshKamath
Product and Topic Expert
Product and Topic Expert

Hi @PetraRana Thanks for the feedback. Yes the solution that I have built works for time tracking

But I assume it should work for normal time sheet alerts too as long as these alerts are persisted in time valuation alert object. You can give it a try

caiogarcia
Explorer
0 Kudos

It would be nice if you could have included how you went about creating the time valuation in as well

NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos

@caiogarcia - Can you please see the purpose of the blog? As highlighted the purpose of the blog is not to explain the configuration of time valuations..We have different resources for that including implementation guides.. The purpose of the blog is to showcase how one can send email alerts for any time valuation which raises an alert. It can be any time valuation where an alert is raised on time type group above or below..But since you have insisted, i have jotted down the time recording profile and all time valuations used in my case

caiogarcia
Explorer
0 Kudos

ok thanks, that is actually very helpful 🙂
also why do you need to create that custom MDF object? Couldnt you have created the alert rule to trigger straight from the "Time Valuation Alerts" object?

caiogarcia
Explorer
0 Kudos

this just doesnt work, Im afraid. 

Im not sure what is missing from your guide but I've followed it line by line but nothing happens. the information doesnt go from Time Valuation Alert to the custom MDF object nor the alert triggers.

 

NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos

@caiogarcia  - This has already worked for many partners including us..I have personally helped two partners to achieve this .. you would need to check the config and troubleshoot. Just stating it does not work does not make any sense without sharing any trouble shooting steps you have undertaken nor checking business rule trace

If the data is not moving to MDF , it could be due to

1) The time valuation alert MDF object is not created as of today. Check in manage data if you have a one for today and for the user you are testing

2) IC is not configured correctly and mapped. 

3) the rule is not configured correctly ( Business rule trace) 

4) the custom MDF needs to be updated once the IC is run for today. If there are time valuation alerts with date as today, you will see the IC moving that

I am not sure why its not working for you..If you have better ideas/solutions, please proceed ahead with your own stuff

caiogarcia
Explorer
0 Kudos

@NeeleshKamath thanks for your reply:

3) the rule is not configured correctly ( Business rule trace) - the rules dont even trigger.

1) The time valuation alert MDF object is not created as of today. Check in manage data if you have a one for today and for the user you are testing - because of the above there is nothing being sent over onto the custom MDF object

vamsikrishnam1
Explorer
0 Kudos

Hi Neelesh,

Yes, You are right. Its worked me well. Did not see any issue my side.

@caiogarcia I have implemented above blog requirement and Its worked fine for me without any issue.

You would need to check config once again if anything missed out.

Thanks & Regards

Vamsi

NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos

@vamsikrishnam1  - Thanks for the feedback. Appreciated. I know it should work if configured correctly like in your case. 

 

 

caiogarcia
Explorer
0 Kudos

@NeeleshKamath ok I got it to work - the issue was with the config in IC. A few extra screenshots on the IC config wouldn't have gone amiss but all in all thanks for your help

EvangeliaP
Participant
0 Kudos

Hi @NeeleshKamath should the Time Valuation you use for your Alert, be of that specific Valuation Type and always saved on the Time Type Group Below, for this to work?

I am trying to generate this with a simple Time Valuation which gathers all Hours above 10 Hours (so Valuation Type: Aggregate and Time Type Group Above, and this does not seem to work..!! The issue is on the result of the Save Rule, I don't get any results there...

Thanks!

BR,

Evangelia

Miriam5
Explorer
0 Kudos

@NeeleshKamath : amazing solution! Thank you so much! I have a question though: In our case we would like to send a email to the manager every time an employee is entering more than 10 hrs a day. The time valuation takes care to find the cases and creates an alert - so far so good. Now, when one employee is entering times for several days (each day more than 10 hours) on one specific day (lets say on Monday he records the working time for the whole past week), I assume, it will not be able to send out more than one mail per day - right?
Do you have an idea on how to solve it? 

Thank you so much!

 
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @EvangeliaP - As per my understanding , it should work for any time valuation alert irrespective of whether it is stored in below or above. Having said this, the main object in on Save rule where we do a lookup is Time Valuation Alert. Can you check in Manage Data if the alert object for that day exists for that user? If it does not, that is the cause

Perhaps you can change the alert message type from error to warning and check as well. Please check if your alert for user is present in manage data. That should help you to figure out the root cause

Thanks & BR

EvangeliaP
Participant
0 Kudos

HI @NeeleshKamath thank you very much for your prompt reply! It is very strange, I have everything from A-Z same as your solution above. BUT what I realized, is that I actually had to first create a record with the User on the custom MDF Object, Before I could actually be able to get any results...! Why?? the IC job has Upsert Multiple, which means both Insert/Update, right?? 

This is very strange..

BR,

Evangelia

NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos

@Miriam5 - Thanks for the feedback. 

Yes the solution can handle one email per day for an alert. Unfortunately, I am not sure how your use case of past week can be covered

 

NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos

@EvangeliaP - Thats strange..May be a one off case because some partners found it working without creation issues.

Perhaps you can try with "Upsert Single" as operation. It is safer and much reliable.

Upsert mulitple can fail sometimes for ex: 2 users in a batch of 100 fails, entire operation fails

BR

Neelesh

Vaishnavi25
Explorer
0 Kudos

Hi @NeeleshKamath ,

Thanks for the wonderful blog. It is really helpful.

I have a question, As per your blog, when user enters something today then alert would be sent out(as you have given condition time valuation date today()) in on save rule, but we have time recording admissibility of two weeks so how to send out mail when someone entered something in past weeks.

 

Best Regards