How to write a filter that calls only certain states
Build a VICIdial lead filter with a one-line SQL fragment so your campaign dials only the states you choose, then test it before going live.
Maybe you only hold a license to call a couple of states, or you want one campaign that focuses on the West Coast. Instead of splitting your data into separate lists by hand, you can tell the dialer to only pull leads from the states you choose. A Lead filter does exactly that with a short line of SQL, and once it is attached to your Campaign the rest happens automatically.
What a filter actually does
A filter is a small piece of SQL (the language databases use to ask questions) that narrows down which records the dialer is allowed to call. You do not write a whole query. You write one condition, and the Hopper (the queue that loads the next batch of leads to dial) bolts your condition onto its own selection automatically. Because of that, your fragment should never start or end with the word AND, since the hopper adds that part for you.
Each Lead in your data has a state column, so filtering by state is one of the cleanest examples to learn on.
The SQL you put in the Filter SQL box
To call only California and Nevada, set the Filter SQL field to this:
state IN('CA','NV')
The IN keyword lets you list as many values as you want inside the parentheses, each in single quotes and separated by commas. Want to add Arizona and Oregon too? Just extend the list:
state IN('CA','NV','AZ','OR')
Use the two-letter postal codes exactly as they appear in your data. If your records store full state names instead, match those instead of the abbreviations.
Setting it up step by step
- Open the Filters section and add a new filter. Give it a short Filter ID (letters and numbers only, 2 to 20 characters) and a descriptive Filter Name.
- Drop a note in Filter Comments such as calls only CA and NV leads so the next person understands it at a glance.
- Paste state IN('CA','NV') into the Filter SQL field. No leading or trailing AND.
- Save, then attach the filter to your campaign so the hopper starts honoring it.
How the hopper applies your filter
flowchart TD
A[Hopper cron runs] --> B[Read campaign filter SQL]
B --> C[Add filter as AND clause]
C --> D{Lead matches state list}
D -->|Yes| E[Load into hopper]
D -->|No| F[Skip lead]
E --> G[Agent dials lead]Every time the hopper refills, it reads your filter, treats it as one more condition the record must satisfy, and only loads matching leads. Anything outside your state list is quietly skipped. This pairs nicely with Predictive dialing, because the dialer keeps pace while only ever touching the geography you allow.
Always test before you flip it on
A filter that is too tight can leave your agents with nothing to call. Before you enable it on a live campaign, use the Test On Campaign feature on the filter page. It previews how many leads would still be dialable, so you catch an empty or near-empty pool first. If you also run a DNC (do not call) scrub or other restrictions, the available count is whatever survives all of them combined.
For the wider view of how filters fit into clean, compliant dialing, read our guide to VICIdial quality control. If you want a deeper look at the SQL itself, see filter SQL syntax explained.
Filters are built into every VICIfast plan, and a new server is yours in under 40 seconds. See our pricing to get started.
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 that calls only certain states”. VICIfast LLC, June 26, 2026. Retrieved from https://vicifast.com/blog/build-vicidial-filter-by-state
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.