How to set up a custom SQL alert
Companion video “How to set up a custom SQL alert in Crows Nest”
Related KB articles:
ALERTS
Alerts let you configure an email alert to be sent on a schedule.
Alerts can be triggered by conditional results of an SQL query.
NOTE: Your email notification server must set up and running inside Crows Nest before email alerts can be sent.
Example: Track low inventory with an alert for parts below a minimum level on a Parts List.
Create an alert called “LOW INVENTORY.”
Open Settings > Alerts
Click “Add new Alert” in top left
Name the new Alert > Enter Description
Select the alert in the left panel and configure...
Timing > when the alert is sent: Starts, Repeats, Ends, Additional Times.
Recipients > right-click to add Employees or email addresses.
Add content under the Body tab (formatting tags available)
Add a query under the SQL tab
(Code example to copy and paste: https://crowsnest.atlassian.net/l/c/G5ZsSSbG)
Options under Body tab
Send Alert even if the Query returns no rows
Include query results in email
Attach query results as CSV file
Query result is already formatted, insert rows to email body as-is.
(If unchecked, results will be converted to HTML table using styles below)
screenshot of the PO Status selection:
Follow these steps to load this Alert.
Add a new Alert and select it on the Alert form
Copy the text from the attached file onto the SQL tab
Right-click the list of Recipients and add yourself (this will be ignored, but one is required for the Alert to run)
Pick a schedule when the Alerts should be sent
The Alert will create a separate notification to each employee that has POs created in the "Ordered" or "Ordered, unconfirmed" statuses that have one or more items with a zero price and the PO date is 3 days or older. The employee must have an email address entered in CN. It will just list out the different PO numbers that need to be reviewed.