Skip to help content
RightMessage

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.

Updated

View as Markdown

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.

Options

Groups and combinations

If you'd like to…Control or labelHow it works
Require every condition in a groupAll of theseJoins the conditions with AND.
Require at least one condition in a groupAny of theseJoins the conditions with OR.
Allow any top-level group to qualifyAny group matchesAt least one top-level group must match.
Require every top-level groupAll groups matchEvery top-level group must match.
Add another groupAdd groupAdds a group with a blank condition.
Add a condition to a groupAdd AND condition or Add OR conditionUses 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.

OperatorWhat matches
EqualsThe complete value matches.
Does not equalThe complete value doesn't match.
ContainsThe value includes the comparison text.
Does not containThe value doesn't include the comparison text.
Starts withThe value begins with the comparison text.
Ends withThe value ends with the comparison text.
Wildcard matchThe value matches a glob pattern. * represents any sequence of characters.
Is setThe value isn't an empty string after RightMessage prepares it for comparison.
Is not setThe 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.

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

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 visitorOriginal
Automatic segment rules matching a current pricing page from Google or a returning visitor

For your own rule, use the path of your real pricing page. On WorkForge (opens in a new tab), 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 shows which conditions match and what RightMessage actually shows the visitor.

Still need a hand?

Tell us what you’re trying to do and where you’re getting stuck.

support@rightmessage.com