Good day
Ever wanted to create an alert to go to a dynamic role instead of just the Manager and HR Manager getting a web notification through Intelligent Services?
Well, it is possible and today I will focus on how this can be achieved. The added benefit is that this business rule can be triggered on import or on upsert from an API User as well, so has a wide range of uses.
To trigger alerts, there are 4 aspects: An Alert Message needs to be defined, Workflow needs to be configured (Workflow Groups and Roles too if needed), Business Rule is created, and then it is set to trigger via BCUI. In addition, you also need to
create and run a scheduled job via Provisioning, EC Alerts and Notifications, a recurring job which should be running daily to have consistent notifications behaviour across the board.
As a prerequisite, you additionally need to
permission Employee Import Settings for your population that will use imports, to trigger workflows when importing Job Information.
Define Alert Message
Via Manage Data > Create New > Alert Message, create a new alert message that will be shown to the user in the
To-Do section. A list of supported tags is defined in the
EC Workflows Implementation Handbook.
Configure Workflow
In my scenario, I will be using a dynamic role with Workflow Groups, in order to alert the applicable data capturer in each legal entity of a new hire. In the scenario of Alerts, you set your recipients as approvers. This will ensure they receive an alert in their To-Do tile. If you want to send out an email notification, you will set a CC role.
Business Rule for Alerts
When you upload CSV files to create a new hire, you will go in sequence with separate files, 1. Basic, 2. Biographical, 3. Employment Details, 4. Job History and 5. Personal Info as a minimum. When using API upserts to create a Hire, you would use the same sequence for your API upserts as well, the endpoints being User, PerPerson, EmpEmployment, EmpJob and PerPersonal.
As such, I will use the Job Information (where I add the event reason for the Hire) as the Base Object for my Alert Business Rule. Navigate to Business Rules, create a new business rule under
Employee Central Core, and select
Generate Alerts.
I personally set the IF condition on Event Reason rather than the Hire Event, as it allows me more granular control over which Hire scenarios I would like to trigger an alert for, i.e. many instances have a Data Migration event reason linked to the Hire Event (for data take on scenarios), which in this case will not trigger an Alert.
In addition, by setting the Alert Effective Date to Today, alerts will be triggered on the day of the upload/upsert, regardless of the effective date of the hire.
OPTIONAL: You can also add a Context: Effective Date to your IF condition to ensure that Hires prior to your Go Live Date (as an example) do not trigger alerts.
Trigger your Business Rule
Now, via
Manage Business Configuration, in the jobInfo HRIS Element, in the Trigger Rules section, set the
Base Object to
Job Information (that we also used as the base object of our Business Rule), the
Event Type should be set to
saveAlert, and select the rule you have configured in the step above.
Create Scheduled Job for EC Alerts and Notifications
If this job hasn't been set up in your instance already, in Provisioning, you will create the following scheduled job:
CAUTION: I highly recommend specifying the start of the current month, current week or the same day as your
Modified date since parameter, so you do not trigger alerts for past hires. There is no way of deleting alerts in Bulk; you will have to delete them 20-100 at a time if you make a mistake.
Now import/upsert your hire
Once you import or upsert a new hire that matches the event reason(s) you configured in your business rule, the recipients will now receive an Alert.
Result
Upon import or upsert of the Job History (or EmpJob via API), a new alert will be generated: