# Condition groups and operator reference

You'll find how condition groups and operators work, which data you can use, and what happens when a visitor's data is missing or still loading.

Available on the Grow, Scale, and Pro plans.

Conditions let you decide who qualifies for a segment, takes a flow path, sees an answer choice, or gets a widget. This reference helps you combine those rules and understand why someone matches.

## What it checks

Each condition compares visitor data with a rule. Groups combine those comparisons. The same builder appears in several editors, but the available data and defaults depend on where you're working.

## When to use it

Use this reference when you need several requirements to match together, want to allow alternative ways to qualify, or need to understand a negative comparison. For a step-by-step setup, see [Create automatic segmentation rules](https://rightmessage.com/help/automatically-segmenting-by-on-site-behavior-or-available-data).

## Options

### Groups and combinations

| If you'd like to…                         | Control or label                              | How it works                             |
| ----------------------------------------- | --------------------------------------------- | ---------------------------------------- |
| Require every condition in a group        | **All of these**                              | Joins the conditions with AND.           |
| Require at least one condition in a group | **Any of these**                              | Joins the conditions with OR.            |
| Allow any top-level group to qualify      | **Any group matches**                         | At least one top-level group must match. |
| Require every top-level group             | **All groups match**                          | Every top-level group must match.        |
| Add another group                         | **Add group**                                 | Adds a group with a blank condition.     |
| Add a condition to a group                | **Add AND condition** or **Add OR condition** | Uses that group's combination.           |

With **Any group matches**, new groups use **All of these**. With **All groups match**, they use **Any of these**. Changing the top-level operator also switches existing immediate groups to the opposite operator. It changes how the rules work, not just the label between groups.

Standalone segment rules and question **Auto-Segment** rules keep their top-level combination fixed to Any. Either an automatic rule group or an auto-synced group can establish a match. Groups marked **Auto synced** are read-only here. Their mappings belong to **Sync with** your provider.

Nested groups keep their own AND or OR meaning. Widget targeting also offers **At least one of the following is true**, **All of the following are true**, **None of the following are true**, and **Not all of the following are true**. The last two negate an Any or All group, respectively.

### Text operators

Browser data, UTM parameters, query parameters, cities, custom fields, and several page and referrer conditions use these operators.

| Operator             | What matches                                                                   |
| -------------------- | ------------------------------------------------------------------------------ |
| **Equals**           | The complete value matches.                                                    |
| **Does not equal**   | The complete value doesn't match.                                              |
| **Contains**         | The value includes the comparison text.                                        |
| **Does not contain** | The value doesn't include the comparison text.                                 |
| **Starts with**      | The value begins with the comparison text.                                     |
| **Ends with**        | The value ends with the comparison text.                                       |
| **Wildcard match**   | The value matches a glob pattern. `*` represents any sequence of characters.   |
| **Is set**           | The value isn't an empty string after RightMessage prepares it for comparison. |
| **Is not set**       | The value is empty or missing after RightMessage prepares it for comparison.   |

Ordinary text matching is case-sensitive unless the source changes the text first. Current-domain comparisons use lowercase text. Input-answer text comparisons use a separate, case-insensitive operator set.

Comma-separated comparison values are alternatives. Positive comparisons match any alternative. **Does not equal** and **Does not contain** require every alternative to be absent. RightMessage trims whitespace around alternatives, so a comma isn't always a literal part of the comparison.

When both equality values look like numbers, RightMessage compares them numerically. For example, `01` and `1` can be equal. JavaScript booleans become `true` or `false`. **Is set** and **Is not set** don't need a comparison value.

Numeric conversion also affects substring and wildcard operators. When both values look like numbers, these aren't ordinary text searches. For example, **Contains** with `1` doesn't match `123`. Use equality or a source with numeric operators when comparing numbers.

Missing text normally becomes an empty string. A negative comparison against a nonempty value can therefore pass on missing data. Some sources handle missing data differently. Custom fields and previous answers have important exceptions documented in their references.

**Wildcard match** isn't a regular-expression field. Page and domain **Matches** controls have their own behavior, described in [Pages and visits conditions](https://rightmessage.com/help/conditions-pageviews).

### Numeric and inclusion operators

The shared numeric operators are **Equals**, **Does not equal**, **Greater than**, **Less than**, **Greater than or equal to**, and **Less than or equal to**. Each source supplies the numeric value and can reject missing values before comparison.

The shared inclusion operators are **include any of**, **don't include any of**, **matches any**, and **doesn't match any**. Multiple selected values are alternatives. They don't require every selected value to be present.

For segment membership, tags, lists, and WordPress data, **matches any** checks whether the visitor has any values in that source. **doesn't match any** checks whether that list is empty. An empty selection never passes positive inclusion and doesn't exclude anything under negative inclusion.

Country, weekday, month, and **Current Widget** have different presence behavior. Their references explain why **matches any** doesn't necessarily mean that the visitor's data is known.

### Sources in the picker

| Picker category                            | Reference                                                                                                                                      |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| Connected provider name, or **Email List** | [Email platform and CRM conditions](https://rightmessage.com/help/conditions-partner)                                                          |
| **Referred By**                            | [Referrer conditions](https://rightmessage.com/help/conditions-referrer)                                                                       |
| **On-Site Behavior**                       | [Pages and visits conditions](https://rightmessage.com/help/conditions-pageviews)                                                              |
| **Segments / Questions**                   | [Membership](https://rightmessage.com/help/conditions-segments) and [input-question answers](https://rightmessage.com/help/conditions-answers) |
| **UTM Parameters**                         | [UTM parameter conditions](https://rightmessage.com/help/conditions-utm)                                                                       |
| **Query Parameters**                       | [Custom query parameter conditions](https://rightmessage.com/help/conditions-query)                                                            |
| **RightMessage**                           | [RightMessage behavior conditions](https://rightmessage.com/help/conditions-rightmessage)                                                      |
| **Location**                               | [Location conditions](https://rightmessage.com/help/geolocating-your-visitors)                                                                 |
| **Date**                                   | [Date conditions](https://rightmessage.com/help/conditions-date)                                                                               |
| **Scoring & Data**                         | [Score and variable conditions](https://rightmessage.com/help/conditions-scores)                                                               |
| **Device**                                 | [Operating system and browser conditions](https://rightmessage.com/help/conditions-device)                                                     |
| **Browser Data**                           | [Browser data conditions](https://rightmessage.com/help/conditions-browser-data)                                                               |
| **WordPress**                              | [WordPress conditions](https://rightmessage.com/help/conditions-wordpress)                                                                     |

The picker omits **Scoring & Data** when you aren't working in a flow. Widget targeting omits both **Scoring & Data** and **RightMessage**. Where necessary, the editor excludes the current segment group so it can't refer to itself. Your provider determines which contact fields and history triggers appear.

Most new text conditions start with **Equals**. Inclusion conditions start with **include any of**. An input-answer condition starts with **has answered**. **Date** starts with **Between**. Changing the trigger resets its fields. Placeholder text isn't a saved value.

## Examples

In the segment rule below, Group 1 requires both the `/pricing` page and a Google referrer. Group 2 allows a returning visitor to qualify instead. The OR connector means either group can match.

![Automatic segment rules matching a current pricing page from Google or a returning visitor](https://rightmessage.com/help/screens/audience-auto-rules.light.webp)

For your own rule, use the path of your real pricing page. On [WorkForge](https://workforge.rightmessage.com), that's `/pricing.html`.

## Things to know

### No rule, an empty group, and an unfinished rule

These states work differently:

- A widget without targeting conditions has no condition restriction. Its trigger, device settings, and dismissal rules still apply.
- An explicit empty AND group or empty OR group doesn't match.
- A blank condition without a usable source doesn't match.
- A segment without a matching answer or automatic rule doesn't gain members just because its rule editor is empty.
- An answer without visibility restrictions can appear for everyone. Visibility conditions don't assign that answer's segment.

Removing a restriction in its editor isn't the same as saving an empty group. In particular, an empty OR group isn't an "everyone" rule.

### Unresolved data

A condition can be true, false, or unresolved while its data loads. Unresolved means RightMessage doesn't have a decision yet, not that the visitor fails the rule.

For All, one false condition makes the group false. Otherwise, an unresolved condition keeps the group unresolved. For Any, one true condition makes the group true. Otherwise, an unresolved condition keeps it unresolved. Negating an unresolved condition still leaves it unresolved.

This can happen while a contact profile loads, an answer syncs, or a startup flow still has data to write. A disconnected source returns no match. A failed profile load can finish with missing or default values instead of staying unresolved. A negative rule doesn't confirm that your provider reported a missing tag or purchase.

**Generate Conditions** and **AI Generate** edit rules. They don't supply missing visitor data or confirm a live match. The [RightMessage debugger](https://rightmessage.com/help/using-the-rightmessage-debugger) shows which conditions match and what RightMessage actually shows the visitor.
