In this article, we will look into how to create custom alert using Alert Composer tool.
This is a guest post by Sudeep Doke who is an Oracle HCM Cloud Functional consultant with experience in Global HR, Talent Management, Recruiting, Learning, and Compensation modules.
Let’s consider a use case of creating an alter for the scenario: “Send Alert to Learner and Manager when learning is Overdue by 7 days on a Required Course.”
Table of Contents
Create a Resource Alert
Login as Learn Admin. Tools > Alerts Composer > Create Resource Alert

Resource Alerts: Resource Alerts are based on Oracle HCM Cloud REST API resources. The resources must be deployed in the environment. You can modify the triggering criteria for notifications by defining filters on the resource attributes if you have the required privileges to access the REST resources. The resource alert executes a REST query that extracts the recipients and alert data and then binds this information to the message (template). The REST endpoints are delivered by Oracle, and you build the alerts.
Add Name, Description and Select Resource as “learnerLearningRecords”

The learnerLearningRecords resource includes a collection of assignment records, or a single assignment record when queried with assignment record ID for a learner.
Define Appropriate Filters
Filters enable you to specify the triggering criteria for alert notifications. On the Add Filter page, in the Resource field, select learnerLearningRecords resource. Click Add Expression to define filter expressions on specific attributes of the resource.
Add Filters for Due Date, Active Assignment, Required Learning, Learning Item is Course

As sysdate is stored in Timestamp format, we cannot directly equate Due Date with sysdate. Therefore, we use Due Date > (sysdate-8) and Due Date < (sysdate-7) to determine Due Date has passed 7 days from sysdate (current date).
Filter on Assignment Status as Active to only alert learners who have not yet completed the learning.
Define the recipients
Add Template. Enter Name. Edit > Manage Recipients and Message

Add Recipients, Message (Subject and Body) using the Expressions available and applicable.

Send the alert to learners and managers via an email message and via a worklist notification.
We can either have Learner and Manager be notified in same template or create multiple templates with different verbiage for learner and manager accordingly.
You can insert expressions in the Subject or Message using the Expression icon.Use the Rich Text Editing Mode to format the message text. You can select options such as font, size, style, and so on.
Hello ${learnerLearningRecords.assignedToDisplayName},
You have been Enrolled in the course ${learnerLearningRecords.learningItemTitle} to be completed by ${AlertUtils.formatDate(learnerLearningRecords.assignmentDueDate,'MM/dd/yyyy')}.
View the course in your Oracle Learning Tile.
Thank You!
Your Learning Team
Use the Source Code Editing Mode to customize the message as per requirement.
<div>
<span>
<p>
<font face='Calibri' size='11'>
Hello ${learnerLearningRecords.assignedToDisplayName}, <br>
You have been Enrolled in the course ${learnerLearningRecords.learningItemTitle} to be completed by ${AlertUtils.formatDate(learnerLearningRecords.assignmentDueDate,'MM/dd/yyyy')}. <br>
View the course in your Oracle Learning Tile. <br>
Thank You! <br>
Your Learning Team
</font>
</p>
</span>
</div>
Simulate and Schedule the Alert
The alert can be run on-demand, or scheduled on the Run Options tab. For testing purposes, use the on-demand option and select Yes from the Simulate Run drop-down list.

This simulates how the alert is run, and how it appears to end-users. You can see the results of the run in Alerts History. Once you are satisfied with how the message works and looks to end users, the next step is to run the alert in live mode. You can do this by selecting No from the Simulate Run drop-down list.
Thank you Sudeep Doke for coming up with this article.
If you like the content, please follow us on LinkedIn, Facebook, and Twitter to get updated with the latest content.