Skip to content

Filter

Send the conversation down different paths depending on the customer's answers.

What it does#

Filter checks answers and variables and sends the conversation down the first path whose conditions match: If 01, If 02 and so on. If none match, it goes to Else. The customer doesn't see this step.

Use it for checks like age under 18, city is Tel Aviv or order number is empty. When you branch many ways on one value, Switch is simpler.

Set it up#

  1. 1

    Add the step

    Drag Filter from the Tools group in the Steps panel, connect the step before it, and click it. Under Conditions, open If 01.

  2. 2

    Pick what to check

    In Field, choose an answer or variable, for example @age. To type a fixed text instead, turn on the switch next to the field.

  3. 3

    Pick how to compare

    Choose a check from Any answer, Text, Number or Date, for example Number: is less than. For text, tick Match letter case only if Yes and yes should count as different.

  4. 4

    Enter the value

    In Value to compare, type the value (for example 18) or choose another variable. Any answer checks don't need a value.

    A new Filter step. Click Add group to add the first condition, then fill in the value.
  5. 5

    Add more conditions or paths

    Click Add condition and choose and or or between conditions. Click Add group for another path. Put the most specific path first: the first match wins.

  6. 6

    Connect every path

    On the canvas, connect each If output and Else to the next step. Test an answer for each path in Preview.

The checks#

TypeChecks
Any answerhas an answer, is empty
Textis, is not, contains, does not contain, starts with, does not start with, ends with, does not end with
Numberis, is not, is more than, is at least, is less than, is at most
Datethe same as Number. Choose the date format both values use, for example DD MM YYYY.

For anything these checks can't do, switch the condition to Expression and write a formula, then click Test expression, fill in Sample variables and click Run. See Expressions.

Errors and what you see#

  • The conversation always goes to Else. No path matched. Check the variable name, the type (Number vs Text), letter case, and the date format. Test with the exact answer a customer would send.
  • A Number or Date check is ignored. If the value isn't a plain number (for example 1,000 or eighteen) or a valid date, that condition is skipped, so the path may still match on its other conditions. Ask for the answer with a Number or Date step first, so it's always clean.
  • "and" and "or" give an odd result. Conditions are read from top to bottom: A or B and C means (A or B) and C. Use separate groups when in doubt.
  • "Any answer" says a fixed text is empty. Use Any answer on variables only.
  • "0" counts as an answer. That's expected: only a missing or blank answer is empty.
  • Logs shows "Flow expression error". An expression failed, so that condition counted as no match. Open the step and use Test expression to find the mistake.
  • The bot stops or restarts after the Filter. The path it took isn't connected. Connect every If output and Else.

Examples#

By age and goal. If 01: @age Number: is less than 18 → kids' programs. If 02: @goal Text: contains whitening and @age is at least 18 → whitening offer. Else → general menu.

Ask only when something is missing. If 01: the order number Any answer: is empty → ask for it. Else → look up the order.

With an expression. Switch the condition to Expression: #status in ["paid", "sent"] && number(@age) >= 18. In Test expression, enter #status = paid and @age = 31 in Sample variables and click Run.