How to write a filter based on called-count
Use the called_count column in a VICIdial lead filter to dial only leads with the right number of attempts, then preview the result before enabling.
Some leads are fresh, some have been called a dozen times. If you want to treat those groups differently, the cleanest tool is a Lead filter built around how many times a record has been dialed. It is a one-line SQL fragment, and it lets you build attempt-based dialing tiers without touching your lists or your data.
This post explains the column that counts attempts, shows a few filter fragments you can paste in, and covers the small rules that keep them working.
What the called_count column actually counts
Each Lead row stores a number called called_count: how many times the system has placed a call attempt to that record. A brand-new lead sits at zero. Every dial bumps it up. So filtering on called_count lets you carve your data into stages, for example only dialing records that have had a handful of attempts, or holding back ones that have already been worked hard.
You write the rule as a SQL fragment, just the condition, not a whole query. The Hopper cron script that loads dialable records wraps your fragment into its own query, so you only supply the piece that does the choosing. The same rule applies as with every filter: do not begin or end your fragment with the word AND, because the cron adds that for you.
Filter fragments you can paste in
To dial only the fresher records, those with fewer than four attempts, use a simple comparison:
called_count < 4
To target a specific band of attempts, list the exact values you want. This fragment dials only leads sitting at eight through eleven attempts:
called_count IN('8','9','10','11')
And to pick a clean middle range, combine two comparisons. This keeps leads that have been called more than four but fewer than eight times:
called_count > 4 and called_count < 8
Notice the lowercase and in that last one is in the middle, joining two conditions. That is fine. The rule is only about the start and end of the whole fragment.
How count-based filters route your leads
flowchart TD
A[Lead in list] --> B{Read called_count}
B -->|Below 4| C[Fresh tier campaign]
B -->|4 to 7| D[Follow up tier]
B -->|8 to 11| E[Final attempts tier]
B -->|12 or more| F[Excluded by filter]
C --> G[Hopper loads lead]
D --> G
E --> GA neat trick: run several Campaign setups, each with its own count band. Fresh leads ring out on an aggressive pace, while older records get a gentler follow-up. The filter never changes a record; it only decides which campaign sees it on a given pass, so the same data can flow through different tiers over its lifetime alongside your normal Lead recycling rules.
Confirm leads remain before you enable
A tight count band can match very few records, especially on a freshly loaded list where most leads are still at zero. Before attaching the filter to a live campaign, use the Test On Campaign preview to see how many leads would still be dialable. If the number is too low, widen the band or pick a different range.
New to building these? Start with how to add a filter, then see the quality control overview for where filters fit in a clean operation.
Skip the server setup entirely. Our VICIfast plans give you a fully managed dialer with filters and hopper ready to go in under 40 seconds.
About VICIfast LLC
VICIfast LLC operates a managed VICIdial hosting + BYOI service for outbound and inbound call centers. We run the dialers, the carriers, the recordings pipeline, and the compliance plumbing so operators don’t have to.
Citing this article
VICIfast Engineering. “How to write a filter based on called-count”. VICIfast LLC, June 26, 2026. Retrieved from https://vicifast.com/blog/build-vicidial-filter-by-called-count
Have questions?
Related posts
You might be interested in
VICIfast newsletter
Liked this? Get the next one in your inbox.
We ship the kind of stuff you just read — concrete, numbers-first, no drip. One email when a new post goes live. Unsubscribe in one click.
Comments
No comments yet — be the first.