Skip to main content
The filter block is the routing logic layer in a Phonely call flow. You use it when the next step in the conversation shouldn’t be the same for every caller, because something about the call should change the route. That “something” can be simple (like whether an email was collected) or more operational (like whether the caller is VIP, the request is urgent, or the caller is trying to reschedule). Instead of writing one long conversational prompt that tries to handle every situation, the Filter block lets you model those situations as explicit routing paths. The key idea to understand is that Phonely does not route based on individual conditions. It routes based on cases. Each case becomes a visible output on the canvas that you connect to a different part of your flow. The filter block decides which case output to follow by evaluating the conditions inside each case. A condition is simply a rule used to qualify a case, such as:
  • caller_email exists
  • plan_type is equal to "premium"
  • detected_topics contains "refund"
  • AI match: “caller wants to reschedule an appointment”
In simple terms:
  • Cases define where the call can go.
  • Conditions define when the call is allowed to take that route.
When the filter block runs, Phonely evaluates your cases top to bottom, and selects the first case whose conditions are met. If none of the cases match, the call falls through to the Else path. This ordering matters. If Case 1 is too broad, it can “catch” calls that you intended for Case 2. That’s why filter blocks work best when you structure your cases from most specific to most general, and treat Else as your safe fallback. Filter Block Phonely Gi

Use Cases

Here are common scenarios where the filter block is useful:
  1. Routing based on caller type: Direct callers to different paths depending on who they are. For example, If caller_type = existing_customer, route to account manager; otherwise, to sales intake.
  2. Time-based call handling: Handle calls differently based on time or day. For example, If current_time is after 6 PM, route to after-hours voicemail; else continue to live agent.
  3. Service level routing: Serve customers according to their plan or service tier. For example, If plan_type = premium, send to priority support; if not, route to standard support.
  4. Geographic routing: Route calls based on caller location or language preference. For example, If caller_country = USA, connect to US team; if caller_country = South Africa, route to Cape Town Team.
  5. Priority-based escalation: Automatically escalate high-priority or urgent cases. For example, If ticket_urgency = High and customer_status = VIP, route to sscalation queue.

How routing works in the Filter block

When a call reaches a filter block, Phonely doesn’t evaluate one big “true/false” decision. Instead, it evaluates your cases in order and picks the first case that matches. Here’s the routing behavior to keep in mind:
  1. Phonely starts with Case 1 and checks the conditions inside it.
  2. If Case 1’s conditions are met, the call immediately routes to Case 1’s output path.
  3. If Case 1 does not match, Phonely checks Case 2, then Case 3, and so on.
  4. If no case matches, the call routes to the Else path.
Examplefiltersblock

Set Up a Filter Block

In your flow, click the “+” icon after any existing block. Under Flow Actions, choose Filter. The Filter block will appear with two output paths: Case 1 and Else.

Create a case (the routing path)

Click the filter block to open the Filter block configuration panel. Under Cases, you’ll see Case 1 by default. A case is the actual route you will connect on the canvas. Think of it as:
“If this case matches, send the call down this path.”
To add another route, click Add Case. This creates a new output path on the canvas (e.g., Case 3)
Cases And Conditions Filter Gi

Define Your Conditions inside a case

Each condition is a rule that tells Phonely what to check. Click the filter block to open its configuration panel. Under Conditions, click into Condition 1. You’ll see three main fields:
FieldDescription
Define FieldThe variable or data point you want to evaluate (e.g., caller_phone, customer_name, response).
Comparison OperatorDefines how the field is compared, options include:
exists
doesn’t exist
is equal to
is not equal to
is an array containing
matches condition (AI)
does not match condition (AI)
Value Type & Comparison ValueSelect the data type (String, Number, or Boolean) and specify the value to compare against. AI-based operators do not require a value type, they evaluate natural-language intent statements.

Choose Available Variables

Click inside define field, this opens the available variables panel. Here you’ll find:
  • Call Variables – System-generated details like caller ID, phone number, or call metadata.
  • Custom Variables – Variables you’ve defined manually.
  • Auto-Gather Variables (Beta) – Prompts the caller at the moment a block needs a value (name, email, date, etc.) no extra Talk block required.
  • Collect Caller Details – Inputs from Collect or Ask Exactly blocks (e.g., caller_name, caller_phone).

Select the Comparison Operator

Click the dropdown that says “is equal to” to see other options:
1

exists

Checks whether the variable has any value. Useful for verifying that earlier blocks captured caller input.
2

Doesn’t exist:

Use this when you want a fallback path if a value is missing. True when the variable is empty, null, or was never set.
3

is equal to

Use this when you want exact matching. Best for categories, flags, status fields, or known inputs
4

is not equal to

Use this when one value is allowed and everything else should go to another path.
5

is an array containing:

Used when the variable is a list and you need to check if it contains a specific item.
6

matches condition (AI)

Uses AI to evaluate whether the caller’s message or extracted intent semantically_matches_ a natural-language condition you define.
7

does not match condition (AI)

The inverse of the above. True when the caller’s message or intent does not match your natural-language condition.
These AI-powered options are ideal when you want logic based on intent, not exact words, enabling more natural decision-making without manually collecting variables.Choose one that fits your logic.

Enter the Comparison Value

Under the comparison dropdown, click the small menu and choose the correct type of the value you want to compare against.
Data TypeWhen to Use
StringFor text values like names or words.
NumberFor numeric comparisons like age, amount, or count.
BooleanFor true/false logic (e.g., is_verified = true).
Then enter your comparison value.

Add multiple conditions inside the same case (AND vs OR)

A case can contain more than one condition. When you add multiple conditions, you must choose how they combine:
Logic OptionDescription
AndAll conditions must be true for the case to match.
OrOnly one condition needs to be true for the case to match.
Example (AND): Verify caller before routing
  • caller_name exists
  • caller_phone exists
Logic: AND meaning this case only matches if both values were captured. Example (OR): Route to billing
  • AI match: “caller wants a refund”
AI match: “caller is asking about charges” Logic: OR meaning: either signal qualifies for billing.

Configure Advanced Settings

Here’s what you can adjust advanced settings let you fine-tune what the caller hears while the Filter evaluates cases, and optionally tag the call outcome for reporting. Scroll down to Advanced Settings section. Click to expand.

Interim Message

Enable Interim Message to play a short message to the caller while Phonely processes the filter logic (for example, evaluating conditions or selecting the matching case). This helps avoid awkward silence and makes the experience feel intentional. You can choose how the interim message is generated:
  • Fixed: You write the exact message Phonely should say every time. Example: “One moment while I check that.”
  • Promptable: You provide a prompt and Phonely generates a friendly 3–7 word interim message based on your instruction. Example prompt: “Generate a friendly 3–7 word interim message to inform the caller that you are working on their request.”
Interim And Post Interim Message

Post Interim Message Delay

Enable post interim message delay to add a short wait after the interim message is spoken, before the flow continues to the selected case path. Use the Delay Duration slider to set the delay in seconds. This is helpful when you want the interim message to land naturally (instead of the flow moving immediately into the next block).

Call Outcome Tagging

Use Call Outcome Tagging to label the call at this point in the flow. You can select an existing outcome or type a custom one. This is useful for analytics because it lets you track how often a specific routing decision occurs (for example, how many calls were escalated vs. handled normally), and later filter/group performance reporting by those outcomes. Example outcome tags:
  • vip_escalation
  • billing_routed
  • missing_required_info
  • appointment_booking_path

Save the Filter

Click Done to confirm and exit. Once done:
  • The block shows True and False outputs.
  • Connect the True path to actions to perform if all conditions pass.
  • Connect the False path to fallback or error handling actions.

Example: Using Variables in Filter Logic

Let’s say your Collect block gathered two inputs from the caller:
  • caller_phone
  • caller_zip_code
You can then use a filter block to determine which store location the caller should be routed to based on these values. Set Logic to And. > If both conditions are true, the flow continues through the True branch, for example, routing the caller to the Chicago Downtown Store or triggering an API Request to fetch store details in that ZIP code area. > If not, the flow follows the False branch, for example, playing a message such as:
“Sorry, we couldn’t find a nearby store based on your location. Please check your ZIP code and try again.”