Skip to main content

Query Alerts

πŸ”” Query Alerts notify you automatically when a saved query's result crosses a condition you set β€” by email or Slack, on a schedule you choose.


πŸ“ Accessing Query Alerts​

Entry pointPath
All alertsBI β†’ Queries β†’ Query Alerts tab
New alertQuery Alerts tab β†’ New alert
From a saved queryQuery editor β†’ More actions (β‹―) β†’ Create alert β€” the source and SQL are filled in from the query
All alerts for a queryQuery editor β†’ More actions (β‹―) β†’ View alerts

βž• Creating an Alert​

New alert opens the alert builder: a single page with five sections β€” Source, Condition, Schedule, Delivery, and Review. Click a section's header to open it. A section shows a check mark once it is complete.

Name the alert in the title field at the top of the page. A new alert starts as Untitled alert, or is named after its query when you start from Create alert.

tip

When the Maya module is enabled, a Maya chat panel sits beside the builder. Describe what to watch (for example, "Tell me if daily revenue drops more than 15% vs last week") and Maya writes the SQL, fills in the sections, and backtests the condition for you. Sections Maya filled are marked Filled by Maya. Use Hide chat to give the builder the full width.

  1. Source β€” select the Data source, then write the SQL that returns what to watch. Click Preview to run it: the builder shows the returned rows and whether the alert would fire right now. If the query fails, Debug with Maya sends the error to Maya for a fix.
  2. Condition β€” choose when the alert fires. See Choosing a Condition.
  3. Schedule β€” choose a Frequency: Every 15 minutes, Every 30 minutes, Hourly, Daily, Weekly, or Monthly. Hourly checks ask for the Minute of hour. Daily, weekly, and monthly checks ask for a Time; weekly checks also ask for the Days, and monthly checks for the Day of month.
  4. Delivery β€” choose who is notified. See Notification Channels.
  5. Review β€” read the rule in plain English, then:
    • Test with current settings β€” runs the check now without saving the alert or notifying anyone.
    • Email me a sample β€” sends you a sample notification.
    • Status after save β€” start the alert Active, or Paused to turn it on later.
  6. Click Create alert at the top of the page. The alert is saved and you return to the alerts list.
info

Create alert stays disabled until the alert is complete and its query has been previewed successfully. While something is missing, a Can’t save yet badge next to the button says what to fix.


βš™οΈ Choosing a Condition​

Pick a Condition type:

Condition typeFires whenGood for
Metric crosses thresholdA number crosses a fixed valueRevenue below target, stock below a minimum
Metric changesA number moves too much compared with an earlier pointSudden drops or spikes
Rows matchThe query returns one or more rowsStuck orders, failed syncs, any exception list
Metric crosses threshold​

Set Compare to Column vs value to compare a Metric column with a fixed Threshold, or to Column vs column to compare it with another column from the same row (for example, Actual Cost is greater than Budgeted Cost). Then pick an Operator:

OperatorExample
Greater thanDaily Revenue greater than 5000
Less thanQuantity On Hand less than 10
Greater than or equal toOccupancy % greater than or equal to 90
Less than or equal toDays Until Expiry less than or equal to 3
EqualsOrder Status equals Failed
Does not equalSync Status does not equal OK
Metric changes​
  • Metric column β€” the number to watch.
  • Direction β€” Increases, Decreases, or Changes either way.
  • Change threshold β€” how much the metric has to move to fire, always a positive amount.
  • Change type β€” Percent for a relative change (dropped 15%), or Absolute value for a flat difference (dropped by 50 units).
  • Compare to β€” Previous run, Same time yesterday, or Same time last week.
info

A Metric changes alert needs history to compare against, so it starts firing only once it has run enough times to reach the point you compare to.

info

Metric crosses threshold and Metric changes need the query to return exactly one row. Summarize it down to a single number (for example with SUM or COUNT), or use Rows match when several matching rows are expected.

Under the condition, In plain English spells out the rule. Click Backtest to see how often the alert would have fired in the past, and accept a suggested threshold if one is offered.


πŸ“‹ Managing Your Alerts​

The Query Alerts list shows every alert with two independent pieces of state:

  • Status β€” whether the alert itself is turned on: Active or Paused. A paused alert stops checking until resumed.
  • Last result β€” the outcome of the most recent check:
    • Never run β€” no scheduled check has happened yet.
    • Condition not met β€” the check ran and nothing needed to be reported.
    • Condition met β€” the condition was true but no notification went out (for example, no recipients are configured).
    • Triggered β€” email sent / Triggered β€” Slack sent β€” the condition was true and a notification was delivered.
    • Error: <details> β€” the last check couldn't run (for example, a Metric crosses threshold query returned more than one row). The alert keeps checking on schedule but won't notify anyone until the underlying issue is fixed.

Query Alerts list showing severity, status, schedule, recipients, and last result

From the list, each alert has:

  • Evaluate now β€” runs a real check immediately. Unlike Test with current settings in the builder, this is a genuine check: if the condition is met, it notifies recipients for real, the same as a scheduled run.
  • Edit β€” reopens the alert builder to change any section. Its Activity tab lists the alert's recent checks.
  • Open query β€” jumps to the query this alert is built on.
  • Pause / Resume β€” shown depending on the alert's current Status.
  • Delete β€” permanently removes the alert and its evaluation history.
warning

Deleting an alert cannot be undone.


πŸ”” Notification Channels​

Choose one channel under Notify via. An alert delivers to exactly one channel; create a second alert on the same query if you need more.

  • Email β€” add one or more Email recipients.
  • Slack β€” pick one or more Slack channels. If Slack isn't connected yet, click Connect Slack workspace first; your draft is kept while you authorize.
  • In-app β€” sends an in-app notification to whoever created the alert.

Advanced settings under Delivery hold the rest:

  • Severity β€” Info, Warning, or Critical.
  • Notification note (optional) β€” a short message included with the notification.
  • Notify mode β€” Only when state changes, or Every run while true.
  • No data β€” what happens when the query returns no rows: Treat as OK stays quiet, Alert me notifies.
  • Cooldown minutes β€” the minimum gap between two notifications for the same alert.
  • Send recovery notice β€” also notify when the condition goes back to normal.

Keep in mind:

  • Slack alerts require your tenant's Slack workspace to stay connected β€” the same connection used by Sharing & Delivery.
  • Changing an alert's channel while editing it clears the previous channel's recipients or channel selection.

🚫 Scope Notes​

  • Severity only affects how the notification is labeled (an [INFO] / [WARNING] / [CRITICAL] prefix) β€” it does not change who is notified or how quickly.
  • For Metric crosses threshold and Metric changes, the query must return exactly one row on every scheduled check, not just when the alert was created.
tip

Reserve every-15-minute and every-30-minute schedules for genuinely time-sensitive checks.