> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usehatchapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Audience Builder: Glossary and FAQ

The new version of the Audience Builder allows you to create even more specific lists of contacts by being able to query both the current state of data and past states of data for contacts.

Below is a glossary of all the operators as well as examples of what kinds of statements they are used for.

### Operator Glossary

There are a couple of things to consider when using the Audience Builder: The type of data that a field contains and whether you want to look at the current state of data for a contact or all historical data for a contact.

Each operator has a version which queries the current Hatch opportunity only, or queries all opportunities (example below). The operators you see in the list will depend on the data type of the selected field; the 4 data types are "text", "date", "number", "true/false" (shown in that order below).

<Frame>
  <img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-36-50-6587-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=342de99fe6c6ddfd47d5d88a22cc7d5f" alt="Text field operators" width="160" height="421" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-36-50-6587-PM.png" />

  <img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-58-57-0594-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=0438c844d178d039ba60352f39590d6a" alt="Date field operators" width="160" height="491" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-58-57-0594-PM.png" />

  <img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-41-02-8589-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=810322d7e8f6d47e2e47bf07998cff66" alt="Number field operators" style={{height: '50%'}} width="160" height="335" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-41-02-8589-PM.png" />

  <img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-42-10-2368-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=6c46e17a8a4d5e0bf2e0d71bc7edfeb6" alt="True/False field operators" style={{height: '25%'}} width="160" height="173" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-42-10-2368-PM.png" />
</Frame>

#### Text Fields

* is
  * Definition: Show contacts that have, on their most recent Hatch opportunity, the exact queried value in the queried field, nothing more and nothing less
  * Notes:
    * This is not case-sensitive, so looking for `demo no sale` would still show contacts with `Demo No Sale`
* is not
  * Definition: Show contacts that, on their most recent Hatch opportunity, do not have the exact queried value in the queried field
  * Notes:
    * This is not case-sensitive, so looking for `demo no sale` would still filter out contacts with `Demo No Sale`
* is any of
  * Definition: Show contacts that, on their most recent Hatch opportunity, have any of the exact queried values in the queried field, nothing more and nothing less
  * Notes:
    * This is not case-sensitive, so looking for `cat`, `dog` would still show contacts with `Cat` or `Dog`
* is not any of
  * Definition: Show contacts that, on their most recent Hatch opportunity, do not have any of the exact queried values in the queried field, nothing more and nothing less
  * Notes:
    * This is not case-sensitive, so looking for `cat`, `dog` would still filter out contacts with `Cat` or `Dog`
* contains
  * Definition: Show contacts that, on their most recent Hatch opportunity, have what is typed anywhere in the queried value for the queried field
  * Example: `Appointment Result` | `contains` | `Not` would return contacts that have any of the following in the field `Appointment Result`:
    * `Not Demoed`
    * `Not Qualified`
    * `not run`
    * `not scheduled`
  * Notes:
    * This is not case-sensitive, so looking for `demo no` would still show contacts with `Demo No Sale`
* does not contain
  * Definition: Show contacts that, on their most recent Hatch opportunity, do not have what is typed anywhere in the queried value for the queried field
  * Example: `Appointment Result` | `does not contain` | `Not` would filter out contacts that have any of the following in the field `Appointment Result`:
    * `Not Demoed`
    * `Not Qualified`
    * `not run`
    * `not scheduled`
  * Notes:
    * This is not case-sensitive, so looking for `demo no` would still filter out contacts with `Demo No Sale`
* is empty
  * Definition: Show contacts that, on their most recent Hatch opportunity, do not have a value for this field
* is not empty
  * Definition: Show contacts that, on their most recent Hatch opportunity, have *any* value for this field
* was ever
  * Definition: Show contacts that have, on any of their Hatch opportunities, the exact queried value in the queried field, nothing more and nothing less
  * Notes:
    * This is not case-sensitive, so looking for `demo no sale` would still show contacts with `Demo No Sale`
* was never
  * Definition: Show contacts that, on any of their Hatch opportunities, do not have the exact queried value in the queried field
  * Notes:
    * This is not case-sensitive, so looking for `demo no sale` would still filter out contacts with `Demo No Sale`
* was ever any of
  * Definition: Show contacts that, on any of their Hatch opportunities, have any of the exact queried values in the queried field, nothing more and nothing less
  * Notes:
    * This is not case-sensitive, so looking for `cat`, `dog` would still show contacts with `Cat` or `Dog`
* was never any of
  * Definition: Show contacts that, on any of their Hatch opportunities, do not have any of the exact queried values in the queried field, nothing more and nothing less
  * Notes:
    * This is not case-sensitive, so looking for `cat`, `dog` would still filter out contacts with `Cat` or `Dog`
* ever contained
  * Definition: Show contacts that, on any of their Hatch opportunities, have what is typed anywhere in the queried value for the queried field
  * Example: `Appointment Result` | `ever contained` | `Not` would return contacts that ever had any of the following in the field `Appointment Result`:
    * `Not Demoed`
    * `Not Qualified`
    * `not run`
    * `not scheduled`
  * Notes:
    * This is not case-sensitive, so looking for `demo no` would still show contacts with `Demo No Sale`
* never contained
  * Definition: Show contacts that, on any of their Hatch opportunities, do not have what is typed anywhere in the queried value for the queried field
  * Example: `Appointment Result` | `never contained` | `Not` would filter out contacts that ever had any of the following in the field `Appointment Result`:
    * `Not Demoed`
    * `Not Qualified`
    * `not run`
    * `not scheduled`
  * Notes:
    * This is not case-sensitive, so looking for `demo no` would still filter out contacts with `Demo No Sale`
* was ever empty
  * Definition: Show contacts that, on any of their Hatch opportunities, do not have a value for this field
* was never empty
  * Definition: Show contacts that, on any of their Hatch opportunities, have *any* value for this field

### Number Fields

Using a number field will only provide a text input as the value.

* is
  * Definition: Show contacts that have, on their most recent Hatch opportunity, the exact number input in the queried field.

* is not
  * Definition: Show contacts that do *not* have the exact number input in the queried field on their most recent Hatch opportunity

* is greater than
  * Definition: Show contacts that have, on their most recent Hatch opportunity, a number in the queried field that is higher than the number input.

* is less than
  * Definition: Show contacts that have, on their most recent Hatch opportunity, a number in the queried field that is lower than the number input.

* is greater than or equal to
  * Definition: Show contacts that have, on their most recent Hatch opportunity, a number in the queried field that is higher than the number input or equal to the number input.

* is less than or equal to
  * Definition: Show contacts that have, on their most recent Hatch opportunity, a number in the queried field that is lower than the number input or equal to the number input.

* is empty
  * Definition: Show contacts that, on their most recent Hatch opportunity, do not have a value for this field

* is not empty
  * Definition: Show contacts that, on their most recent Hatch opportunity, have *any* value for this field

* was ever
  * Definition: Show contacts that have, on any of their Hatch opportunities, the exact number input in the queried field.

* was never
  * Definition: Show contacts that do *not* have the exact number input in the queried field on any of their Hatch opportunities.

* was greater than
  * Definition: Show contacts that have, on any of their Hatch opportunities, a number in the queried field that is higher than the number input.

* was less than
  * Definition: Show contacts that have, on any of their Hatch opportunities, a number in the queried field that is lower than the number input.

* was greater than or equal to
  * Definition: Show contacts that have, on any of their Hatch opportunities, a number in the queried field that is higher than the number input or equal to the number input.

* was less than or equal to
  * Definition: Show contacts that have, on any of their Hatch opportunities, a number in the queried field that is lower than the number input or equal to the number input.

* was ever empty
  * Definition: Show contacts that, on any of their Hatch opportunities, do not have a value for this field

* was never empty
  * Definition: Show contacts that, on any of their Hatch opportunities, have *any* value for this field

### True/False

True/False fields do provide a value input because the query ends with the operators listed below.

* is true
  * Definition: Show contacts that have, on their most recent Hatch opportunity, a value of `true` for the queried field.

* is false

  * Definition: Show contacts that have, on their most recent Hatch opportunity, a value of `false` for the queried field.

* was ever true
  * Definition: Show contacts that have, on any of their Hatch opportunities, a value of `true` for the queried field.

* was ever false
  * Definition: Show contacts that have, on any of their Hatch opportunities, a value of `false` for the queried field.

### Date Fields

* is
  * today
    * Definition: Show contacts that, on their most recent opportunity, have the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on their most recent opportunity, have the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on their most recent opportunity, have the selected time frame in the queried field.

* is not
  * today
    * Definition: Show contacts that, on their most recent opportunity, do not have the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on their most recent opportunity, do not have the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on their most recent opportunity, do not have the selected time frame in the queried field.

* is after
  * today
    * Definition: Show contacts that, on their most recent opportunity, have a date after the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on their most recent opportunity, have a date after the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on their most recent opportunity, have a date after the selected time frame in the queried field.

* is before
  * today
    * Definition: Show contacts that, on their most recent opportunity, have a date before the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on their most recent opportunity, have a date before the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on their most recent opportunity, have a date before the selected time frame in the queried field.

* is on or after
  * today
    * Definition: Show contacts that, on their most recent opportunity, have a date on the current calendar date or after the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on their most recent opportunity, have a date on the selected calendar date or after the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on their most recent opportunity, have a date on the selected time frame or after the selected time frame in the queried field.

* is on or before
  * today
    * Definition: Show contacts that, on their most recent opportunity, have a date on the current calendar date or before the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on their most recent opportunity, have a date on the selected calendar date or before the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on their most recent opportunity, have a date on the selected time frame or before the selected time frame in the queried field.

* is between
  * custom range
    * Definition: Show contacts that, on their most recent opportunity, have a date between the selected calendar dates in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2-5 days ago` or `3-6 months from now` for example))
    * Definition: Show contacts that, on their most recent opportunity, have a date between the selected time frames in the queried field.
  * now and
    * Definition: Show contacts that, on their most recent opportunity, have a date between right now the selected time frame in the queried field.

* is not between
  * custom range
    * Definition: Show contacts that, on their most recent opportunity, do not have a date between the selected calendar dates in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2-5 days ago` or `3-6 months from now` for example))
    * Definition: Show contacts that, on their most recent opportunity, do not have a date between the selected time frames in the queried field.
  * now and
    * Definition: Show contacts that, on their most recent opportunity, do not have a date between right now the selected time frame in the queried field.

* is blank
  * Definition: Show contacts that, on their most recent opportunity, do not have a date in the queried field.

* is not blank
  * Definition: Show contacts that, on their most recent opportunity, have any date in the queried field.

* was ever
  * today
    * Definition: Show contacts that, on any of their Hatch opportunities, have the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on any of their Hatch opportunities, have the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on any of their Hatch opportunities, have the selected time frame in the queried field.

* was never
  * today
    * Definition: Show contacts that, on any of their Hatch opportunities, do not have the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on any of their Hatch opportunities, do not have the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on any of their Hatch opportunities, do not have the selected time frame in the queried field.

* was ever after
  * today
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date after the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date after the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date after the selected time frame in the queried field.

* was ever before
  * today
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date before the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date before the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date before the selected time frame in the queried field.

* was ever on or after
  * today
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date on the current calendar date or after the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date on the selected calendar date or after the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date on the selected time frame or after the selected time frame in the queried field.

* was ever on or before
  * today
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date on the current calendar date or before the current calendar date in the queried field.
  * custom date
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date on the selected calendar date or before the selected calendar date in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2 days ago` or `3 months from now` for example))
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date on the selected time frame or before the selected time frame in the queried field.

* was ever between
  * custom range
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date between the selected calendar dates in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2-5 days ago` or `3-6 months from now` for example))
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date between the selected time frames in the queried field.
  * now and
    * Definition: Show contacts that, on any of their Hatch opportunities, have a date between right now the selected time frame in the queried field.

* was never between
  * custom range
    * Definition: Show contacts that, on any of their Hatch opportunities, do not have a date between the selected calendar dates in the queried field.
  * range (This option allows you to choose a specific amount of days/months/years in the past or in the future (`2-5 days ago` or `3-6 months from now` for example))
    * Definition: Show contacts that, on any of their Hatch opportunities, do not have a date between the selected time frames in the queried field.
  * now and
    * Definition: Show contacts that, on any of their Hatch opportunities, do not have a date between right now the selected time frame in the queried field.

* was ever blank
  * Definition: Show contacts that, on any of their Hatch opportunities, do not have a date in the queried field.

* was never blank
  * Definition: Show contacts that, on any of their Hatch opportunities, have any date in the queried field.

### Campaign and Communication-Specific Fields

`Campaign` | `Date`

* occurred
  * Definition: Show contacts that have ever been in the specified campaign
* never occurred
  * Definition: Show contacts that have never been in the specified campaign

`Communication` | `Date`

* occurred
  * Definition: Show contacts that have ever had the specified communication
* never occurred
  * Definition: Show contacts that have never had the specified communication

### Logic Notes

* Using operators that contain the word `ever` means that the query will look through all Hatch opportunities to find the information.
  * If you search for multiple fields using `ever` operators, the Audience Builder will only return contacts that fit all of the criteria *on the same opportunity*.

* Using operators that contain the word `never` will look through all opportunities and make sure all of the contact’s opportunities do not contain or equal the queried value.
  * For example, if you included `Shirt Color` `was never` `Blue` to your search, it will filter out contacts that have *any* opportunity where the `Shirt Color` is `Blue`, even if the contact fits all the rest of the criteria

* The Audience Builder will only show data from the current opportunity in the contacts table, but you will have the ability to click into any contact result to see all the opportunities of that contact<img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-03-57-17-9790-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=edc4e55401848367c842aacac38c3ec9" alt="" width="321" height="771" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-03-57-17-9790-PM.png" />

  * To the right is an example of a contact with three opportunities. In this picture, the 2nd most recent opportunity is expanded.

* Queries that use a `contain` operator will only provide a text input for the value, not an autocomplete of options, since the user is looking for a partial match

* The Audience Builder is built so that when using *only past operators* with the `and` connector, it will retrieve contacts where all the criteria matched on a *single* opportunity, not mixing-and-matching data from different opportunities

* We only allow 2 levels of nesting. Notice in the screenshot that once you have added a nest within a nest, you can no longer add more nesting<img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-03-52-46-8620-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=637e7453f39ec32ad978745bad5b6838" alt="" width="688" height="366" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-03-52-46-8620-PM.png" />

* When querying dates, all ranges are *inclusive* , meaning that if you query:

  * 06/17/2024 - 06/24/2024
    * You will get all dates with a calendar date **on or between** June 17, 2024 12:00am and June 24, 2024 11:59pm
  * 2 - 5 days ago
    * You will get anything with a calendar date that was 2, 3, 4, or 5 days ago

### FAQ

<AccordionGroup>
  <Accordion title="What is the difference between querying the most recent opportunity vs all opportunities?">
    The <b>Most recent opportunity</b> is the set of data related to a contact that came into Hatch most recently.<br /><br />
    Anything that is <i>not</i> the <b>Most recent opportunity</b> is considered an <b>Older opportunity</b>.<br /><br />
    When you use operators like <code>is</code> vs <code>was ever</code>, what you are saying is:

    <ul>
      <li><b><code>is</code></b>: The query must be true specifically on the <b>Most recent opportunity</b></li>
      <li><b><code>was ever</code></b>: The query can be true on any of the contact’s opportunities, whether or not the opportunity is the most recent set of data for a contact.</li>
    </ul>

    <img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-21-19-0117-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=341894ef780117dd3105e596edcebb66" alt="most recent vs all opportunities" width="688" height="386" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-21-19-0117-PM.png" />
  </Accordion>

  <Accordion title="What is a “Nested Row” and what is it used for?">
    A <i>Nested Row</i> is a way to put a query within a query to use both the <code>and</code> connector and the <code>or</code> connector.<br /><br />

    <ul>
      <li>
        For example:<br />
        Using only <code>and</code> connectors means “for a contact to show, it must fit <i>every one of</i> the rows in my Audience”!

        <br />

        <img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-22-43-0335-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=e44a50b6d36afa8ebdc0c0db5eadfc75" alt="and connector" width="688" height="208" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-22-43-0335-PM.png" />

        <br />

        In this example, contacts will only show if the Sport is Golf <b>AND</b> the City is New Orleans.
      </li>

      <br />

      <li>
        Using only <code>or</code> connectors means “for a contact to show, it must fit <i>any one of</i> the rows in my Audience”!

        <br />

        <img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-24-20-8330-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=24744644a836bf4500ce1cbdbc5eca5b" alt="or connector" width="5316" height="2772" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-24-20-8330-PM.png" />
      </li>

      <br />

      <li>
        Nested rows are a way to say “I want contacts that fit <i>this</i> row <code>and</code> <i>either one of these</i> rows!"

        <br />

        <img src="https://mintcdn.com/usehatchapp/LVxm54KWM4keny_d/images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-25-26-2723-PM.png?fit=max&auto=format&n=LVxm54KWM4keny_d&q=85&s=876412c6a1d4fb825e302d055e2da53d" alt="nested rows" width="5316" height="2768" data-path="images/how-to-use-hatch/audience-builder-v2/image-png-Aug-05-2024-06-25-26-2723-PM.png" />
      </li>
    </ul>
  </Accordion>

  <Accordion title="What is the 'Date' field on the Campaign History rows?">
    When you use the <i>Date</i> field for campaign history, you are querying the date that the campaign started.<br /><br />
    For example, if your row says:

    <ul>
      <li><code>Sales Follow-Up</code> | <code>Date</code> | <code>was ever between</code> | <code>now and</code> | <code>5</code> | <code>days</code> | <code>ago</code></li>
    </ul>

    what you are saying is:

    <ul>
      <li>Show me contacts that started the <i>Sales Follow-Up</i> campaign between right now and 5 calendar days ago</li>
    </ul>
  </Accordion>
</AccordionGroup>
