Human Capital Management Blogs by SAP
Get insider info on HCM solutions 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

Most of the customers have a common requirement to send alerts on employee’s service anniversary date. You could find various ways of achieving this using custom MDF, custom Jobs like Integration center, Custom Integration using HCI, etc.

In the below blog, I am going to demonstrate an approach which is not only simple and effective but does not need any custom MDF or custom process saving customer’s implementation time and cost. This approach makes use of standard EC objects and EC Jobs.

The blog makes use of following process

    • EC Employment Details Standard Object

 

    • Bizx Off Cycle Event Batch Job

 

    • EC Alerts and Notifications Framework



Important Note: Please don't create a support ticket in our queue, if you are modifying or changing the below best practice config. If you are modifying the rules, we cannot support your issues since this would be done by someone else and we are not sure what was the intention behind those changes

Without wasting much time, lets get started on the process

 

EC Employment Details Standard Object


In standard EC employment details add a new custom field named “ Number of Years” of type Long

Bizx Off Cycle Event Batch Job


Go to manage data and create new Off Cycle Event Batch as shown below



    • Create a new Associated Rule to calculate number of years:





    • Select Base object as Employment Details

 

    • Off Cycle event batch user group: Create a new group if not already there. To create new go to admin center and search “Manage Off Cycle Event Batch Groups” .Sample Group is shown below





    • Select filters as shown above for each anniversary year. Hire Date equal to offset 1 year, 2 years, 3 years and so on

 

    • Set Frequency as Daily



This concludes creating off cycle batch

EC Alerts and Notifications Framework


Create an Alert Message for each year of anniversary. You can create one and use copy paste and mass import using MDF import and export. For simplicity case, I have created for two years of anniversary





Create an alert workflow to be sent to the employee



Create a new rule to send alerts and attach it to employment details



Testing


Neelesh Ben2 is an employee who was hired on 15th Sep 2018 and today is 15th Sep 2019. He has completed 1 year of service.



The sequence of jobs to be run in provisioning is very important. First, we need to run Bizx off cycle event processing Job and then EC alerts and notification Job. Make sure even if you are scheduling them daily, please schedule them in this order only.

First, run the Off cycle job



Please Note Very Important Alert: Bizx Daily Rules batch now is not available in provisioning from 2311. It has to be scheduled from "Scheduled Job Manager" From SuccessFactors Instance(i.e from Admin Center UI)

After this job, the employment details object is modified with the number of years



Now run the EC alerts and notification job on the same day (This would run automatically if scheduled )



You can now check the inbox and alerts would be created



As you can see from above, we are able to achieve this with a simple process by just using EC Objects. There is no additional complexity of Custom MDFs and custom Integration Jobs considering there is an initial limit on 25 MDF objects. This is also performance efficient since it picks up and updates only those employees who have their anniversary on that particular day instead of  analyzing all the users.

Some Important Points

Many partners have tried this solution as of 2024 today and have been successful. But I have also received feedback from few partners that in some cases that the alerts are not processed for few users.  I am jotting some tips and ways to fix them . If you follow the below points, it will work for all cases. Please note it is not applicable to all. For most of them the standard solution still works. 

Reasons of rule not matching can be one of the below :

  • Multiple jobs scheduled and it failed causing inconsistent results. Please delete the Job which was scheduled second time . Only one job for EC alerts has to be scheduled
  • Please always check the log of EC Alerts and Notification Job from provisioning. It will give you an idea if the alert was triggered or not.
  • In Some Cases, I see that no alerts were sent since the rule did not match any conditions. The job was scheduled at 00:00 Midnight. This is a bit dicey since the Today() function used in alert rule may not fetch todays date but rather previous day’s date as the server date and today() could vary depending on DC your instance is. Hence Please try scheduling both off cycle and ec alert jobs during mid day i.e 12 PM afternoon onwards. This would ensure both server date and today() can be the same date always
  • OR if you don’t want to schedule the EC alert jobs later and want to have it at 00:00 you need to add one more or condition for alert rule to match the condition where Today() is still referring to previous day and not the exact anniversary date. For those cases this OR condition can be added as shown below

        

NeeleshKamath_0-1711081745909.png

This would ensure that where if the job is run at midnight and one of these conditions are met at job run at midnight i.e either today() is anniversary day or a day previous to it, the alert will be sent. This is a more safer option and alert rules not matching cases should not take place



I would request you to check the above and if you have any ideas to improve this blog further, please provide your valuable comments.

And also please do not forget to hit the Like button (only if you liked it ?)

 

54 Comments
Lopamudrasaha20
Participant
Good one
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thanks Lopamudra
Kaarthi
Explorer
Hi Neelesh,

Great solution document, Thanks for sharing.

Please clarify my doubt here:

where we Associate Alert notification and workflow?

With Regards,

kaarthi

 
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Karthika,

Thanks for your feedback. The alert rule has to be attached in the Data Model/BCUI. The workflow and message are added in the alert rule itself. Please refer to screenshots in EC Alerts and Notifications Framework section

Regards

Neelesh
Kaarthi
Explorer
0 Kudos
Thanks for reply Neelesh,

please correct me if my understanding is incorrect.

So when we give our own text in workflow need to be create notification and call that to in rule with workflow.

Or is there any alternate, assign notification to workflow then we call workflow in rule based conditions.

is it possible add different format and add greeting in notifications?

 

with Regards,

Karthika.

 
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Yes, we create an alert message from manage data. Then we create a workflow with CC role (participants to whom alert is sent).

In the alert rule, we call both alert message and workflow.

Currently, there is no support of adding greeting images in the alert message.

Hope this clarifies your doubt

Regards

Neelesh
Kaarthi
Explorer
0 Kudos
Thanks for clarification?
Hi Neelesh,

Very well-written blog !! Thanks for sharing the info.

 

 

Regards,

Rupsa
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thanks a lot Rupsa!
SridharBV
Explorer
0 Kudos
Hi Neelesh,

Thanks for posting. It works excellent if Offset Unit is Years but not for Months.

Do you  have any suggestions?

Thanks,

Sridhar
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Shridar,

Thanks for the feedback. This is generally meant for service anniversaries where the period is 1,2,3 ... years and so on..Could you please elaborate on the requirement where you need this for months?

Thanks

Neelesh
SridharBV
Explorer
0 Kudos
Hi Neelesh,

Thanks for replying.

Sorry for the delay in my response.We have a requirement to trigger an alert and notification for specific Job Levels once Employee completes 6 Months, 1 year and 1.5 Years based on the Hire date.

So i was trying to use Off Cycle batch but it doesn't work if i keep Offset Unit as Months.

Regards,

Sridhar

 
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Sridhar,

I saw that there is a filter for months as well. I think if they support months as filter, then it should ideally work. I think you can report an incident to SAP portal.

As a workaround, you could try using days as filter. for ex: 6 months is 180 days. It might not be very accurate since FEB has 29 days once in 4 years and the number of days for 6 months can change. But nevertheless, it would work I believe

Regards

Neelesh
SridharBV
Explorer
0 Kudos
Hi Neelesh,

Unfortunately,days didn't work too. Thanks for your inputs.

I will raise an SAP ticket. I have something else as work around,let me know your thoughts on this.

Based on the completion of 6 Months, 1 year and 1.5 Years, the off cycle bath job updated a custom field in Employment Information portlet and then the alert triggers based on alert rules.To achieve this i cannot put a filter while creating Off Cycle Event Batch in manage data,this will check for all the users approximately the time taken to complete off cycle Job run is less than 5 minutes.

Kindly let me know, if i can use this as work around and schedule a job at mid night before alert job runs.

Thanks,

Sridhar

 

 

 

 

 

 
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sridhar,

You mean to say, you will not have any filters in off-cycle event definition. This would then pick all users as you said. But in off cycle rule , you will check for these conditions if employee has completed today 6months, 1.5 years from hire date and update employment details for only those. Is this correct?

Although not an ideal solution without filters, but it should work if number of employees in company is less. If you have measured the performance which is less than 5 minutes and as long as client is fine, it should be OK I guess. (as long as your off-cycle rule only updates those employees who had completed 6 months etc today). This is a must as we do not want alerts job to pick up all employment details records.

 

But I would not recommend this solution for companies having say 400K users or beyond

Regards

Neelesh

SridharBV
Explorer
0 Kudos
Thanks Neelesh,

Please see my response below.

You mean to say, you will not have any filters in off-cycle event definition. This would then pick all users as you said. But in off cycle rule , you will check for these conditions if employee has completed today 6months, 1.5 years from hire date and update employment details for only those. Is this correct?

->Yes

They are just 3000+. I will use this solution for now and later change it.

Thanks,

Sridhar

 
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Shridhar

Just 3000 employees should not cause any issues.

Regards

Neelesh
acabanne
Explorer
0 Kudos
Hello

Thanks a lot for this clear and simple procedure you have shared.

I have followed your steps but my goal is to trigger the alert based on the years of seniority date (standard field) instead of hire date.

The issue is that in Off cycle event batch>employment details I do not have the Seniority as a field filter.

Would you know how to cope with that?

Thanks again
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi , I could see seniority start date in Employment Details in off cycle batch . Can you please check again?

acabanne
Explorer
Hello

Thanks so much for your quick reply.

You are right, the technical field for seniority is there.

What I am looking for there is the "originalStartDate". The client is already live and for some reason uses "originalStartDate" to capture Seniority date...

It feels like all Employment Details fields, even if standard, are not present in the batch and I wonder why and if there is a way to add it there.

 

Thanks a lot for your feedbacks

Jonas_Kyhnau
Explorer
I have the exact same issue 🙂

I want to base it on "originalStartDate" as this might differ from the Hire Date of the records. However, this is not available in Off Cycle.

 

Did you find any solution, Amanda?
former_member101343
Discoverer
0 Kudos
Hi Neelesh,

Work Anniversary notifications are perfectly working on global basis.

Thanks,

Vishal Gupta
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thanks Vishal. Great to know that you were able to apply this concept in your org
Hi Neelesh,

Thank you for this helpful solution. How were you able to add paragraph breaks in the description of your Alert Messages?

Thanks,

Rachel
Susannah
Discoverer
Hi Neelesh,

Thank you, this is a very useful blog.

Can you confirm if this is possible to adjust the rule so the workflow participant is notified 14 days before the anniversary?

im not sure if we can adjust the workflow effective date in the business rule to a date plus..14 days?

Many Thanks

susannah
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Rachel

Thanks for the feedback. Regarding allowing multiple lines in the alert description, you can increase the length of the field in the object definition of "Alert Message" to 4000 from 255. It can then accommodate multiple lines and paragraphs.

Thanks

Neelesh
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Susannah,

Thanks for the feedback..This blog is meant for sending alerts exactly on the anniversary date as this is the most common requirment. If you would like to customize it, please refer to different offsets that can be used for bizx off cycle batch in the implementation guide

"Using Batch Rules Processing with the Off Cycle Event Batch in SAP SuccessFactors"

Perhaps you can use the filter weeks (50 weeks from hire date), considering a year has 52 weeks.

Similarly you will also have to adopt the alert rule to 14 days or 50 weeks from previous hire anniversary . I have not implemented this solution myself. You will have to do a POC on the same

Thanks

Neelesh
former_member69694
Discoverer
0 Kudos
Hi Jonas,

I also have same requirement to trigger alert based on Original start date. Is there any solution?

 

neelesh.kamath : Can you please help here.

 

Thanks.
Efeoghene
Explorer
0 Kudos
Hello  Neelesh,

 

I have followed the steps but did not get any alerts or emails.

 

Are there possible reasons for this not to work?

 

Thank you.
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi,

Please follow the exact steps as described above. It should work as expected. It has worked for many.

Possible error causes

  1. Check your offcycle event batch rule in montior job. Check the log to see if your employee is selected by filter or not. If it is not, your offcycle batch definition could have issues or the offcycle group used has issues

  2. After offcycle batch is run, the number of years should be updated in employment details. Please check if the field is set to be editable and allow import as "yes".

  3.  Please put a rule trace on offcyle batch rule to troubleshoot

NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
We can only select filters that appear in off-cycle batch definition. If you need specific fields which are not appearing there, kindly reach out to customer community or Influence portal with product enhancement
former_member69694
Discoverer
0 Kudos
Thanks Neelesh for quick reply.
mmadalinast
Discoverer
0 Kudos
Hi Neelesh,

 

Is there any solution to exclude the period an employee had while outside of the company - if he has 2 employments with pause in between (terminated and rehired)

 

Thanks!
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
if it is new employment, there will be a new hire date. For new employment, the seniority will count from this new hire date. But You have another date called seniority start date in the employment details. You can store the actual seniority date here (Rehire date - no of active days in previous employment).

Then create an off-cycle batch group for a different set of employees who have been rehired. This off cycle batch would be run on seniority date rather than hire date. It will then send alerts based on anniversary of seniority start date

Make sure you Exclude such employees from the original off-cycle batch (meant for employees who are not rehired).

I guess the above might work. Please try it
former_member749847
Discoverer
Hi Neelesh,

 

This was one of the most effective way and thanks so much for writing this blog.

But there is tricky requirement for the customer that they want the alert 30 days before the 10th year anniversary. Could you please guide me through how we could write this particular type of scenario as a business rule? this would be really helpful for me.

 

Thanks
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Venkata,

Thanks for the feedback. Some one had a similar requirment. I have posted my idea above

"

If you would like to customize it, please refer to different offsets that can be used for bizx off cycle batch in the implementation guide

"Using Batch Rules Processing with the Off Cycle Event Batch in SAP SuccessFactors"

Perhaps you can use the filter weeks (50 weeks from hire date), considering a year has 52 weeks.

Similarly you will also have to adopt the alert rule to 14 days or 50 weeks from previous hire anniversary . I have not implemented this solution myself. You will have to do a POC on the same"

 

In your case too, you will have to work with weeks between hire date and 10 years (30 days before).  every anniversary year has 52 weeks... So for 10 years number of weeks would be 520.. 30 days before is approx 4 weeks lesser..So it would be around 516 or 515 weeks..You can also try with other filters like days ...Thanks

helenmousa
Explorer
0 Kudos
can we do something similar with birthdays? i want to send by email a notification for team/department members about birthdays
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
How do you exclude terminated employees from the off cycle event batch group
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Terminated employees are inactive in the system and as long as their official email is inactive after termination, they won't receive any emails
rvasconcelos
Participant
0 Kudos

Hi neelesh.kamath , thanks for one more great post you made.

I got a doubt. Let's consider we want send this notification up to 5 years anniversary. In the rule you sent (Service_Anniversary_Alert), it create a date using Today's year as the year of date to be compared. I think the 5 years notification will be sent when the employee make 6, 7, 8 years and so on.

I'll try to empty the field after sent the alert in this same rule (Service_Anniversary_Alert). What do you thing about it?

 

thanks

NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thanks for the feedback. If you just need it for 5 years, you can just maintain 5 years in off-cycle batch defintiion. It will not pick up and process remaining years
former_member23662
Participant
Nice document  Neelesh. . however if we don't want to send alert and just create eligibility rule based upon no of years completed then reward amount should be provided. How should we proceed with this rule then? any clue

 

Thanks

Ritanshi
former_member23662
Participant
Thanks Neelesh. Nice blog

My requirement is to capture work anniversary and provide reward based upon no of years he completed. How should i capture this. any clue would help.

 

thanks

Ritanshi
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Ritanshi,

The off-cycle batch which i am using updates employment details object on anniversary date. You could read this object in your eligibility rule
rahulpal
Participant
0 Kudos
Hi Neelesh,

The associated rule to calculate number of years, should be mapped where ? Directly on the field or under employment info and what should be the event Type ?

 

Regards,

Rahul
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Rahul

The associated rule is tagged to Off Cycle batch as specified in my screenshot..The off cycle batch will call this rule when filter conditions are met. You dont have to add this rule to BCUI or data model

 

Regards

Neelesh
0 Kudos
neelesh.kamath  could you use this same logic and create a card on the new home page when the employee logs in to record time? Or on the time sheet when it's their b'day "Happy Bday" message pops up or "Happy Anniversary"??
DannyC3
Explorer
0 Kudos
Hi Neelesh,

Thanks for sharing this idea.  It may be a solution that our organization can use for notifying individuals about their service anniversaries.  I would suppose that the notification could be adjusted so that a notification of an employee's anniversary could be sent to the employee's manager and manager's manager?

 

Regards.

Danny
venkatpisati
Discoverer
0 Kudos
Hi Neelesh,

I really appreciate your blogs on these scenarios. They are very informative and helpful.

I'm confused. You mentioned two rules, but only one rule is assigned to the "trigger rules". Did you forget to add the first rule, or is it not necessary?"

Thank you

Venkat Pisati