Skip to main content

Conditions — the IF blocks

A condition decides which way the flow goes. It carries the amber IF badge and has one output port per outcome, so you can wire a different path to each one.

Studio has three condition blocks:

BlockQuestion it asksOutputs
Condition If/ElseDoes this value match my rule?One port per IF branch, plus an optional ELSE
Business HoursAre we open right now?Open · Closed
Agent AvailabilityIs anyone signed in to take this?Online · Offline

All three appear in the Flow group of the block picker, and all three work in both messaging and voice flows.

A flow branching on a condition


Condition If/Else

Routes the flow by comparing a value against a rule. Each rule you add becomes its own labelled output port.

Properties

PropertyOptionsWhat it does
Match modeFirst match only · All matching branchesWhat to do when more than one rule matches.
IF branchesA list of rulesEach row is one branch. See below.
Add ELSE branchOn / OffAdds a catch-all port for everything that matched nothing.
ELSE labelTextThe name shown under the ELSE port. Defaults to Everything else.

Anatomy of a rule

Each IF row has four parts:

PartWhat to put in it
Branch labelA short name — Sales, Support, VIP. It becomes the port label on the canvas, so make it readable.
Value / variableThe thing being tested, written as a plain variable key: message.content, client_reply.content, http.json.status.
OperatorHow to compare. See the table below.
Compare asText · Number · Boolean · Variable — how to read the right-hand side.
Compare toWhat to compare against: a word, a number, true, or another variable.

Condition If/Else configuration

Operators

OperatorTrue whenNotes
equalsThe two values are the same
does not equalThey differ
containsThe right-hand text appears anywhere in the left-hand valueNot case-sensitive
does not containIt does not appearNot case-sensitive
starts withThe value begins with the textNot case-sensitive
ends withThe value ends with the textNot case-sensitive
greater thanLeft > rightNumbers only; a non-numeric value is never a match
greater/equalLeft ≥ rightNumbers only
less thanLeft < rightNumbers only
less/equalLeft ≤ rightNumbers only
existsThe value is present and not emptyCompare to is ignored
does not existThe value is missing or emptyCompare to is ignored
tip

contains is the workhorse for customer replies — people type "sales please" and "I need SALES", not "sales". Reach for equals only when you control the value, for example an HTTP response code or an IVR digit.

Match mode

ModeBehavior
First match onlyRules are checked top to bottom; the first one that matches wins and only its branch runs. Order your rules from most specific to most general.
All matching branchesEvery rule that matches runs its branch, in parallel.

The ELSE branch runs only when no IF rule matched at all.

Branch ports

Every IF rule adds a port under the block, labelled with the branch name; ELSE adds one more. Drag a connector from each port to whatever should happen on that path. A port you leave unconnected simply ends that path — which is a perfectly good way to say "do nothing in this case".

Conditions after a wait

When a condition sits after a Reply Message with Wait for client response on, it evaluates against the customer's answer. Both {{message.content}} and {{client_reply.content}} hold that answer.

caution

If a post-wait condition matches nothing and has no ELSE branch, the flow stays parked at the condition and re-evaluates on the customer's next message. That is useful for "keep asking until they pick a valid option", but it means a customer can loop forever. Always give them a way out: an ELSE branch, a handover to a human, or an End Session block.


Business Hours

Routes the flow by a named schedule you defined in Settings — weekly opening hours in a chosen timezone, with optional holiday calendars.

Properties

PropertyWhat it does
Schedule (required)Pick one of the account's business-hours schedules.

Outputs

PortRuns when
OpenThe current time falls inside the schedule's opening hours.
ClosedIt falls outside them, or the day is a holiday on a calendar the schedule considers.
VariableHolds
{{business_hours.status}}open or closed
{{business_hours.schedule_id}}Which schedule was evaluated
{{business_hours.timezone}}The schedule's timezone

Notes

  • The schedule's own timezone is used, not the customer's and not the browser's. A team in Tel Aviv and a team in London can each have their own schedule in the same account.
  • Schedules are created in Settings → Business Hours. New accounts have none — create the ones you actually need. See Settings.
  • The same schedule can be reused by any number of flows. Change the hours once and every flow follows.

Good uses: an out-of-hours auto-reply on messaging, and a "we're closed, leave a message" branch on a phone flow.


Agent Availability

Asks whether anyone is signed in to Teloring right now — the same green dot you see in Team Chat. It is a live-session check, not a status an agent sets.

Properties

PropertyOptionsWhat it does
CheckSpecific agents · Anyone in the accountWho to look at.
Agents to check (required for Specific)Agent pickerThe agents this branch depends on.
Consider online whenAt least one selected agent is online · All selected agents are onlineHow strict the check is. Appears for Specific agents.

Agent Availability configuration

Outputs

PortRuns when
OnlineThe check passed.
OfflineIt did not.
VariableHolds
{{availability.status}}online or offline
{{availability.online_count}} · {{availability.offline_count}} · {{availability.checked_count}}The counts behind the answer
{{availability.online_ids}} · {{availability.offline_ids}}Which agents
{{availability.first_online_id}} · {{availability.first_online_name}}A convenient "someone who can take this"

Two rules worth knowing

  • An empty selection is never "everybody". If Check is set to Specific agents and no agent is selected, the result is Offline and the block shows a warning. This is deliberate: an unfinished block must not quietly behave like Anyone in the account and pass because some unrelated teammate happens to be signed in.
  • AI Agents never count as online. They hold no session, so an always-available AI Agent cannot satisfy a human-availability branch. They are also left out of the picker.
tip

{{availability.first_online_name}} is handy for a message like Connecting you to {{availability.first_online_name}}… right before you hand the conversation over.

Next