Use this reference when writing or reading the condition on a variant in a block or snippet. A condition is evaluated against the engagement's data when a letter is generated; the variant shows when the condition is true. Conditions are built in the visual condition builder.
Visual condition builder
A condition is one or more rows of field, operator and value, joined by AND or OR. The builder recognizes the type of each field and offers only the operators that make sense for it.
Operators by field type
| Field type | Operators | Value entry |
|---|---|---|
| Text (client name, project name, client type, custom text fields) | equals, does not equal, contains, does not contain, starts with, is empty, is not empty | Free text, or a dropdown of known values for constrained fields such as client type |
| Number and currency (price, prepayment, minimum and maximum price, numeric custom fields) | equals, does not equal, greater than, less than, greater than or equal to, less than or equal to | A number; currency values are compared as numbers |
| Date (letter date, start date, fiscal year end, renewal date, project dates, date custom fields) | is, is before, is after, is on or before, is on or after | A fixed date, or a relative date such as today, next month or last year |
| Boolean (yes/no custom fields) | is true, is false | — |
Combining conditions
- Add Condition adds another row to the current group. Rows in a group are joined by the group's AND or OR.
- Add Group adds a nested group with its own AND or OR, shown with a dashed border. Use it for logic such as (client type is Individual OR client type is Trust) AND price is greater than 0.
- Conditions on project fields are evaluated against the projects on the letter. A condition such as project type equals Bookkeeping is true when any project on the letter meets it.
Common conditions
| Intent | Builder |
|---|---|
| Individual client | Client type equals Individual |
| Any client type other than Individual or Trust | Client type does not equal Individual AND Client type does not equal Trust |
| Client has an address | Client address line 1 is not empty |
| Corporation return, not S-corporation | Project name contains 1120 AND Project name does not contain 1120S |
| Employee benefit plan | Project name contains EBP |
| A bookkeeping project is on the letter | Project type equals Bookkeeping |
| Something is priced | Price greater than 0 |
| Client created after a date | Client created at is after 7/2/2025 |
| Client name contains a word | Client name contains Technology |
Checking a condition
- The editor validates the expression as you type and flags type mismatches.
- Use the preview with a real client to see which variant shows, then change the data or the client and preview again.
- A field with no value makes any comparison on it false. If a variant never shows, check whether the field it tests is populated for the client you are testing with.
- Keep conditions simple. A long JSONata expression slows letter generation and is hard for the next admin to read; prefer several variants with plain conditions over one variant with a clever one.
Related
- Manage blocks, snippets and variants in a letter template
- How dynamic letter templates work
- Document template fields and Engagement placeholder variables
- Custom fields that drive letter content