Combining "And" with "Or" filters allows you to create sophisticated groups of leads and users. It also allows you to create flexible segments for your contacts, and send them targeted messages and email campaigns from Proactive Support.
There are two main ways to group filters:
And - combinations mean the contact needs to match both/all of the criteria.
Or - combinations mean the contact only needs to match one of the criteria.
How to combine "And" with "Or" filters
Click + Add filter if you're filtering your Contacts (or + Add audience rule if you're filtering the audience for a message) and select the people or company data you want to filter by.
Then click the + icon to add an additional filter and create a filter group.
Now you can select whether to apply “And” / “Or” logic between the filters in this group.
A filter group can be created using "And" / "Or" to combine data (not both).
We do not recommend filtering with pipes | in a single filter as we do not support it. While it can work, you may encounter errors when attempting to pull in too much data separated by pipes. You should set the filters up separately with an "OR" rule instead.
You can also combine filter groups using “And” / “Or” logic. Simply click + Add filter (from Contacts) or + Add audience rule (from a message) to create a new filter group.
Then you can select whether to apply “And” / “Or” logic between the different filter groups.
If you're filtering your Contacts list, click Save segment so you can quickly come back to this list and select this segment for your message audience.
Check the rules
Either get an example user to compare against the filters, or imagine you're a hypothetical user being checked against the rules.
Look at the grouping between filter groups; if it's an "And" you'll need to match all of the filter groups, if it's an "Or" you'll only need to match one of the filter groups.
Look at the first filter group. Let's say you match the first criteria. If it's an "Or", then you already match this grouping without needing to check the other filters. If it's an "And" you'll need to match the rest of the filters in this grouping.
Progress through each of the filter groups and see at which point you'd match them (or not).
Negative filters ("Is Not"/"Does Not Contain")
You'll almost always want to combine negative filters ("is not" or "does not contain") with an "And" (not an "Or"). There are exceptions of course, but you'll need to go through your logic carefully to ensure the right result. The rules must be treated as separate checks in this case.
For example, if you use "Or" for these rules below, it will match everyone.
1. Plan is not Pro
OR
2. Plan is not Premium
If a user has the Pro plan, they will not match the first rule, however, they will match the second rule, as Pro is not Premium. Therefore, you need to use "And" here.
URL filters
There are a few things to consider when targeting page URLs in filters (useful for in-app message targeting and Messenger visibility settings).
1️⃣ The first is the same as the above ☝ trying to combine multiple negative filters ("page URL is not", "page URL does not contain") should often use "And".
For example, "Current page URL is not
https://example.com/pricing
or Current page URL is nothttps://example.com/login
" will always be true, even if the user is on/pricing
or/login
at the time, because they don't match the other one. This should be an 'And' combination.
2️⃣ The second is using Referral URL instead of Current page URL. A Referral URL filter looks at the page a user was on before they arrived to the current website, not the current page they're on. This is typically used for marketing purposes, to capture where leads are being referred to a website from.
3️⃣ The third is not including the full URL (including https://
and any trailing /
parts) with an exact match ("URL is", "URL is not") filter. Those exact match filters require the entire source URL, including the https://
part (which means if a customer is on http://
they won't match for it).
A safer way to target URLs is to use "URL contains", which doesn't require the full URL to work. For example,
URL contains example.com/pricing
instead ofURL is https://example.com/pricing
.
Future Dates
When targeting dates in the future, you need to use a negative number, and if you're trying to do a "more than"/"less than" date range, include a "less than 0 days" filter to cap the range. Learn more about creating filters for dates in the future.
Powerful ways to combine filters
Users on specific platforms - You could filter for anyone who uses your iOS or Android app, who has also never used your web app. This allows you to promote cross-platform usage of your app.
Users who have completed a combination of events - There might be a few different groups of users who could benefit from a new release. With this combination you can find all the people in those groups, who haven’t yet tried your new feature.
Users in multiple specific locations - This can be helpful for billing announcements that only affect a certain region. E.g. you could find all your paying customers in Australasia if you’re changing the way you handle their payments.
Need more help? Get support from our Community Forum
Find answers and get help from Intercom Support and Community Experts