Oracle Cloud Alert Composer [Series] — Part 2: Notify HR Admins (Send Digests/Grouped emails)

Prateek Parasar
3 min readMar 24, 2021

Continuing from the last post, Alert functionality can not only be used to notify employees for generic changes/announcements and changes to their assignment but also be used to notify HR representatives and Admins about the employee circumstances. I am going to take one such example here. In the given example I will show how Alert composer can be used to notify HR of upcoming starters (Pending workers) . This can be a real life scenario where HR Assistants can be notified of people starting in the coming week so that they are ready for onboarding the employee and convert the pending worker into the employee.

For this purpose use emps resource (This rest API returns all current workers and pending workers , cannot return future employees but returns pending workers as long as they are not converted.

For filter condition use proposed date which is found on assignment node below emps

Above makes sure that you only return pending workers

Additional filter like above makes sure you are only picking people projected to start in next 7 days.

Then you will add a template to send email. You would just want to send a single email per BU/Department to concerned HR Admin, use group by to do that, this will lead to a digest(single email per group by entity).

In this example email has been hardcoded but you can very well use one of the groovy function to drive the user based on the employee’s data

As previously mentioned use loop construct and pass the resource entity as first parameter to loop through, in this case emps.

You can apply the formatting on date using above util function, as the date formatter is already inside a single quote you will have to use escape character ‘\’ otherwise you don’t have to. Also notice that to get to the projected start date I have used first instance of the assignment for the employee using array index of zero, this is required to get the actual value out else you will get the object array returned.

This template will give you the email like this. This is a quick and handy way to create email notifications instead of going to the BIP bursting route. Off course there is a limitation of printing values in the email itself as resource doesn’t return many of the display values such as department, BU, job etc.

Hopefully this will be useful.

--

--