Creating alerts
Use the Alert Definitions page to create an alert. You can define how data is selected for the alert, specify who will receive the alert, and define how the alert notification is sent.
Alert types
There are two types of alerts:
- Query-based: Built using SQL
- Rowsource-based: Built using Java
Query alerts are the most common type. For example, the standard Not Clocked In alert that is provided with the application uses this SQL:
SELECT emp_id, emp_name, emp_lastname, emp_firstname
FROM employee
WHERE emp_id in
(select work_summary.emp_id
from work_summary , employee_schedule
where employee_schedule.work_date = work_summary.wrks_work_date
and employee_schedule.emp_id = work_summary.emp_id
and employee_schedule.empskd_act_start_time <> employee_schedule.empskd_act_end_time
and wrks_clocks is null
and wrks_work_date = CONVERT(CHAR,GETDATE(),23))
Rowsource alerts are used to create alerts with custom actions and parameters, such as an alert to show all unauthorized records with a WRK time code. When creating rowsource alerts, a new class implementing row sources must first be created. The Source Class field value is set to the full path of this class.
You can use the generic builder class
com.workbrain.app.wbalert.source.TimeCodeAlertSource
to implement
the alert mechanism. This class has three parameters that are specified when the alert
is scheduled:
- Time code
- Minimum minutes
- Work date
Alert recipients
You can configure the system to send the alert to a specific user, members of a team, and users with a specified security role. When you select multiple criteria, such as the Supervisor security role and several team names, the alert is sent to the users who match any of the criteria. In this situation, all the users with the Supervisor security role and all the members of the selected teams are sent the alert.
An alert’s recipient also controls the data that is included in the alert.
When alerts are sent to users or team names, the alerts include data on all employees. For example, if you configure the system to send the Late or Left Early alert to the Administrative team, the alert is sent when any employee arrives late or leaves early, not just members of the Administrative team.
When alerts are sent to security roles, the alerts include data on only the employees that the users with the specified roles have security permissions to view. For example, if the system sends the Not Clocked In alert to the Supervisor security role, users with the Supervisor role are only sent the alert for employees in their own teams.
Notification types
By default, alerts are sent as Workmail messages in Workforce Management. You can also configure alerts to send push notifications in Infor Go.
See Push notifications.