Create EC Alerts and Notification using Business Rules
This blog will help you to set up EC Alerts and Notification using the Business Rule.
Alerts and Notification are useful when there is some employment information change. For example, manager gets an alert in ToDo list and an email notification before 30 days of employees contract end date. User can customize the email and todo message.
Supported HRIS elements you can get the saveAlert rule to check in IF condition are -:
TIME_OFF(MDF) – the create alert side is handled in time_off postSave event with event bus. The trigger alert side handled in EC alert and notification side.
Any HRIS Element not mentioned above cannot be accessed by the EC Alert engine currently.
Example : The alert/notification should trigger on the ‘Probation End Date’ of an employee.
In Admin tools-> Company Settings -> Configure Object Definitions, search for AlertMessage.
Change the Maximum Length of ‘alertDescription’ as 4000.
Note: This is to increase the length of Alert description as configured in step 2.
Admin tools-> Employee Files -> Manage Data, Create New AlertMessage.
Currently you can use only the following tags:
- Subject user : [[SUBJECT_USER]]
- Event reason : [[EVENT_REASON]]
- Effective start date of the record which triggers the Alert & Notification : [[EFFECTIVE_DATE]]
- Start date : [[START_DATE]]
- End date : [[END_DATE]]
- Time off type : [[TIME_OFF_TYPE]]
- Time off status : [[TIME_OFF_STATUS]]
Admin Tools-> Manage Organisation, Pay and Job Structures, Create a workflow.
Note: Here the Employee’s Manager will receive the notification.
- Approvers recieve a To Do Alert.
- Cc Role’s recieve an email Notification.
- You need to be both an Approver and a Cc Role, to receive both an Alert and Notification.
Admin Tools -> Configure Business Rules , Create New Rule as below :
NOTE: Never configure your Alert rule with “IF = Always”. This will mean the rule will trigger EVERY time you save. Best Practice is to have at least 1 IF condition, similar to the one used in the example below, where the rule will only trigger when the value for the field changes. If the value does not change, an alert is not sent. The point here is that it will send an alert when you set the value the field time, and it will send an alert when you change the value. But you don’t want it to send an Alert every time you update the employee’s Job Information, which it will do if you don’t have any IF condition.
Please Note: The Code and Name fields when adding the Second Parameter of Alert are case sensitive and must be filled in as shown above.
a) Alert Message (Optional) – We define the alert message that was created in step 2.
If you do not define any alert message, the default message format will be:
Email Header/todo name: Alert for “subject user name”, “event reason”
Email Body/todo detail: Alert fot “subject user name”, “event reason” on “effective start date”
b) Effective Date (Required) – Defines when the rule is triggered.
You can use Date Plus() function to define when the alert will be sent. If you wish for the alert to be triggered days before or after the Probation End date.(-10 means 10 days before)
c) Workflow Information (Required) – defines which workflow is assigned to this rule. The workflow defines which user gets an alert and/or a notification message as configured in step 3.
Note: Here, ‘Probation End Date’ is a field in the Job Information Portlet. This Alert is only triggered when a change is made to the ‘Probation End Date’ field, this stops multiple alerts from being sent.
Add the rule to the Succession Data Model, under ‘jobInfo’ HRIS element (or you can assign the rule via Admin Center > Manage Business Configuration > jobInfo element > Rule Type = saveAlert).
<trigger-rule event=”saveAlert” rule=”test_Alert_PPED”/>
Run the ‘EC Alerts and Notifications’ job in provisioning.
Note: Create the job as recurring so that it is run daily.
- If you are a customer, you will need to open a Support Incident to have the scheduled job created
Things to consider:
- Alerts are triggered when the ‘IF’ condition of the business rule is meet when clicking save on the corresponding portlet.
The alert message is then triggered and waits statically in the system until the effective date is reached.
When the effective date is reached and the ‘EC Alerts and Notifications’ job in provisioning is ran the alerts are sent.
- If you are setting up an EC Alert and Notification in your instance, please note, that the Alerts will only be triggered for changes made to the user information, which meet the criteria of your rule, from the day the rule is triggered on the corresponding Element. The alerts will not trigger for already existing data.
- Workflows in conjunction with the EC Alerts and Notification feature, do not work the same as normal workflows.The expected behavior is as follows:
-CC Roles will receive only a Notification (email). Unlike normal CC roles, these emails will not appear in “Take Action” tile.
-Approves will receive an Alert (To Do Notification). In the new home page these alerts appear in the “Take Action” Tile.