The conditional block allows you to make decisions based on user responses, native variables and custom variables to direct the flow of a Treble conversation. Learn to use this block to create intelligent and personalized conversation flows.
Access the flow editor
app.treble.ai
Go to the Conversations section and click on Create new conversation or edit an existing conversation.Open the blocks menu
Find the conditional block
Add the block to the flow
Open the configuration
Select the condition type
Configure the condition
age
, country_code
, inbound
)18
, +57
, Support
)Add multiple conditions (optional)
Operator | Description | Example |
---|---|---|
Equal to | Compares if the value is exactly equal | age = 18 |
Greater than | Compares if the value is greater | age > 18 |
Less than | Compares if the value is less | age < 18 |
Greater than or equal to | Compares if the value is greater than or equal | age >= 18 |
Less than or equal to | Compares if the value is less than or equal | age <= 18 |
Contains | Checks if the value contains the specified text | message contains help |
Does not contain | Checks if the value does NOT contain the specified text | message does not contain spam |
Not equal to | Compares if the value is different | country != Colombia |
country_code
+57
(Colombia)country_code
= +57
→ Colombia Agenttime
09:00
time
>= 09:00
and time
< 18:00
→ Business hours messageweekday
6
(Saturday)weekday
>= 6
→ Weekend promotioninbound
Support
inbound
= Support
→ Support flowinbound
= Sales
→ Sales flowinbound
= Quote
→ Quote flowcustomer_age
18
customer_age
>= 18
→ Adult productsproblem_type
technical
problem_type
contains technical
→ Technical agentproblem_type
contains billing
→ Billing agentcountry_code
= +57
time
>= 09:00
time
< 18:00
country_code
= +57
→ Colombia Agentcountry_code
= +55
→ Brazil Agentvar1
, use names like customer_age
, problem_type
, user_country
.
inbound
= Support
→ Support flowinbound
= Sales
→ Sales flowinbound
= Billing
→ Billing flow