Rela AIRela AI Docs
Tutorials

Automatically escalate alarms to supervisors

Configure escalation rules that notify supervisors and managers when an alarm is not acknowledged in time.

What you will achieve

By the end of this tutorial you will have a complete escalation chain: when an alarm is not acknowledged within 15 minutes, an email will be sent to the supervisor; if it persists, a WhatsApp message will go to the manager. Estimated time: 20 minutes.

Prerequisites

  • An active Rela AI account with dashboard access
  • A machine agent with at least one alarm rule configured
  • Contact details configured for the supervisor (email) and manager (WhatsApp)
  • An active email account in Settings > Email Accounts

Step 1: Create an escalation rule

  1. In the sidebar, go to Agents and select your machine agent.
  2. Go to the Alarms > Escalation section.
  3. Click New Escalation Rule.
  4. Configure the basic fields:
    • Name: Critical Alarm Escalation
    • Trigger: alarm_unack (unacknowledged alarm)
    • Wait time: 15 minutes

You should see the escalation form with the steps section available for configuration.

The alarm_unack trigger activates when an alarm remains unacknowledged for the configured time. Other available triggers include alarm_active and task_overdue.

Step 2: Add step 1 — Email to supervisor

  1. In the Escalation Steps section, click Add Step.
  2. Configure the first step:
    • Order: 1
    • Channel: Email
    • Recipient: select the supervisor (e.g., Maria Lopez)
    • Email account: select your active email account
    • Subject: [URGENT] Unacknowledged alarm: {{alarm_name}}
    • Message: The alarm "{{alarm_name}}" from agent "{{agent_name}}" has been unacknowledged for over 15 minutes. Please review and take immediate action.

You should see step 1 listed with the Email channel and the selected recipient.

The variables {{alarm_name}} and {{agent_name}} are automatically replaced with actual values when the escalation executes.
Verify that the supervisor has a valid email in their profile. If the email field is empty, the notification will not be sent and no visible error will appear.

Step 3: Add step 2 — WhatsApp to manager

  1. Click Add Step again.
  2. Configure the second step:
    • Order: 2
    • Additional delay: 15 minutes (executes 30 minutes after the original alarm)
    • Channel: WhatsApp
    • Recipient: select the manager (e.g., Roberto Sanchez)
    • WhatsApp number: select a connected number
    • Message: CRITICAL ALERT: The alarm "{{alarm_name}}" has been unacknowledged for 30+ minutes. The supervisor was notified but has not responded. Requires manager attention.

You should see both steps listed in order, with cumulative times visible.

The additional delay is added to the initial wait time. In this case: 15 min (initial wait) + 15 min (step 2 delay) = 30 min total before the WhatsApp to the manager.
  1. Go to Alarms > Rules.
  2. Select the existing alarm rule (e.g., High Vibration P-101).
  3. In the Actions section, look for Escalation.
  4. Select Critical Alarm Escalation from the dropdown.
  5. Click Save.

You should see the alarm rule updated with the escalation linked and an escalation icon visible.

Escalation must be enabled both on the escalation rule and on the agent. Verify that the agent has the Escalation enabled option turned on in its general configuration.

Step 5: Test with a critical event

  1. Send an event that triggers the alarm (use the agent's webhook):
curl -X POST https://api.rela.ai/v1/events/webhook/your_webhook_id \
  -H "Content-Type: application/json" \
  -d '{
    "timestamp": "2026-03-26T14:00:00Z",
    "machine_id": "P-101",
    "metrics": {
      "vibration_mm_s": 8.5,
      "temperature_c": 75.0
    },
    "status": "running"
  }'
  1. Do NOT acknowledge the alarm. Wait 15 minutes.
  2. Verify in the dashboard:
    • The alarm appears in Alarms with status active and priority high.
    • After 15 minutes, the supervisor receives the email.

You should see the active alarm and, after 15 minutes, an entry in the escalation log showing "Step 1 executed: Email to Maria Lopez".

For quick testing, you can temporarily reduce the wait time to 1 minute. Remember to restore it before going to production.

Step 6: Verify the escalation works

  1. Go to Alarms > Escalation > Log.
  2. Look for the entry of the alarm you just tested.
  3. Verify the details:
TimeStepChannelRecipientStatus
+15 min1EmailMaria LopezSent
+30 min2WhatsAppRoberto SanchezPending (or Sent if you waited 30 min)

You should see the complete escalation log with timestamps and statuses for each step.

  1. To stop the escalation, acknowledge the alarm by clicking Acknowledge on the alarm page.
Acknowledging the alarm stops the escalation chain immediately. Pending steps are cancelled automatically.

Summary

StepActionResult
1Create escalation ruleRule with alarm_unack trigger at 15 min
2Add step 1Email to supervisor configured
3Add step 2WhatsApp to manager at 30 min
4Link to alarmEscalation associated with alarm rule
5Test with eventAlarm generated and escalation started
6Verify logEscalation chain executed correctly

Next steps

On this page