> ## Documentation Index
> Fetch the complete documentation index at: https://unify-19-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Filter builder

> Choose records with conditions and groups.

export const ThemedImageFrame = ({lightSrc, darkSrc, alt, caption}) => <Frame caption={caption}>
    <div className="block w-full dark:hidden">
      <OptimizedImage className="w-full" src={lightSrc} alt={(alt ?? caption) ?? ""} />
    </div>
    <div className="hidden w-full dark:block">
      <OptimizedImage className="w-full" src={darkSrc} alt={(alt ?? caption) ?? ""} />
    </div>
  </Frame>;

## Overview

Use the filter builder to describe which companies or people should match a
set of criteria. Combine company and contact details with CRM data, website
and product activity, custom data, and list membership. The same controls appear
when creating lists, defining audiences and exclusions, and configuring play triggers.

Start with the records you want to find, then add the conditions they must
meet. For example, an audience might include companies in a target-account
list with at least 100 employees. Both conditions apply to each company.

## What you can filter

Start with the kind of record you want in the results, such as companies or
people. You can then use several kinds of information to decide which records
qualify:

| Data | Example criteria |
| - | - |
| Company and person details | Companies with at least 100 employees, or people with a particular job title. |
| CRM data | Accounts with a particular owner, contacts with a lifecycle stage, or companies with an open opportunity. |
| Custom data | Companies with a target account score, or with a related subscription on a particular plan. |
| Website and product activity | Pricing-page visits, repeat sessions, or a custom event with specific properties. |
| List membership | Records in a target-account list or outside a list you have already worked. |
| Outreach and other signals | People enrolled in a sequence, email replies, persona matches, or job changes. |

The choices depend on the record type, connected data, and feature where you
open the builder. For example, company filters can describe a company's people
through a relationship, while a people filter can use a person's sequence
activity directly.

## Add a condition

<Steps>
  <Step title="Choose what to filter">
    Click **Add condition** and search for a field or browse the available
    categories. Attributes are fields such as company size or job title.
    Signals describe activity, such as page views. List conditions check
    membership in a saved list.

    Quick filters above the conditions provide shortcuts to common choices.
    Check the field's source when selecting it: a company field in Unify and
    a field on its connected CRM record can contain different values.
  </Step>

  <Step title="Set the comparison and value">
    Choose an operator, then enter or select the value to match. The available
    operators depend on the field. For example, use **contains** for part of a
    text value or **>=** for a minimum employee count.

    For activity filters, specify the time window as well as the activity.
    A condition for the past week changes as activity enters or leaves that
    window.
  </Step>

  <Step title="Review the matches">
    Check the matching count and preview where available. Open a few records
    to confirm that the condition selects the companies or people you expect.
    Add another condition to refine the selection.

    <ThemedImageFrame lightSrc="/images/reference/filters/audience-builder-light.png" darkSrc="/images/reference/filters/audience-builder-dark.png" alt="Audience filters combining membership in Outbound planning accounts with an employee count of at least 100; the preview contains Cedar Labs and Summit Systems." />
  </Step>
</Steps>

### Choose an operator

An operator describes how a field's value must compare with your selection.
The field's type determines which comparisons are available.

| Field type | Useful comparisons |
| - | - |
| Text | Match a complete value, part of a value, or its beginning or end. |
| Number or currency | Set a minimum, maximum, or range. |
| Date or datetime | Compare with a date or a relative time window. |
| Select or multiselect | Match selected options; multiselect fields can require any or all of a set. |
| Boolean | Require a true or false value. |

Use a missing-value check such as **is null** when you need records without a
value. For a relationship, use an existence condition to check whether a related
record is present.

## Combine conditions

Use the selector beside the second condition to choose how conditions at
that level combine:

| Operator | What matches | Example |
| - | - | - |
| and | Every condition must match. | Companies in a target list with at least 100 employees. |
| or | At least one condition must match. | Companies in either of two target industries. |

Changing this selector changes the operator for the whole group. Use a nested
group when you need to combine both operators.

### Group related conditions

Click **Add group**, then add conditions inside it. Set the group's operator
using the selector beside its second condition. The group's header summarizes
whether all conditions or at least one must match.

For example, you might limit the results to your planning accounts and include
companies with at least 100 employees or a specific smaller account you want
to pursue. Keep the planning-account condition outside the group, joined with
**and**. Inside the group, join the size and account-name conditions with **or**.

<ThemedImageFrame lightSrc="/images/reference/filters/filter-groups-light.png" darkSrc="/images/reference/filters/filter-groups-dark.png" alt="A company domain condition joined with and to a nested group that matches at least 100 employees or the name Willow Works." />

The example above limits the scope by domain. Within that scope, Cedar Labs
and Summit Systems qualify by size; Willow Works qualifies by name.

## Filter by CRM data

CRM filters use the fields and relationships synced from your connected CRM.
For example, you can select accounts by owner or type, contacts by lifecycle
stage, and opportunities by status, amount, or close date. Custom CRM fields
are available alongside standard fields when synced into Unify.

In the condition picker, use **Related** to choose the CRM record connected to
the company or person. Then select the field on that record. Check the source
shown in the picker: a field on a Unify company and a similarly named field on
its CRM account can contain different values.

If a field or record is missing, check your integration's sync configuration
and whether the initial sync has finished. See the
[Salesforce](/reference/integrations/salesforce/bidirectional-syncs#syncing-changes-from-salesforce)
and [HubSpot](/reference/integrations/hubspot/bidirectional-syncs#syncing-changes-from-hubspot)
guides for how CRM data reaches Unify.

## Filter by related records

Relationships let you use information stored on another record. A company can
have people, CRM accounts, opportunities, or custom records linked to it. Use
**Related** in the condition picker to select one of these relationships, then
add conditions on the related record.

Choose **has** to require at least one related record matching the conditions.
Choose **doesn't have** to find records with no related record matching them.
For example, “doesn't have an open opportunity” selects companies for which no
linked opportunity meets your definition of open.

### Nest CRM relationships

You can follow more than one relationship. For example, to find companies
whose Salesforce account has an open opportunity worth at least 25,000:

<Steps>
  <Step title="Select the connected account">
    In the company filter, choose **Salesforce Accounts** and add a **has**
    condition.
  </Step>

  <Step title="Follow the opportunity relationship">
    Inside the account condition, click **Add Salesforce Account condition**
    and select **Opportunities**. Choose a field such as **Closed** to add a
    condition inside that relationship.
  </Step>

  <Step title="Define the qualifying opportunity">
    Set **Closed** to false. In the same opportunity group, add an
    **Amount** condition of at least 25,000, joined with **and**.

    The result is a set of companies linked to accounts with a qualifying
    opportunity. The screenshot also limits the companies to the example domain.

    <ThemedImageFrame lightSrc="/images/reference/filters/related-data-filters-light.png" darkSrc="/images/reference/filters/related-data-filters-dark.png" alt="Company filters following Salesforce Account to Opportunity, with Closed set to false and Amount at least 25000 inside the same opportunity group." />
  </Step>
</Steps>

Follow the relationships available in your CRM. For example, a HubSpot company
can lead to its associated deals, where you can filter on deal fields. The
relationship and field names reflect the connected data.

### Match the same related record

Conditions within one relationship group apply to the same related record.
In the example above, one opportunity must be both open and worth at least
25,000. Two separate opportunity groups could each match a different
opportunity on the account.

The same principle applies to people: put title and email conditions inside
one person relationship when you want a single contact to satisfy both.
Use [condition groups](#group-related-conditions) inside a relationship to
express alternatives for that related record.

## Filter by custom data

Custom attributes work like additional columns on companies or people. For
example, filter companies by a target account score or people by a product
role. Select the attribute and compare its value using the operators for its
type.

Custom objects hold separate records, such as subscriptions or product
workspaces. To find companies using that data, follow the custom relationship
under **Related**, then add conditions on those records. For example, a company
could qualify when it has an active subscription with at least 20 seats.

The records and their links must be populated in Unify before they can match.
Your administrator can [create attributes](/reference/objects/create-attributes)
and [relate objects](/reference/objects/relate-objects) to make this data
available. Use dedicated text, number, date, or choice attributes for values
you want to filter in the builder; JSON attribute filtering is not supported
in this UI.

## Filter by website and event data

Activity filters combine what happened, how often it happened, and when it
happened. You can combine them with CRM and record conditions, such as target
accounts that recently visited your pricing page.

### Website activity

Use page-view filters to match visits to a particular URL and set a count and
time window. Session filters let you narrow activity by referrer, UTM
parameters, location, or page views within the session. For companies,
visitor filters can describe the visitors whose activity qualifies.

For example, find companies with at least two pricing-page views in the past
seven days. A relative window advances over time, so older activity stops
contributing to the count.

### Custom events

Custom events describe actions your website or product sends to Unify, such
as a form submission, a teammate invitation, or a usage limit reached. Choose
**Custom events** under **Signals → Web & product data**, then select the event
name, a count, and a time window.

Add property conditions inside the event filter to narrow which occurrences
count. A property can be text, a number, a decimal, or a boolean; choose the
type that matches the value your application sends.

For example, if your product sends a `Usage limit reached` event with a
`feature` property, filter for at least three occurrences in the past seven
days where `feature` equals `exports`. Only events matching the name, time
window, and property conditions contribute to that count. Conditions joined
with **and** within this event filter must match the same event occurrence.

<ThemedImageFrame lightSrc="/images/reference/filters/custom-event-filters-light.png" darkSrc="/images/reference/filters/custom-event-filters-dark.png" alt="A custom event filter requiring Usage limit reached at least three times in the past seven days, with the text property feature equal to exports." />

Company filters count qualifying activity associated with the company;
people filters count activity associated with that person. Events must have
reached Unify and be associated with the appropriate company or person to
contribute to its results. See
[connect product usage data](/developers/guides/product-usage-data/introduction)
for setup.

## Edit and reuse conditions

Click a condition's field, operator, or value to change it. Its options menu
offers **Duplicate**, **Copy**, **Paste below**, and **Remove**. Groups have an
options menu too, so you can reuse a set of conditions together.

After changing a group's operator or moving conditions between groups, review
the full expression and its preview. Grouping determines which alternatives
can qualify a record.

## Use the filters in your workflow

The surrounding feature determines what happens to matching records:

| Where you use filters | Result |
| - | - |
| [Create a list](/reference/lists#create-a-list) | Adds the records that match when list creation runs. |
| [Audiences](/reference/lists/create-an-audience) | Saves conditions that determine the audience's current results. |
| [Exclusions](/tutorials/how-to-create-an-exclusion) | Defines records to exclude wherever that exclusion is enabled. |
| [Play triggers](/reference/plays/triggers) | Defines the records eligible for the configured trigger. |
| [List tables](/reference/lists#find-records-within-a-list) | Narrows the records displayed in the list. |

Available fields and controls depend on the record type and the feature where
you open the builder. Save or apply your changes using that feature's controls.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Why are expected records missing?">
    Check the field's source, the operator, and each group's logic. Confirm
    the record has the value you expect, then review any activity time window
    or related-record condition. Audiences and list creation also apply
    enabled exclusions, which can remove otherwise matching records.
  </Accordion>

  <Accordion title="Why is a field or event unavailable?">
    Check that you are filtering the right record type and looking under the
    correct source or relationship. Confirm that the data has reached Unify.
    CRM fields depend on sync configuration; custom records need their
    relationships populated; event names and properties come from received
    events. Some workflows offer a smaller set of filters.
  </Accordion>

  <Accordion title="How do I find records with a missing value?">
    Use **is null** when the field offers it. Use **is not null** to require a
    value. For a relationship, check whether you mean a missing related record
    or a missing field on an existing related record.
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.