Steps to create custom notification using Alert Composer

To achieve the requirement, we will have to create a Resource Alert.

On the other hand, you can create your own Resource Alerts based on Oracle HCM Cloud REST API resources. You can also modify the triggering criteria for notifications.

Step 1. To create a Resource Alert, navigate to Tools à Alerts Composer à Add à Resource Alert

 

In case you are not able to see the Alert Composer or Add option please make sure you have the following privileges; you will also need them to run an alert.

 

Step 2. Once you click on the Add Resource Alert button you will be on the “Add Resource Alert” page.

On the “Add Resource Alert” page you will notice that the very first filed “Access Level” is defaulted to User. I believe this is the time we understand that what is the significance of access level.

 

Access Level in Alert Composer

Like lookup or value set, we also have three different access levels (User, Extensible, and System) for alerts to control the actions that can be performed on the alerts. For example, if the access level is set to Extensible or User we can add new templates and modify predefined templates of an alert, however, we can’t change anything if the access level is set to System.

We can check the access level for an alert when editing the alert, however, we cannot change the access level. Alerts that are predefined with access levels System or Extensible are always enabled and can’t be disabled. Alerts that are user-defined are enabled by default and can be disabled.

 

The following table shows the access levels for alerts.

 

 

Step 3. On the Add Resource Alert page enter the below details

·       Access Level: This will be defaulted to User

·       Enabled: Yes.

·       Alert Code: The System will generate some random code once saved.

·       Name: Unique name of your alert (Max 80 characters).

·       Description: Optionally enter a short description about the alert (Max 2000 characters).

·       Resource: emps (Once saved you cannot change it).

 

    Apart from emps there are other resources available
1.    emps
2.    locations
3.    grades
4.    jobs
5.    positions
6.    organizations
7.    jobFamilies
8.    timeRecords
9.    timeRecordGroups
10.    timeRecordEventRequests
11.    absences
12.    learnerLearningRecords

 

Step 4. Once we have entered basic details it is time to decide the triggering condition. For the same click on the “Add Filter” button. Once again you will have to select Resource, which is basically child resources based on the parent resource (emps) we selected earlier. Since the probation detail is related to employee assignments, we need to select child resource “emps/assignments” here.

 

NOTE: In case you do not see any value in the Resource list you need to add Use REST Services – Employees privilege to your custom HR Specialist role and then regenerate grants and run the LDAP process.

 

To define triggering condition for the alert, click on the “Add Expression”  button. Enter Name, Expression, and then click on the Pencil icon to enter the expression in the field.

 

From the Attribute field select emps/assignments, then next to the attribute field select ProbationPeriodEndDate, then from the Operator field select Greater than or equal to, and then click on Insert into Expression, on the right-hand side of the expression you can enter SYSDATE, so that your expression will look like ${ProbationPeriodEndDate} >= SYSDATE.

Click on the “Apply” button

 

You can repeat the steps again to enter the expression ${ProbationPeriodEndDate} <= SYSDATE + 30

This expression will help in finding out all employees who are going to complete their probation in the next 30 days. Then click on the “Apply” button.

 

Step 6. Define “Template” for the alert composer

 

Click on the “Templates” tab and then click on the “Add Template” button.

 

Give some name to the template and then click on Edit and select “Manage Recipients and Messages”.

 

You are on Edit Template: <Your Alert Name> page, click on the “Add Recipient”

 

From the “Communication Method” drop-down list select “Mail” to send email notification.  In the expression field enter “${AlertUtils.empManager(emps.PersonId).WorkEmail}” to send an email notification to the manager. To send worklist notifications you will have to select ${AlertUtils.empManager(emps.PersonId).UserName} and communication method should be Worklist.

 

Using alert composer, you can define multiple templates for the same alert and can have different recipients for each template. You can also translate templates to other languages. You can bookmark the below table to refer to which expression to use for workers and managers.

 

Step 7. Define the Subject and Message section of the template

Subject: - Employee Probation end date approaching

Message Text: -

Hi ${DisplayName},

 Probation period for ${DisplayName} (${emps.PersonNumber}) is expiring on ${emps.assignments.ProbationPeriodEndDate}

 Please take necessary action if required. If you have questions, contact your human resources representative. 

 

Thank you. 

 Note: This is an autogenerated message. Do not reply to this message.

In the message text section, enter you have entered some text something like this, and then click on the Apply button.

 

Step 8. Setup Run Option for Alert

Click on the “Run Options” tab and enter details as follows, once you enter all these details click on the Save and Close button.

·       Automatically Run On-Demand/ Schedule based on the requirement.

·       Log Activity History: Yes

·       Simulate Run: To run this alert in the production instance it should be set to No. But for this example, since we want to test the alert we have set it to Yes. If it is set to Yes, it will not trigger any alert in the test/production instance so it is safe to test. Click on Save and Close

 

Step 9. Run alert for testing

Now this is the time when we can run our alert and see if everything is working as expected or not. To run the alert first search your alert and then click on the “Action” button, you will see the option to “Run” and then click on that.

Enter userid for the test and once you submit the alert, click on the alert history. Stay on the “Processed” Tab. If you don’t see the alert, click on the “Refresh” button and wait for some time. You can also click on the “Running” tab to see if the process is still running or not.

 

Once you see your alert name, click on the name, and you will see a preview (glass) option. Click on that and you can see the output as follows.

I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.

 

 

 

 

 

 

 

 

 

 

 

 

I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.

Global Human Resource
Posted by : Mohammad