🛠️ How-to tutorials

Using conditions and variables to branch your chatbot conversations

Updated 2026-09-19 · 5 min read · By the Convo360 team

In short

Chatbot conditional logic means routing a conversation down different paths based on a variable's value, such as a chosen language, city or budget range. On Convo360's Flow Builder, you set this up with a Condition block that checks a typed or system variable against operators like equals, contains or greater-than, then branches accordingly.

Key takeaways
  • Conditions read a variable and route the contact down one of several branches.
  • Typed variables (text, number, date) let you use operators like greater-than on price or age.
  • System variables such as {{user_name}} and {{phone}} are available without any setup.
  • Combine Condition blocks with Set Variable to build multi-step qualification logic.
  • Always test every branch in Preview before publishing a flow with conditions.

Why menus alone are not enough

A List Menu or Buttons block is fine when you are offering a fixed set of choices. But real conversations carry more context than a single tap: a contact's city, their stated budget, the language they replied in, or a value pulled from a webhook earlier in the flow. To act on that context, you need conditional logic rather than another layer of buttons.

A Condition block reads a variable and sends the contact down one of several paths. Everything downstream, the message tone, the offer, the team that gets notified, can differ per branch, without building separate flows for every scenario.

Think of it as the difference between a paper form and a receptionist. A form asks every visitor the same five questions in the same order. A good receptionist changes what she asks next based on the answer she just heard. Condition blocks give your bot that second behaviour.

Operators available in the Condition block

Convo360's Condition block supports the operators you would expect from a typed variable system:

Each Condition block can have multiple branches, so you are not limited to a simple yes/no split. A single block can fan out into five or six paths if your business logic genuinely needs that many, though for readability it is usually better to chain two smaller Condition blocks than build one very wide one.

Typed variables vs system variables

Convo360 supports typed variables, so a field you capture as a number behaves like a number, not text that happens to look like one. This matters when you branch on 'budget greater than ₹50,000' rather than doing a string comparison that breaks on '50000' vs '₹50,000'. A text-type variable holding '9' is not greater than '10' in string comparison, but a number-type variable is, so choosing the right type when you first create the variable saves you a debugging session later.

System variables such as {{phone}}, {{user_name}} and the channel a message came from are available in every flow without a Set Variable step. Combine both: capture a typed variable with Ask a Question, then branch with Condition, then personalise the reply using a system variable.

Date-type variables deserve a special mention because Indian businesses use them constantly: a policy renewal date, an EMI due date, an event date. Store these as Date variables rather than free text, so a Before/After condition can compare them correctly regardless of the format the customer originally typed the date in.

Common patterns worth copying

Three patterns cover most Indian business use cases:

A fourth pattern worth adding once you are comfortable with the basics is returning-contact routing: check a system variable or a custom field set on an earlier visit (for example has_ordered_before) and skip the introductory questions entirely for repeat contacts, taking them straight to a shorter, faster path.

Building it on Convo360

  1. In Flow Builder, add an Ask a Question block and set its answer to store in a typed variable, for example a Number variable named budget.
  2. Drag a Condition block right after it.
  3. Add branches: e.g. budget less than 50000, budget between 50000 and 200000, budget greater than 200000.
  4. On each branch, continue with an AI Reply, Send Message or Save CRM Lead block suited to that tier.
  5. Use Set Variable anywhere upstream to normalise data, for example converting a free-text city reply into a standard value before the Condition block checks it.
  6. Label each branch clearly on the canvas (Low / Mid / High, not Branch 1 / Branch 2 / Branch 3) so a colleague editing the flow six months later understands the logic at a glance.

Testing every branch before you publish

A flow with three or four Condition branches can hide a dead end you never noticed. Before publishing, open Preview / Try-it and manually walk through each branch with different sample values. Convo360's health checks also flag branches that lead nowhere, which is the most common mistake with conditional flows.

Keep drafts separate from the published version so you can test freely; only publish once every branch has been walked through at least once. It helps to keep a short written list of test values, for example budget 10000, 80000 and 500000, so anyone re-testing the flow after a change covers the same ground you did the first time.

Mistakes that break conditional flows in practice

The most common failure is a missing default or 'else' branch: a Condition block with only two explicit paths silently drops any reply that matches neither, and the contact never hears back. The second most common is comparing a number stored as text, which makes 'greater than' behave unpredictably. The third is nesting conditions too deep without labelling branches, which turns the canvas into something only the original builder can follow. Reviewing a flow's Flow Logs after a week live will show you exactly which branch real contacts are landing on most, and whether that matches what you expected when you designed it.

Step by step

  1. Capture the variableUse Ask a Question to collect a reply and store it as a typed variable (text, number or date).
  2. Add a Condition blockDrag Condition after the capture step and choose the variable you want to branch on.
  3. Define branches with operatorsAdd as many branches as you need using equals, contains, greater-than or between.
  4. Build each branchContinue each branch with the messages, AI Reply or CRM steps appropriate to that path.
  5. Test in PreviewWalk through every branch with different sample answers using Try-it dry run.
  6. Publish and monitorPublish the flow and check Flow Logs for the first few days to confirm contacts land on the right branch.

Example conversation

Budget is around 80 thousand for the renovation
Got it, ₹80,000 puts you in our mid-range package. I'll share three design options and connect you with a consultant in Pune this week.

Build your first branching flow free

Start free in minutes — no code, no credit card. Bring your own AI keys and pay no per-message markup.

Frequently asked questions

Can I use conditions with AI-generated replies, not just fixed menus?

Yes. You can branch with a Condition block first, then hand off to an AI Reply step on any branch, so the AI still has the context of which path the contact is on.

What happens if a contact's reply does not match any condition?

Without a default or 'else' branch, the contact simply never hears back, which is the single most common cause of a stalled conversation. Always add one to every Condition block so unmatched replies still get a sensible response, even if it is only an AI Reply or a hand-off to a human.

Do typed variables work for both WhatsApp and voice flows?

Yes, typed variables and Condition blocks work the same way whether the flow is running over WhatsApp, website chat or an AI voice call. A number-type budget variable, for instance, supports the same greater-than and between comparisons regardless of which channel captured the answer.

Can I combine multiple variables in one condition, like city and budget together?

Yes, use nested Condition blocks: check city first, then within that branch add a second Condition for budget, so you cover combinations without duplicating flows.

How many branches can one Condition block have?

You can add as many branches as your logic needs; a single block can fan out into five or six paths if the business logic genuinely requires it. For readability, most flows work best with three to five branches per block, chaining two smaller Condition blocks rather than building one very wide one.

Related reading

Available across India — see WhatsApp & AI calling automation by state and city.