Routers are objects that can dynamically route alerts and notifications based on conditions.


Note: Routers require Administrator permissions and the Pro pricing plan.

Create A Router

  1. Enable Advanced Mode
  2. From the action button, click the Create Router button. Create Stakeholder Button
  3. Provide the following:
    • Name - The name of the router (ex: “Dev Alerts Router”)
    • Type - Select the type. This can be “Routing Rules” which are generally connected as alert filters connected to integrations, or “Notification Rules” which are rules specifying how users should be notified and are attached to users.
    • Default Destination - (only applicable to “Routing Rules”) - The default destination to send the alert if no rules match.
  4. Click Save button. Create Router Form

Update A Router

  1. Navigate to the router page you would like to edit.
  2. Next to any of the fields double click to edit or just toggle the swtich. Modify Router Attributes

Delete A Router

Note: Deleteing a router that is being used by another object (integration, user, ext.) could have unintended consequences. Make sure other ojects are not using this router before deleting it.
  1. Navigate to the Routers page.
  2. Click the trashcan button next to the router you wish to delete. Click Trashcan Button
  3. Click the Yes button to confirm you would actually like to delete this router. Confirm Delete



All routers use YAML as the format. The root element should always be rules (array). Each rule has a match condition (object) and a actions (array). See the routing rules and notification rules sections for examples.

Please Note: When rules are evaluated, they will be evaluated in order. Only the first matching rule will be used.


When routers are matching rules they are given access to data. Namely you are given access to the alert in context, and a special field always which is always true (especially useful for catch all rules).


Internally PagerTree uses the sift package to do rule matching. It follows the familiar MongoDB syntax.

There are 2 special functions $day and $timeBetween that are supplimental. See below for documentation.


The day operator returns the current ISO day of the week (1 Monday, 7 Sunday). You can then use other operators to match the current day.

Make sure to provide the timezone parameter, if not it will default to Etc/UTC. You can use any of the momentjs timezones.


The timeBetween operator returns a boolean. true if the current time is between (inclusive) the time provided, false otherwise.

Make sure to provide the timezone (default: ‘Etc/UTC’), timeformat (default: ‘hh:mm a’), starttime, and endtime parameters.

Routing Rules

With routing rules, you can perform complex routing and actions on alerts. Actions include:

  • aggregate - Aggregate alerts based on field(s)
  • assign - Assign the alert to a team, user, schedule, or another router
  • automate - Run an automation
  • setval - Set a value on the alert
  • escalate - Create a sudo-escalation process
  • stakeholder - Attach a stakeholder to the alert
  • ignore - Suppress the alert


The aggregate function will aggregate alerts by the specified by properties for timeout time. All subsequent alerts that arrive will be added as a child to the first alert. They can be found in the children tab of the UI and will show a status of suppressed. After the timeout elapses (since the first alert), it will then route the alert to the receiver.


The assign function will assign the alert to a team, user, schedule, or another router (can only go 10 routers deep). This is useful for dynamic routing based on conditions.


The automate action will run automations when triggered. Provide the ids of the automations to run.


The setval action will assign data to the alert. Use the map attribute to define custom title, description, tags, or urgency.


The escalate action will create a sudo escalation setup. The receivers can be multiple users and/or teams, this is equivalent to having multiple attendees for an on-call layer, essentially fanning out notifications. However, important to note, that once the cycle gets to a rule where the receivers are not all users, it will completely transfer control of the alert, similar to the Handoff or Multi-Team Routing functionality.


The stakeholder action will attach stakeholders to the alert when triggered. Provide the ids of the stakeholders to attach.


The ignore action will place the alert into a suppressed state and stop routing.

Example Templates

Notification Rules

With notification rules, you can perform custom notification sequences. Actions include:

  • notiy - Notify on specified channels
  • repeat - Repeat the notification sequence
  • ignore - Suppress notifications from being sent


The notify action will notify the user on specified channels then wait for a timeout for next instructions. Possible values for the channels parameter are:

  • push
  • email
  • sms
  • voice
  • slack


The repeat action will repeat the above notify actions n times. You can repeat between 0 and 3 times.


The ignore action will supress sending any notififications to the user when matched.

Example Templates