Condition Logic

Build precise routing rules using AND/OR logic, label matching, time windows, and nested conditions.

How conditions work

A Condition node evaluates a rule against the current alert or incident. It has two outputs:

  • True — the rule matched; execution continues down this branch
  • False — the rule didn't match; execution continues down this branch (or stops if unconnected)

Each condition rule has three parts: field, operator, and value.

Available fields

Alert fields

FieldTypeExample values
Severityenumcritical, high, medium, low, info
Statusenumfiring, acknowledged, resolved, suppressed
Sourcestringnagios, kaseya, custom-script
TitlestringAny substring match
DescriptionstringAny substring match
Integration IDstringUUID of the originating integration
Client NamestringFrom the incident's client name
Labelkey-valueAny label attached to the alert
Dedup CountnumberHow many times this alert has deduplicated
Flapping CountnumberHow many times severity has changed

Time-based fields

FieldTypeExample values
Hour of daynumber023 (UTC)
Day of weekenumMonday, Tuesday, …
Is business hoursbooleantrue/false (uses org timezone)
Is on-callbooleanWhether an on-call schedule has an active engineer

Operators

OperatorApplicable toNotes
equalsenum, stringExact match, case-insensitive
not equalsenum, stringExact mismatch
containsstringSubstring match
starts withstringPrefix match
greater thannumberNumeric comparison
less thannumberNumeric comparison
in listenumMatches any of a set of values
not in listenumMatches none of a set of values
existslabelThe label key is present
not existslabelThe label key is absent

AND / OR logic

By default, a Condition node evaluates a single rule. To combine multiple rules, click Add Rule in the Inspector and select the logic mode:

  • ALL (AND) — every rule must be true for the True branch to be taken
  • ANY (OR) — at least one rule must be true

Example — route only critical alerts from production:

ALL of:
  Severity = critical
  Label "env" = production

Example — notify for high or critical, but not during quiet hours:

ALL of:
  Severity in [critical, high]
  Is business hours = false

Nested conditions

You can nest conditions by connecting Condition nodes in sequence:

Trigger
  └─ Condition: Severity = critical
       True ─ Condition: Label "env" exists
                  True ─ Notify (with env label in message)
                  False ─ Notify (generic critical alert)
       False ─ (stop)

There's no hard limit on nesting depth up to the workflow step limit (50 nodes).

Label matching

Use the Label field to match on any key-value pair attached to an alert:

Label key:   "client"
Operator:    equals
Value:       "Acme Corp"

This is powerful for routing — send Acme Corp alerts to one Slack channel and Contoso alerts to another, all in one workflow.

Time-based routing

Route by hour of day:

Hour of day >= 18   → escalate to on-call (after-hours)
Hour of day < 8     → escalate to on-call (after-hours)

Business hours vs. after-hours:

Is business hours = true  → Slack notification only
Is business hours = false → Slack + SMS to on-call

Business hours are defined per organization in Settings → General → Business Hours.

Common patterns

Skip noisy integrations

Source != "flapping-monitor"
→ Continue

Client-based routing

Label "client" = "Acme Corp"
→ Notify: #acme-alerts Slack channel

Label "client" = "Contoso"
→ Notify: #contoso-alerts Slack channel

Severity tier escalation

Severity = critical → Immediate SMS + voice call
Severity = high     → Slack + email
Severity = medium   → Slack only
Severity = low      → Email only
Severity = info     → (no action)

Suppress flapping alerts

Flapping Count >= 3 → Suppress automatically