> For the complete documentation index, see [llms.txt](https://help.gleantap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.gleantap.com/audience/creating-segments/filter-options.md).

# Filter Options

Segments are built by combining filters. Each filter has three parts: an **attribute** (what field you're filtering on), an **operator** (how you're comparing it), and a **value**. This page covers:

* The **filter categories** available in the segment builder
* The **operators** you can pick and exactly what each one matches
* **How missing (null) data is handled** — the #1 source of unexpected segment counts
* **Troubleshooting** for common "why is my count wrong?" situations

***

## Filter categories

The segment builder groups filters into these categories. Pick a category first, then a specific attribute inside it.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2F553lS3h9MUSwHcBgUTfr%2FScreen%20Shot%202023-10-02%20at%201.02.00%20PM.png?alt=media&#x26;token=3dabca71-9cbd-4bcd-ad77-4126aadeb869" alt=""><figcaption><p>The Add Filter panel opens with all available categories.</p></figcaption></figure>

| Category             | What it covers                              | Common attributes                                                         |
| -------------------- | ------------------------------------------- | ------------------------------------------------------------------------- |
| **Personal Info**    | Basic contact fields                        | Name, Birthday, Address, Added On                                         |
| **Account Info**     | Their account status in your CRM + Gleantap | Status, Location, Tags, Member/Prospect                                   |
| **Membership Info**  | Active memberships                          | Membership Type, Status, Start/End dates                                  |
| **Contract Info**    | Longer-term agreements from your CRM        | Contract Type, Status, Start/End dates                                    |
| **Purchase Info**    | Items purchased                             | Last Purchased Item, Has Purchased, No. of Purchases                      |
| **Visit Info**       | Check-ins tracked from your CRM             | First Visit, Last Visit, No. of Visits in a period                        |
| **Pipeline**         | Sales pipeline activity                     | Stage, Status, Assigned to                                                |
| **Email Engagement** | Past email-campaign behavior                | Targeted By, Opened, Clicked, Engagement score                            |
| **SMS Engagement**   | Past SMS-campaign behavior                  | Targeted By, Clicked, Opted In, Replied                                   |
| **Segments**         | Membership in other segments                | Is In Segment, Is Not In Segment                                          |
| **Inbound Keywords** | Words in replies to your SMS                | Keyword                                                                   |
| **Ratings**          | Internal rating scores                      | Rating value                                                              |
| **Forms**            | Form submissions and answers                | Form filled, Specific question response                                   |
| **Appointments**     | Appointments in Gleantap (not CRM visits)   | Status, Time, Type                                                        |
| **Custom**           | Your custom attributes                      | See [Custom Attributes](/audience/creating-segments/custom-attributes.md) |

### What each category contains

**Personal Info** — Attributes such as name, birthday, and address. Most of these are informational; `Added On` and `Birthday` are the ones most often used to build segments.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2FgHY1aNGrHBuOXvuw72Rw%2FScreen%20Shot%202023-10-02%20at%201.03.51%20PM.png?alt=media&#x26;token=9fcb6ab2-efd5-4a56-ae83-accf554e30be" alt="" width="375"><figcaption></figcaption></figure>

**Account Info** — Fields from your integrated CRM plus a few Gleantap-native ones like `Tags`. Includes `Status`, `Location`, and Member/Prospect flags.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2F6BiAU7inKvRzAfbQPSx8%2FScreen%20Shot%202023-10-02%20at%201.03.57%20PM.png?alt=media&#x26;token=f370bbd5-57ff-40a2-8790-64ebe111c090" alt="" width="375"><figcaption></figcaption></figure>

**Membership Info** — Based on your users' memberships. Membership specifics vary by business/CRM, but the basics are consistent: `Type`, `Status`, and when the membership began or ended.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2F812pnAK2SOzj5zVIYwjU%2FScreen%20Shot%202023-10-02%20at%201.04.03%20PM.png?alt=media&#x26;token=bcf4524f-989b-41ab-9824-c22c06ef7e0c" alt="" width="371"><figcaption></figcaption></figure>

**Contract Info** — Similar to memberships, but contracts come through from your CRM as term-based agreements. Filter on contract `Status`, `Start/End Date`, and `Type`.

> A membership typically renews monthly, while a contract lasts the length of the contract term.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2FOL2xvsNZz9NyiXXisENG%2FScreen%20Shot%202023-10-02%20at%201.16.00%20PM.png?alt=media&#x26;token=29d80943-7ae6-42e9-ac6f-e0a767fb48ca" alt="" width="375"><figcaption></figcaption></figure>

**Purchase Info** — Segment based on what someone bought (memberships or physical items). Filter on `Last Purchased Item`, `Has Purchased Item`, or `No. of Purchases` within a timeframe.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2FtzFUVtFGXEzCc0vPq45U%2FScreen%20Shot%202023-10-02%20at%201.16.08%20PM.png?alt=media&#x26;token=5a77746c-b401-406a-a99f-1816d7fbc951" alt="" width="370"><figcaption></figcaption></figure>

**Visit Info** — Filter on check-in activity. As long as visits are tracked from your CRM, you can build lists based on `First Visit`, `Last Visit`, and `No. of Visits` in a period.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2Fv6zKGASPwQpUsIXBBdJa%2FScreen%20Shot%202023-10-02%20at%201.16.14%20PM.png?alt=media&#x26;token=0fd3aa00-f699-4e05-8dce-f0f2ed922409" alt="" width="336"><figcaption></figcaption></figure>

**Pipeline** — Where a user is in the Sales Pipeline, their stage status, and who owns the lead.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2FvhehTZeOceHnIrqgRs2o%2FScreen%20Shot%202023-10-02%20at%201.50.05%20PM.png?alt=media&#x26;token=cbec8007-c80e-4e5b-86a8-91d0ac1992b9" alt="" width="321"><figcaption></figcaption></figure>

**Email Engagement** — Segment based on past email-campaign behavior. Build audiences of people who opened, clicked, or were targeted by a campaign — plus overall engagement scores.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2FKdATxULHaRSYtslEVkDE%2FScreen%20Shot%202023-10-02%20at%201.50.13%20PM.png?alt=media&#x26;token=35e0a20a-2eea-4288-b0cc-4d030ecd4e79" alt="" width="375"><figcaption></figcaption></figure>

**SMS Engagement** — Same idea as Email Engagement, for SMS campaigns. Includes SMS opt-in status and reply activity within a timeframe.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2FDua2FzNPqjriheG5u496%2FScreen%20Shot%202023-10-02%20at%201.50.19%20PM.png?alt=media&#x26;token=ee043e1d-7a2e-460d-befc-ead437c119ac" alt="" width="375"><figcaption></figcaption></figure>

**Segments** — Use `Is In Segment` or `Is Not In Segment` to layer pre-built segments into your filter. See the [Cross-segment operators](#cross-segment-operators) section below for exactly how these behave.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2F0h4JTfsPfDh8pgETdrBJ%2FScreen%20Shot%202023-10-02%20at%201.50.27%20PM.png?alt=media&#x26;token=8e9ee11a-216b-4a73-9aca-3a69bda58478" alt=""><figcaption></figcaption></figure>

**Inbound Keywords** — Filter by SMS replies that contained specific keywords.

**Ratings** — Use Gleantap's built-in rating system to segment on internal feedback.

**Forms** — Segment users who filled out a Gleantap form. A segment is auto-created for each form's submitters; this filter lets you go deeper — filter by which specific question they answered and what they responded.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2F4lmtHXIwNnlHpCSzF523%2FScreen%20Shot%202023-10-02%20at%201.50.52%20PM.png?alt=media&#x26;token=67830d4f-be17-4ec7-8edf-c486041bb9e0" alt="" width="361"><figcaption></figcaption></figure>

**Appointments** — Appointments booked *in Gleantap*, not visits synced from your CRM. Filter on `Status`, `Time`, and `Type`.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2FIn7bOCMFWk7EcLLhDxOF%2FScreen%20Shot%202023-10-02%20at%201.51.00%20PM.png?alt=media&#x26;token=6e3ae1f0-a081-4004-8e03-cf7cd6725932" alt="" width="306"><figcaption></figcaption></figure>

**Custom** — Your own custom attributes. See [Custom Attributes](/audience/creating-segments/custom-attributes.md) for how to define and use them.

***

## Operators — what each one matches

The operators available depend on the attribute type. Here's what each one does.

### On number fields

Examples: **No. of Visits**, **Points Balance**, **No. of Purchases**, **Total Purchases**.

| Operator            | Matches                                    | Doesn't match                                       |
| ------------------- | ------------------------------------------ | --------------------------------------------------- |
| **Is Equal To**     | Value exactly equals the number            | Anything else, including null                       |
| **Is Not Equal To** | Value differs from the number              | Value that equals it (null is excluded — see below) |
| **Is Greater Than** | Value is strictly higher (11+ for `> 10`)  | Value ≤ 10, or null                                 |
| **Is Less Than**    | Value is strictly lower (0 or 1 for `< 2`) | Value ≥ 2, or null                                  |
| **Is Empty**        | Field is missing or blank                  | Field has any value                                 |
| **Is Not Empty**    | Field has a value                          | Field is missing or blank                           |
| **Exists**          | Field is present (not null)                | Field never set                                     |
| **Does Not Exist**  | Field is absent or null                    | Field is present                                    |

> **`Greater Than 10` will include people with 54, 100, or 1000.** It's an unbounded upper range. If you want "10 or fewer", use `Less Than 11`. If you want an exact match, use `Is Equal To`.

### On date fields

Examples: **Added On**, **Last Visit**, **Last Purchase Date**, **Birthday**.

| Operator                          | Matches                                                                |
| --------------------------------- | ---------------------------------------------------------------------- |
| **In Last** *N* days              | Date is within the last N days from now                                |
| **In Last Hours**                 | Date is within the last N hours                                        |
| **Over Days**                     | Date is more than N days ago                                           |
| **Over Hours**                    | Date is more than N hours ago                                          |
| **Before**                        | Date is before a specific date                                         |
| **After**                         | Date is after a specific date                                          |
| **Between**                       | Date is between two specific dates (inclusive)                         |
| **Is Today**                      | Date is today                                                          |
| **This Week** / **Last Week**     | Within this calendar week / last calendar week                         |
| **In Next** / **In Next Hours**   | Future date within N days / N hours                                    |
| **Day In Last** / **Day In Next** | Specific day-of-year in the past / future (e.g., birthdays this month) |

All date operators use your account timezone.

### On text fields

Examples: **First Name**, **Email**, **City**, **Source**, **Notes**.

| Operator             | Matches                                  |
| -------------------- | ---------------------------------------- |
| **Is Equal To**      | Exact match (case-insensitive)           |
| **Is Not Equal To**  | Anything other than the exact value      |
| **Is One Of**        | Value matches any of the listed options  |
| **Is Not One Of**    | Value matches none of the listed options |
| **Contains**         | Value contains the substring anywhere    |
| **Does Not Contain** | Value does not contain the substring     |
| **Is Empty**         | No value set                             |
| **Is Not Empty**     | Any value set                            |

**Email-specific:** `Is Invalid`, `Is Not Invalid`, `Is Not Opted-Out`. **Phone-specific:** `Is Valid`, `Is Not Valid`.

### On list / multi-value fields

Examples: **Tags**, **Membership Type**, **Badges**, **Rewards**, **Products**.

| Operator          | Matches                                       |
| ----------------- | --------------------------------------------- |
| **Is One Of**     | Contact has at least one of the listed values |
| **Is Not One Of** | Contact has none of the listed values         |

### On boolean / flag fields

Examples: **Is Member**, **Has Membership**, **No Purchase Ever**.

| Operator           | Matches                        |
| ------------------ | ------------------------------ |
| **Is True**        | Flag is set to true            |
| **Is False**       | Flag is set to false           |
| **Exists**         | Flag has been set to something |
| **Does Not Exist** | Flag was never set             |

### Cross-segment operators

Available under **Segments** category.

| Operator              | Matches                                                                           |
| --------------------- | --------------------------------------------------------------------------------- |
| **Is In Segment**     | Contact is currently a member of the referenced segment                           |
| **Is Not In Segment** | Contact is not a member of the referenced segment (or was never evaluated for it) |

Both operators evaluate **in real time** — the referenced segment's *current* membership is used. If you change the referenced segment's definition, the parent segment updates on next calculation.

### Campaign engagement operators

Under **Email Engagement** and **SMS Engagement**.

| Operator                          | Matches                                             |
| --------------------------------- | --------------------------------------------------- |
| **Targeted By**                   | Contact was in the send list of a specific campaign |
| **Targeted By & Opened**          | Was sent and opened                                 |
| **Targeted By & Clicked**         | Was sent and clicked a link                         |
| **Targeted By & Not Opened**      | Was sent but didn't open                            |
| **Targeted By & Not Clicked**     | Was sent but didn't click                           |
| **Targeted By & Failed Delivery** | Send failed (bounce, invalid, etc.)                 |
| **Not Targeted By**               | Contact was never in the send list                  |

### Location operators

Under **Personal Info** for address-based filtering.

| Operator                                                           | Matches                                                       |
| ------------------------------------------------------------------ | ------------------------------------------------------------- |
| **In 1 Mile** / **In 5 Miles** / **In 10 Miles** / **In 25 Miles** | Contact address is within that radius of a reference location |

***

## How missing data (null) is handled

**This is the #1 cause of unexpected segment counts.** Gleantap follows standard database rules: **null / missing values are excluded from `Is Less Than`, `Is Greater Than`, `Is Equal To`, `Is Not Equal To`, and all date operators.**

**What this means in practice:**

* `No. of Visits Is Less Than 2` matches people with a recorded visit count of 0 or 1. It does **not** match people who have no visit data at all (i.e., the field was never set).
* `Last Visit Before Jan 1` matches people whose last visit is on record and predates Jan 1. It does **not** match people who have never visited (no last-visit date).
* `Is Not Equal To "Member"` matches people whose status has a value that isn't "Member". It does **not** match people whose status is missing.

**If you want to include people with missing data**, add a second filter using `Does Not Exist` on the same field and combine with OR (in the segment builder's group logic).

**Reverse case — to find only people who have data:** use `Exists` first, then apply your comparison.

***

## Troubleshooting: "Why is my segment count wrong?"

### "`Less Than 2` returns fewer people than `Equal To 1`"

**Cause:** Nulls are excluded from comparisons. If you have 500 contacts and only 200 have any visit data, `Less Than 2` searches only those 200 — and returns the subset with 0 or 1 visits. `Equal To 1` returns just the 1-visit subset, but if there's a group of contacts with visit=1 in the "has data" cohort, that count can end up higher than expected relative to the null-inclusive picture you had in your head.

**Fix:** Decide whether "no visit data" counts as "less than 2" for your purpose. If yes, add a second filter `No. of Visits Does Not Exist` with OR logic. If no, the current behavior is correct.

### "`More Than 10 check-ins` returns people with 54"

**Cause:** This is correct. `More Than 10` matches any value greater than 10 — 11, 20, 54, 1000, all qualify. It has no upper bound.

**Fix:** Pick the operator that matches what you want:

| If you want...                                      | Use                                               |
| --------------------------------------------------- | ------------------------------------------------- |
| Exactly 10                                          | `Is Equal To 10`                                  |
| 10 or fewer (11 excluded)                           | `Is Less Than 11`                                 |
| Between 5 and 10                                    | Two filters: `Greater Than 4` AND `Less Than 11`  |
| More than 10 but not "power users" (say, cap at 50) | Two filters: `Greater Than 10` AND `Less Than 51` |

### "This person is in Segment A but I don't see them in Segment B, even though B's filter is `Is In Segment A`"

**Two likely causes:**

1. **B needs a refresh.** `Is In Segment` evaluates against the referenced segment's *current* members at query time. If Segment A was just updated, Segment B may not have re-run yet. Click the three-dot menu on Segment B → **Refresh** to force a recalculation. See [Segments Auto-Refresh](/audience/segments-auto-refresh.md).
2. **The contact's segment membership hasn't been recomputed.** When a contact's attributes change, their segment memberships recalculate — but there can be a short delay. If you just changed a contact's attribute (e.g., manually added a tag), give it a minute, then refresh Segment A and B in that order.

### "My count is wildly off from what I expect"

Walk through in order:

1. **Is the segment Dynamic?** Static segments freeze at save time and never update. Marketing/automation should use Dynamic. See [Static vs Dynamic](/audience/creating-segments/static-vs-dynamic.md).
2. **Did you click Calculate before checking the count?** The number only refreshes after Calculate.
3. **Are nulls at play?** See "How missing data is handled" above.
4. **Timezone.** Date filters use your account timezone. `In Last 7 Days` moves as time passes — the same segment can return different counts an hour later.
5. **Attribute you're filtering on may not be the one you think.** For example, "No. of Visits" from your CRM's Visit sync is different from "No. of Appointments" in Gleantap. Confirm the attribute name.

### "`Is In Segment` returns 0 people even though the referenced segment has members"

* The referenced segment may not have been calculated yet after its last edit. Refresh it manually.
* Confirm you selected the right segment in the picker (segments with similar names are easy to swap).

### "Suppressed contacts are showing up in my segment"

**Suppression is separate from segment membership.** A suppressed contact is still in the segment; they're just excluded when a campaign or flow tries to send to them. If your goal is "who will actually receive this send", use the audience preview when creating the campaign — it applies suppression on top of segment membership. See [Understanding Suppression](/audience/understanding-suppression.md).

***

## Related pages

* Creating Segments
* [Static vs Dynamic](/audience/creating-segments/static-vs-dynamic.md)
* [Custom Attributes](/audience/creating-segments/custom-attributes.md)
* [Segments Auto-Refresh](/audience/segments-auto-refresh.md)
* [Understanding Suppression](/audience/understanding-suppression.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.gleantap.com/audience/creating-segments/filter-options.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
