Creating an Alert
This page explains step by step how to create an alert for a function, how to set its trigger and schedule, and how to write its filter. The actions an alert can take are described in Alert Actions; the general behavior of alerts is described in the Alerts Overview.
Steps to Create an Alert
1. Open the Function Designer
Click Function Designs under the Administration menu.
2. Open the Alerts of the Function
- On the Functions list, find the function whose records the alert will watch (for example Work Order).
- Click Alerts in the row actions. The Alerts page lists the existing alerts of the function.
3. Start a New Alert
- Click the New button at the top right. The Create Alert page opens with the General Information panel.
4. Fill in the General Information
- Enter the Name, choose the Trigger Type and, for a periodic alert, set the Period. Optionally enter a Description.
5. Add the Actions
- In the Actions table, click Add and define at least one action in the Add Action panel. See Alert Actions.
6. Build the Filter
- In the Filter area, define the condition the records must meet.
7. Save
- Click Save at the top right. The alert is active as soon as it is saved.
To change an alert, click Edit in its row on the Alerts page; the Update Alert page has the same fields. To remove it, click Delete and confirm.
Fields of an Alert
Required fields are shown in bold.
| Field Name | Description |
|---|---|
| Name | The name of the alert, at most 256 characters. |
| Trigger Type | Periodic (default) checks all records of the function on the schedule set in Period. On Change checks a record each time it is created or saved. |
| Period | Shown only for Periodic alerts. The schedule of the checks; the default is every 2 days. See Period below. |
| Description | Optional explanation of the alert, at most 1024 characters. |
| Actions | The list of actions the alert takes for each matching record. At least one action is required. The table shows the Action Type, the Recipients (the number of recipients, or the work order type and priority for work order actions), and the One-Time and Re-enable settings of each action, with edit and delete buttons. |
| Filter | The condition the records must meet. At least one condition is required. |
Period
The Period editor defines when a periodic alert runs:
- Specify the work period: The repetition unit (Day, Week, Month or Year) and how often it repeats (for example every 2 days).
- Week: The days of the week on which the alert runs.
- Month: Either a day of the month or a week of the month (First, Second, Third, Fourth, Last) and a weekday.
- Year: The months, and a day or a week within them.
- Specify the start time and Specify the end time: When the schedule starts, and whether it ends (Never or Date Based).
Schedules are calculated in UTC. The scheduler looks for due alerts at least once a minute and at most every 15 minutes, so a run can start a few minutes after its scheduled time.
Filter
The filter is built in the same way as the identity filters of the function:
- Each condition consists of a field of the record (chosen from the field list, including fields of linked records), an operator that depends on the field type (equals, does not equal, contains, starts with, greater than, less than, empty, not empty and so on) and a value.
- Conditions can be grouped and combined with And / Or.
Relative Dates
For date fields, the button next to the value switches between Pick a date (a fixed date) and Use a relative date. A relative date is calculated again at every check, which is what makes "overdue" or "older than" conditions possible:
- Base: Today, Start of this month or Start of this year.
- Amount and unit: a number of days, weeks, months or years.
- Direction: Before or After the base.
For example, "Due Date less than Today" finds overdue records, and "Creation Time less than Today, 7 days Before" finds records older than a week.
A relative date can only be used with the greater than / less than operators (with or without "or equal"). When you switch a condition with an equals operator to a relative date, its operator is changed to "less than". To find records of a single day, use a range, for example "greater than or equal to Today" and "less than Today, 1 days After".
Conditions Created by the Assistant
An alert created by the AI assistant may have a condition that the filter editor cannot show. In that case the condition is shown as read-only text with the hint "This condition was created by the assistant and can't be shown in the editor. It is kept as is when you save." Click Rebuild condition to discard it and build a new one in the editor.
⚠️ Warning
- The condition is checked against the function's records when the alert is saved. A field the records do not have, or a value of the wrong type, is refused.
- Filters cannot refer to the current user: an alert runs in the background, where there is no current user.
Warnings and Error Messages
- Required Fields: "This field is required." is shown when Name, Trigger Type or the filter is empty.
- No Actions: "The collection Actions must contain at least 1 items." on the page, and "An alert definition must have at least one action before it can be saved." from the server.
- Filter Validation Failed: A condition in the filter editor is incomplete, for example a value is missing.
- Invalid Condition: "The condition cannot be saved: ..." with the reason, when the condition does not fit the records of the function.
- Unknown Placeholder: "The condition contains ..., which is not a relative date. ..." when a condition contains a placeholder other than a relative date.
- Relative Date With Equals: "A relative date compared with = matches only that day's midnight. Use a range, ..."
User Tips and Best Practices
- Name Alerts by Their Purpose: For example "Overdue work orders - daily reminder", so that the list is easy to scan.
- Check the Filter on a List First: Build the same condition as a filter on the function's list page to see which records it finds before saving the alert.
- Choose the Period for the Audience: A daily period is usually enough for reminders; very frequent periods with non-one-time actions send many messages.