# Condition fields and operators (https://docs.opensequence.dev/reference/condition-fields)

Which fields conditions can read from the closed field registry, and which operators each field type supports.

<Note>This page is generated from `packages/core/src/domain/definition/builtins.ts and packages/core/src/domain/conditions/evaluate.ts` by `pnpm generate`. Do not edit it by hand; change the source and regenerate.</Note>

A condition is `{ "mode": "all" | "any", "rules": [{ "field", "op", "value?" }] }` with 1 to 20 rules. `GET /v1/schema/fields` serves this registry plus the project's `attrs_schema`. **Missing data never matches**: a `null` fact fails every operator, including `is_not` and `ne`, so the contact takes `no`. See [Conditions](/docs/concepts/sequence/conditions).

## Operators by type [#operators-by-type]

| Type | Operators | Value |
| --- | --- | --- |
| `enum` | `is`, `is_not` | one of the field’s values |
| `text` | `is`, `is_not`, `contains`, `is_empty`, `is_not_empty` | a string; `is_empty` and `is_not_empty` take none |
| `number` | `eq`, `ne`, `gt`, `gte`, `lt`, `lte` | a number |
| `bool` | `is_true`, `is_false` | none |
| `date` | `before`, `after` | an ISO date |

Text comparisons are case-insensitive. Numbers are compared after `Number()`; dates after `Date.parse()`.

## Fields [#fields]

### `contact.*`: Contact [#contact-contact]

| Field | Label | Type | Operators | Values |
| --- | --- | --- | --- | --- |
| `contact.country` | Contact country | text | `is`, `is_not`, `contains`, `is_empty`, `is_not_empty` |  |
| `contact.timezone` | Contact time zone | text | `is`, `is_not`, `contains`, `is_empty`, `is_not_empty` |  |
| `contact.has_email` | Contact has an email | bool | `is_true`, `is_false` |  |
| `contact.has_phone` | Contact has a phone | bool | `is_true`, `is_false` |  |
| `contact.has_linkedin` | Contact has a LinkedIn URL | bool | `is_true`, `is_false` |  |
| `contact.outreach_consent` | Contact consented to texts and calls | bool | `is_true`, `is_false` |  |
| `contact.sms_consent` | Contact consented to texts and calls (old name of contact.outreach_consent) | bool | `is_true`, `is_false` |  |

### `attrs.*`: Contact attributes [#attrs-contact-attributes]

Open: any `attrs.<path>` is accepted and read as text unless the project declares a type (`attrs_schema` in the project settings for `attrs.*`; the Attio attribute types for `crm.*`).

### `sender.*`: Sender [#sender-sender]

| Field | Label | Type | Operators | Values |
| --- | --- | --- | --- | --- |
| `sender.timezone` | Sender time zone | text | `is`, `is_not`, `contains`, `is_empty`, `is_not_empty` |  |
| `sender.has_sms` | Sender has an SMS number | bool | `is_true`, `is_false` |  |

### `history.*`: History [#history-history]

| Field | Label | Type | Operators | Values |
| --- | --- | --- | --- | --- |
| `history.touches` | Touches so far | number | `eq`, `ne`, `gt`, `gte`, `lt`, `lte` |  |
| `history.days_since_last_touch` | Days since the last touch | number | `eq`, `ne`, `gt`, `gte`, `lt`, `lte` |  |
| `history.replied_since_enrollment` | Replied since enrollment | bool | `is_true`, `is_false` |  |
| `history.last_reply_channel` | Last reply channel | enum | `is`, `is_not` | `email`, `sms`, `call` |
| `history.emails_sent` | Emails sent | number | `eq`, `ne`, `gt`, `gte`, `lt`, `lte` |  |
| `history.last_task_outcome` | Last task outcome | text | `is`, `is_not`, `contains`, `is_empty`, `is_not_empty` |  |
| `history.last_task_kind` | Last task kind | text | `is`, `is_not`, `contains`, `is_empty`, `is_not_empty` |  |
| `history.days_since_last_task` | Days since the last task | number | `eq`, `ne`, `gt`, `gte`, `lt`, `lte` |  |
| `history.tasks_last_14d` | Tasks in the last 14 days | number | `eq`, `ne`, `gt`, `gte`, `lt`, `lte` |  |

### `crm.*`: CRM [#crm-crm]

Open: any `crm.<path>` is accepted and read as text unless the project declares a type (`attrs_schema` in the project settings for `attrs.*`; the Attio attribute types for `crm.*`).

| Field | Label | Type | Operators | Values |
| --- | --- | --- | --- | --- |
| `crm.person.exists` | CRM person exists | bool | `is_true`, `is_false` |  |
| `crm.company.exists` | CRM company exists | bool | `is_true`, `is_false` |  |
| `crm.deal.exists` | CRM open deal exists | bool | `is_true`, `is_false` |  |
| `crm.deal.stage` | CRM deal stage | text | `is`, `is_not`, `contains`, `is_empty`, `is_not_empty` |  |
| `crm.deal.count_open` | CRM open deals | number | `eq`, `ne`, `gt`, `gte`, `lt`, `lte` |  |
