The If block adds conditional logic to an Automation Studio flow. It evaluates the criteria you give it and only lets the flow continue if that condition is met, otherwise that path terminates there.
For example, if the criteria is set to Priority is High, the block that follows will only run when the ticket's priority is actually High.
The If block supports advanced comparators for time-based conditions, letting you evaluate time-relative criteria without writing a custom function:
| Comparator | Description | Example |
|---|---|---|
| Age in | Evaluates how much time has passed since the ticket was created. | A ticket created at 10:00 AM, checked at 1:00 PM, has an Age In value of 3 hours. |
| Due in | Evaluates how much time is left before the ticket's due date or SLA deadline. | A ticket due by 5:00 PM, checked at 2:00 PM, has a Due In value of 3 hours. |
A small support team wants performance-related tickets automatically assigned to a senior team member, while everything else goes to the general queue. The flow triggers on Ticket Created, an If block checks whether the Subject contains "Performance issue", and if so, an action assigns the ticket to a named agent. Tickets that don't match the condition simply bypass this path, keeping workload distribution balanced without needing a separate rule for every ticket type.
An IT helpdesk wants to proactively catch tickets at risk of breaching their SLA and escalate them before that happens. The flow triggers on Ticket Updated, an If block checks whether the ticket is Due in 2 hours and its status is not Resolved, and if both are true, one action sets the priority to Critical and another sends an email alert to the relevant team. The time-based comparator means only tickets genuinely within that two-hour window and still unresolved trigger the escalation, avoiding unnecessary alerts on every single update.