How to setup a recursive procedure?


Dear team,

I’m trying to implement an alert with 2 teams of 2 users each.
Each team is the primary team depending on the time of the day (one team in Asia, second in Europe)

Goal is to have from 0:00-12:00 team A being the first to answer and team B to be the first to answer from 12:00 to 24:00.

Team A shoud have the following escalation procedure
user1 being alerted first then if no ack after 5 minutes
user2 being alerted then if no ack after 5 minutes move to team B where

until this point every thing is fine

Team B should have the following escalation procedure
user3 being alerted first then if no ack after 5 minutes
user4 being alerted then if no ack after 5 minutes move to team A

This process may seams strange, but imagine that I want to ensure to wake up someone in a different time zone when the team normaly in charge is not answering.

OpsGenie does not accept a recursive procedure.

Message displayed is: Cannot save esc[TeamB_escalation]. team[TeamA] introduces a loop: team[TeamA] >> esc[TeamA_escalation] >> team[TeamB] >> esc[TeamB_escalation]

It’s true that the process is recursive, but that exactly the goal.

Any clue ?
Note : I would appreciate to avoid waking up all the team.

Thanks for your inputs.

Best regards



Hi Luke,

Thanks for reaching out. This is a use-case we commonly are asked about (almost a primary vs. secondary situation). Instead of creating 2 teams to avoid this recursive error, have you consider doing this under one team?

  • Create 2 routing rules based on the time interval (00:00-12:00 and 12:00-0:00)
  • 00:00-12:00 will route to Team A’s escalation, and 12:00-0:00 to Team B’s escalation.
  • Each escalation will have opposite rules as you listed above - and repeat the escalation to restart notification flow (to avoid this recursive error)
  • Finally, create 2 schedules (Team A and B) - and make sure to edit the rotation time intervals to reflect either 00:00-12:00 or 12:00-0:00)

I’ve included some screenshots to reference, and would love to hear your feedback!


Hi Nick,

Many thanks for you quick answer.
Your proposal looks fine and I’ll try it. However I’m still concerned by a small point.

My users are now part of a single team, which should cover the whole day.
User 1&2 are part of the first rotation, but users 3&4 are not “on-call”.
As they are in a different timezone they are sleeping.

However I’d like to wake them up if users 1&2 are not ACKING the alert.

How do I route the alert to users 3&4 ? Based on your screen capture I have the impression that nobody will answer in team B as no one is on call.

Am I right ?
I could create a “backup rotation” but user would have the impression looking at the app of their mobile that they are on-call. I would like to avoid it if possible.

What’s your view on that ?
Thanks in advance for your input.

Best regards



Hi Luke,

Good catch. You are correct that the 3rd rule wouldn’t notify a user (because there isn’t a user on-call).

A fix would be not restricting the rotations to a time interval so there is always a user on-call for each schedule. Like you mentioned, this does give the impression that a user is on-call more than expected, but again the next schedule would not be notified unless the first 2 users fail to acknowledge the alert. Listed are two screenshots (one weekly vs. one daily)

Otherwise, another work around would be adjusting the escalation rules to not route to the second schedule, but specific users (3&4). The rules would look like this:


Let me know what you think! We can continue to work around this.


Hi Nick,

I arrived at the same conclusion to notify the users 3&4 directly.

Many thanks for your help on this topic, your support is really appreciated.

I’ll put this in opsgenie on friday and keep you posted after some tests (probably next week).

Have a nice day


Feature Request: Different notification settings depending on team