Skip to main content

Membership Rules

Membership rules define who belongs to a dynamic audience. When consumers match the rules, they’re automatically included in the audience. This guide covers all available rule types and configuration options.

Rule Basics

How Rules Work

  1. Rules evaluate consumer attributes
  2. If conditions are met, the consumer is a member
  3. Membership updates automatically as data changes
  4. No manual maintenance required
Caption: Membership rules automatically determine audience membership

Rule Components

Each rule consists of:
ComponentDescriptionExample
FieldConsumer attribute to checkemail, loyaltyPoints, tags
OperatorHow to compareequals, contains, greaterThan
ValueWhat to compare against”@company.com”, 1000, “VIP”
Caption: Each rule has three main components

Available Fields

Contact Information

FieldTypeDescription
emailStringConsumer’s email address
emailDomainStringDomain part of email (after @)
phoneStringPhone number
fullNameStringFull name
firstNameStringFirst name
lastNameStringLast name

Loyalty & Engagement

FieldTypeDescription
loyaltyPointsNumberCurrent loyalty points balance
loyaltyTierStringCurrent tier (Gold, Silver, etc.)
totalOrdersNumberTotal order count
totalSpendNumberLifetime spend amount
averageOrderValueNumberAverage order value

Dates & Timing

FieldTypeDescription
createdAtDateWhen consumer was created
lastActivityAtDateMost recent activity
firstPurchaseAtDateFirst purchase date
lastPurchaseAtDateMost recent purchase

Tags & Attributes

FieldTypeDescription
tagsArrayConsumer tags
externalIdStringExternal system ID
sourceStringWhere consumer originated

Custom Attributes

Custom attributes you’ve defined for consumers can also be used in rules:
FieldTypeDescription
metadata.VariesCustom metadata field
attributes.VariesCustom attribute

Operators

String Operators

OperatorDescriptionExample
equalsExact matchemail equals “[email protected]
notEqualsNot an exact matchemail notEquals “[email protected]
containsContains substringemail contains “@company.com”
notContainsDoesn’t contain substringemail notContains “@competitor.com”
startsWithBegins withemail startsWith “vip”
endsWithEnds withemail endsWith “.edu”
isEmptyField is emptyfirstName isEmpty
isNotEmptyField has a valuephone isNotEmpty

Number Operators

OperatorDescriptionExample
equalsExact matchloyaltyPoints equals 1000
notEqualsNot equalloyaltyPoints notEquals 0
greaterThanGreater than valuetotalSpend greaterThan 500
greaterOrEqualGreater or equaltotalOrders greaterOrEqual 5
lessThanLess than valueloyaltyPoints lessThan 100
lessOrEqualLess or equalaverageOrderValue lessOrEqual 50
betweenWithin rangeloyaltyPoints between 500-1000

Date Operators

OperatorDescriptionExample
equalsExact datecreatedAt equals “2024-01-01”
beforeBefore datelastPurchaseAt before “2024-01-01”
afterAfter datecreatedAt after “2024-06-01”
withinWithin periodlastActivityAt within “30 days”
notWithinNot within periodlastPurchaseAt notWithin “90 days”

Array Operators

OperatorDescriptionExample
containsArray includes valuetags contains “VIP”
notContainsArray doesn’t includetags notContains “blocked”
isEmptyArray is emptytags isEmpty
isNotEmptyArray has itemstags isNotEmpty
hasAllHas all valuestags hasAll [“VIP”, “Verified”]
hasAnyHas any valuetags hasAny [“Gold”, “Silver”]

Combining Rules

AND Logic

When rules are combined with AND, consumers must match all rules:
Rule 1: loyaltyPoints greaterThan 1000
AND
Rule 2: totalOrders greaterThan 5
Result: Only consumers with 1000+ points AND 5+ orders are included. Caption: AND logic requires all conditions to be true

OR Logic

When rules are combined with OR, consumers must match any rule:
Rule 1: loyaltyTier equals "Gold"
OR
Rule 2: totalSpend greaterThan 5000
Result: Consumers with Gold tier OR $5000+ spend are included. Caption: OR logic requires any condition to be true

Complex Logic

Combine AND and OR for complex targeting:
(Rule 1: loyaltyTier equals "Gold" OR Rule 2: loyaltyTier equals "Platinum")
AND
Rule 3: lastActivityAt within "30 days"
Result: Gold OR Platinum members who were active in the last 30 days.

Rule Groups

Group rules for cleaner organization and complex logic: Caption: Group rules for complex logic

Creating Groups

  1. Click Add Group
  2. Add rules within the group
  3. Set logic within the group (AND/OR)
  4. Set logic between groups (AND/OR)

Common Rule Patterns

VIP Customers

loyaltyTier equals "Gold"
OR
loyaltyTier equals "Platinum"
OR
totalSpend greaterThan 10000

Active Customers

lastActivityAt within "30 days"
AND
totalOrders greaterThan 0

High-Value Prospects

totalSpend between 500-2000
AND
lastPurchaseAt within "60 days"
AND
averageOrderValue greaterThan 100

New Customers

createdAt within "30 days"
AND
totalOrders lessOrEqual 1

Corporate Customers

emailDomain notContains "@gmail.com"
AND
emailDomain notContains "@yahoo.com"
AND
emailDomain notContains "@hotmail.com"

Lapsed Customers

totalOrders greaterThan 2
AND
lastPurchaseAt notWithin "90 days"

Testing Rules

Preview Matching Consumers

Before saving, preview which consumers match:
  1. Configure your rules
  2. Click Preview Matches
  3. Review the list of matching consumers
  4. Adjust rules if needed
Caption: Preview which consumers match your rules

Test Specific Consumer

Check if a specific consumer matches:
  1. Click Test Consumer
  2. Search for a consumer
  3. See which rules they match/fail
  4. Understand why they’re included or excluded

Rule Performance

Best Practices

  1. Use indexed fields - Email, phone, and ID fields are fastest
  2. Avoid complex calculations - Simple rules perform better
  3. Limit nested groups - Keep logic straightforward
  4. Test with samples - Preview before saving

Performance Considerations

Rule TypePerformanceNotes
Email equalsFastDirect lookup
Tags containsFastIndexed search
Custom metadataMediumMay require scan
Complex calculationsSlowAvoid in large audiences

Editing Rules

Modifying Existing Rules

  1. Navigate to the audience detail page
  2. Go to the Rules tab
  3. Click on a rule to edit
  4. Save changes

Adding Rules to Existing Audience

  1. Click Add Rule on the Rules tab
  2. Configure the new rule
  3. Set logic connection (AND/OR)
  4. Save

Removing Rules

  1. Click the delete icon on the rule
  2. Confirm removal
  3. Membership updates automatically
Removing rules may significantly change audience membership. Preview changes before saving.

Troubleshooting

Rules Not Matching Expected Consumers

  1. Check field names - Ensure using correct field
  2. Verify operators - equals vs. contains
  3. Check data types - String vs. number
  4. Review logic - AND vs. OR

Rules Matching Too Many Consumers

  1. Add more restrictive conditions
  2. Change OR to AND logic
  3. Add exclusion rules

Rules Matching Too Few Consumers

  1. Relax conditions (greaterThan 500 vs. 1000)
  2. Change AND to OR logic
  3. Remove restrictive rules