IVR Node: Condition (if/else)
How to use the Condition node in the IVR flow editor to evaluate a boolean expression about the caller, the contact, or stored variables.
The Condition node evaluates a simple boolean expression and routes the call down the true or false output based on the result. It's a pass-through node: no audio plays and there's no caller interaction.
Configuration
- Expression: the condition text to evaluate. Supports:
- Identifiers:
caller.number,caller.country,contact.id,contact.name,contact.email,contact.tags(a list),contact.is_new(true/false),now.hour,now.day_of_week,now.date, plus any variable you stored earlier via "Store in variable". - Literals: numbers, single-quoted strings (
'text'),true,false,null. - Operators:
==,!=,<,>,<=,>=,&&,||,includes(checks if a value is in a list, or a substring of text),starts_with,ends_with,is_empty,is_not_empty(these last two stand alone, with no right-hand operand). - Parentheses for grouping.
It's intentionally simple: no arithmetic, no function calls. If you write something outside this grammar, the condition evaluates to false (it never breaks the flow).
Example
After a Contact lookup node, you add a Condition with the expression:
contact.tags includes 'vip' && now.hour < 20
If the contact has the "vip" tag AND it's before 8pm, the call follows the true output to a direct transfer to a senior agent; otherwise it follows false to the regular menu.
Tips
contact.is_newistruewhen Contact lookup found no matching contact — handy for treating new callers differently.- To check whether a variable captured via Caller input is empty, use
my_variable is_empty(no comparison value needed). - Chain a few simple conditions instead of one giant expression — it's easier to debug by seeing which output (
true/false) each call took in the IVR analytics.
Troubleshooting
If the condition unexpectedly always evaluates to false, check: that variable names match exactly what was stored earlier, that literal text is wrapped in single quotes, and that there are no unclosed parentheses — any syntax error also silently resolves to false.
Related articles
-
WhatsApp calls in Omnifox
Receive and make WhatsApp voice calls directly from the Omnifox inbox.
-
IVR, call queues and routing
Design voice menus (IVR), organize call queues, and connect your own PBX to Omnifox.
-
View call history and play recordings in the inbox
Find every call in the inbox Calls tab and listen back to recordings without leaving Omnifox.
-
Start a call from a conversation
Voice-call a contact without leaving the chat: the Call via WhatsApp button dials the call and logs it in the inbox.
-
Configure your call settings (device, microphone and SIP)
Get your browser, microphone and SIP connection ready to place and receive calls right from the Omnifox Inbox.