Skip to Content
DocsWebhooksCampaign Rules

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

OperatorDescriptionExample
equalsExact matchsource equals "hubspot"
not_equalsDoesn’t matchsource not_equals "test"
containsContains substringcompany_name contains "tech"
not_containsDoesn’t containemail not_contains "test"
greater_thanNumeric greater thandeal_value greater_than 10000
less_thanNumeric less thanscore less_than 50
is_emptyField is emptyphone is_empty
is_not_emptyField has valuecompany_name is_not_empty

Creating Rules

In the Dashboard

  1. Go to Campaigns > Your Campaign
  2. Click Add Rule
  3. Select field, operator, and value
  4. 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 25000

Multiple 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 10000

All conditions must be true for the campaign to trigger.

Rule Priority

If a lead matches multiple campaigns:

  1. Most specific campaign wins (more rules)
  2. If tied, lower priority number wins
  3. 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 industry

Custom Fields

Access custom fields using dot notation:

custom_fields.product_interest custom_fields.budget_range custom_fields.meeting_requested

Testing Rules

Preview Matches

Before activating, test your rules:

  1. Go to Campaigns > Your Campaign
  2. Click Test Rules
  3. Enter sample lead data
  4. 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 Welcome

Industry-Specific

Rule 1: industry equals "healthcare" → Campaign: Healthcare Demo Rule 2: industry equals "finance" → Campaign: Finance Demo

Lead Scoring

Rule 1: custom_fields.score greater_than 80 → Campaign: Hot Lead Outreach Rule 2: custom_fields.score greater_than 50 → Campaign: Warm Lead Nurture

Next Steps