Campaign Rules
Campaign rules determine which leads trigger video generation and which campaign script to use.
Rule Structure
Each rule consists of:
- Field: The lead field to evaluate
- Operator: How to compare (equals, contains, etc.)
- Value: The value to match against
Operators
| Operator | Description | Example |
|---|---|---|
equals | Exact match | source equals "hubspot" |
not_equals | Doesn’t match | source not_equals "test" |
contains | Contains substring | company_name contains "tech" |
not_contains | Doesn’t contain | email not_contains "test" |
greater_than | Numeric greater than | deal_value greater_than 10000 |
less_than | Numeric less than | score less_than 50 |
is_empty | Field is empty | phone is_empty |
is_not_empty | Field has value | company_name is_not_empty |
Creating Rules
In the Dashboard
- Go to Campaigns > Your Campaign
- Click Add Rule
- Select field, operator, and value
- Click Save
Rule Examples
Match HubSpot leads:
source equals "hubspot"Match enterprise companies:
company_size contains "enterprise"Match high-value deals:
custom_fields.deal_value greater_than 25000Multiple Rules
When multiple rules exist, they’re combined with AND logic by default:
source equals "hubspot"
AND
company_size equals "enterprise"
AND
custom_fields.deal_value greater_than 10000All conditions must be true for the campaign to trigger.
Rule Priority
If a lead matches multiple campaigns:
- Most specific campaign wins (more rules)
- If tied, lower
prioritynumber wins - If still tied, most recently created wins
Setting Priority
{
"campaign_id": "camp-123",
"priority": 10,
"rules": [...]
}Lower numbers = higher priority (priority 1 runs before priority 10).
Accessing Lead Fields
Standard Fields
first_name
last_name
email
company_name
source
job_title
industryCustom Fields
Access custom fields using dot notation:
custom_fields.product_interest
custom_fields.budget_range
custom_fields.meeting_requestedTesting Rules
Preview Matches
Before activating, test your rules:
- Go to Campaigns > Your Campaign
- Click Test Rules
- Enter sample lead data
- See if the campaign would trigger
Example Test
Input:
{
"email": "john@enterprise.com",
"company_name": "Enterprise Corp",
"source": "hubspot",
"custom_fields": {
"deal_value": 50000
}
}Result: Campaign would trigger.
Common Patterns
Source-Based Routing
Rule 1: source equals "hubspot"
→ Campaign: HubSpot Welcome
Rule 2: source equals "salesforce"
→ Campaign: Salesforce WelcomeIndustry-Specific
Rule 1: industry equals "healthcare"
→ Campaign: Healthcare Demo
Rule 2: industry equals "finance"
→ Campaign: Finance DemoLead Scoring
Rule 1: custom_fields.score greater_than 80
→ Campaign: Hot Lead Outreach
Rule 2: custom_fields.score greater_than 50
→ Campaign: Warm Lead NurtureNext Steps
- User Routing - Assign leads to users
- Core Concepts - Understand campaigns