Build Audience Rules
Audience rules define who qualifies for an audience. Build rules from the business question first, then translate each requirement into a group, condition, operator, value, and time window.
Visual Builder and JSON view
Use Visual Builder for normal editing. It shows conditions as editable controls and is the safest way to build or review logic.
Use JSON when you need to inspect the structured audience definition or copy it for technical review. Do not edit JSON unless your team has confirmed the expected payload shape.
Root match mode
The root match mode controls how the top-level rules work together.
| Mode | Meaning | Use it when |
|---|---|---|
| ALL (AND) | Users must match every top-level condition or group | The audience must satisfy multiple requirements |
| ANY (OR) | Users can match at least one top-level condition or group | Several different behaviors should qualify users |
For high-risk campaign audiences, start with ALL (AND) unless the business question explicitly calls for alternatives.
Groups
Groups keep related logic together. Use Add group when rules need their own match behavior.
Group logic can include:
| Group mode | Meaning | Example |
|---|---|---|
| Match all | Every condition inside the group must be true | User is in Delhi and lifecycle stage is lead |
| Match any | At least one condition inside the group must be true | User viewed pricing or added to cart |
| Exclude matches | Matching users are removed from the audience | User purchased in the last 30 days |
Use exclusion groups for buyers, unsubscribed users, suppressed users, internal test users, or users who are not eligible for the intended channel.
Conditions
Use Add condition to create one rule. A condition contains these controls:
| Control | What to select | Example |
|---|---|---|
| Source | The entity or source where the field belongs | Events |
| Attribute | The specific field to evaluate | Event Type |
| Operator | The comparison to apply | equals |
| Value | The value to match | add_to_cart |
| Time window | The period where the condition applies | in last 30 days |
Observed source choices include Customer, Orders, Predictions, Purchase, Events, and Campaign.
Operators
Choose an operator that matches the field type and intent.
| Operator | Meaning | Example use |
|---|---|---|
| equals | Field must match one value | Event Type equals purchase |
| not equals | Field must not match one value | Lifecycle Stage not equals customer |
| in | Field must match one of several values | Country in India, UAE, Singapore |
| not in | Field must not match any listed value | Campaign not in internal test campaigns |
| is set | Field must have a value | Email is set |
| is not set | Field must be empty or unavailable | Mobile is not set |
Time windows
Time windows make behavior rules specific. The observed builder supports window modes such as in last, in next, and between, with units such as days, weeks, and months.
Use short windows for recent intent and longer windows for lifecycle or retention analysis.
| Goal | Suggested window |
|---|---|
| Cart recovery | Last 1 to 7 days |
| Paid retargeting | Last 7 to 30 days |
| Repeat purchase | Last 30 to 90 days |
| Churn risk review | Last 30 to 180 days |
Duplicate and delete conditions
Use Duplicate condition when a new condition is similar to an existing one. Change the field, operator, value, or time window after duplicating.
Use Delete condition when a rule no longer belongs in the audience. After deleting, validate and estimate again.
Clear all
Use Clear all only when the current rule set should be removed. Copy the JSON or duplicate the audience first if another team may need the current definition.
Example: cart abandoners
Use this rule pattern to find users who added to cart but did not purchase.
- Set root match mode to ALL (AND).
- Add an include condition: Events > Event Type > equals >
add_to_cart> in last30days. - Add an exclusion group with Exclude matches.
- Add an exclusion condition: Events > Event Type > equals >
purchase> in last30days. - Validate and estimate.
- Review preview users for recent buyers. If recent buyers appear, check the exclusion rule and time window.
QA checklist
- Root match mode matches the audience logic.
- Include rules describe positive qualification criteria.
- Exclusion rules remove users who should not receive the campaign or analysis.
- Operators match the selected field type.
- Values are spelled exactly as the source data stores them.
- Time windows match the business question.
- Duplicate rules were changed after copying.
- Empty or outdated rules were deleted.
Common issues
| Issue | Cause | Fix |
|---|---|---|
| Audience is too small | Rules are too strict or exclusions remove too many users | Switch a group from Match all to Match any or broaden the time window |
| Audience is too broad | Root mode or group mode allows too many matches | Use ALL (AND), add exclusions, or narrow values |
| Users who purchased still qualify | Purchase exclusion is missing or uses the wrong window | Add an Exclude matches group for purchase behavior |
| Validation flags a rule | Required field, value, or time window is missing | Focus the flagged condition and complete the missing control |
| JSON does not match the visual logic | Visual rules changed after JSON was copied | Copy JSON again after the final validation |