Skip to content
TriedDocs
Webhooks

alert_triggered

Sent when an alert rule's metric crosses its threshold, with the rule, the measured value and a readable message.

alert_triggered is sent when one of your alert rules breaches. Use it to page on-call staff, post to a chat channel or open an incident.

When it fires#

Each enabled rule is evaluated every frequency_minutes (default 5). The rule's metric is measured over the last window_minutes and compared with the threshold. The event fires on the transition from ok to triggered:

  • The rule was ok and the value now breaches: alert_triggered is sent and the rule becomes triggered.
  • The rule is already triggered and still breaches: nothing is sent. You get one event per incident, not one per check.
  • The rule is triggered and the value is back within the threshold: alert_resolved is sent.

Pressing Check on a rule in Alerting (or POST /alerts/:id/evaluate) runs the same evaluation immediately and can send this event.

Which settings enable it#

Alert webhooks have no event filter. They go to:

  1. The rule's Webhook URL (webhook_url), if set.
  2. Otherwise the workspace webhook URL.

If neither is set, only the rule's email recipients are notified.

The Create alert dialog with metric, condition, window, agents, email recipients and webhook URL

Timeout: the workspace timeout, else 10 s. Retries: up to 3 (1 s, 2 s, 4 s).

Payload#

The body is { event, alert }. The alert object is the rule (after the state change) plus the measured value, a message and a timestamp.

{
  "event": "alert_triggered",
  "alert": {
    "alert_id": "alert_3a9e5c1f7b2d4e8a0c6f1b93",
    "name": "Success rate below 70%",
    "metric": "call_success_rate",
    "threshold_type": "absolute",
    "comparator": "<",
    "threshold": 70,
    "window_minutes": 60,
    "frequency_minutes": 5,
    "agent_ids": ["agent_5b0e2c7d9a1f4e3b8c6d2a10"],
    "emails": ["ops@bondidental.com.au"],
    "webhook_url": "https://example.com/hooks/alerts",
    "enabled": true,
    "state": "triggered",
    "last_value": 62.5,
    "last_checked_timestamp": 1760683200000,
    "created_timestamp": 1760510400000,
    "value": 62.5,
    "message": "Success rate below 70%: call_success_rate is 62.5% (< 70%) over the last 60 min",
    "timestamp": 1760683200412
  }
}

Fields#

Field Type Description
alert.alert_id string Rule id, prefix alert_
alert.name string Rule name
alert.metric string The measured metric. See the list below
alert.threshold_type string absolute compares the value itself. relative compares the percentage change against the previous window of the same length
alert.comparator string >, >=, < or <=
alert.threshold number The threshold
alert.window_minutes integer Measurement window, 1 minute to 7 days
alert.frequency_minutes integer How often the rule is checked, 1 to 1,440
alert.agent_ids string[] Agents the rule watches. Empty means all agents
alert.emails string[] Email recipients
alert.webhook_url string or null The rule's own URL
alert.enabled boolean Whether the rule is active
alert.state string triggered
alert.last_value number The value from this check
alert.last_checked_timestamp integer When the rule was checked, Unix ms
alert.created_timestamp integer When the rule was created, Unix ms
alert.value number The value that breached. For relative rules, the percentage change
alert.message string Human-readable summary, ready to forward
alert.timestamp integer When the notification was sent, Unix ms

Message format#

<name>: <metric> is <value><unit> (<comparator> <threshold><unit>) over the last <window> min

<unit> is % for metrics ending in _rate, % vs the previous window for relative rules, and empty otherwise.

Metrics#

Metric Measures
call_count Calls in the window
call_success_rate Percent of analysed calls with call_successful true
negative_sentiment_rate Percent of analysed calls with Negative sentiment
total_call_cost Call cost in AUD
concurrency_used Live calls at the moment of the check
custom_function_failure_count Failed custom function results
transfer_call_failure_count Failed transfers
api_error_count API requests that returned 4xx or 5xx
e2e_latency_p50, e2e_latency_p90 End-to-end response latency, ms
qa_score_average, qa_failure_count AI Quality Assurance scores
chat_count, chat_success_rate, chat_negative_sentiment_rate, total_chat_cost The same measures for chats

Email#

The rule's email recipients get a message with the subject [Tried] Alert triggered: <rule name> at the same time. Emails need SMTP configured. Needs keys

How to respond#

Reply 2xx. The body is ignored. Every transition is also stored in the alert history (Alerting, History, or GET /alert-events), whether or not your webhook succeeded.

if (payload.event === "alert_triggered" || payload.event === "alert_resolved") {
  await fetch(process.env.CHAT_INCOMING_URL!, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ text: payload.alert.message }),
  });
}