Creating Evaluation Rules

Overview

Evaluation rules filter which leads are included or excluded from scoring based on CRM and product data. Rules are checked before the AI scores each lead. If a lead fails a rule condition, it is excluded from evaluation.

Accessing Rules

Navigate to Rules from the main navigation. The page heading is Integration Rules. Each connected integration appears as a collapsible card showing its current rule count.

Supported Integrations

Rules can be created for any connected integration:

IntegrationAvailable Objects
SalesforceLead, Contact, Account
HubSpotContact, Company
Product OrgFlat fields with dot notation (no object tabs)
Only connected integrations appear. Product Org rules appear when your organization has product workspace data from webhooks.

Creating Rules

Add a Configuration

  1. Click Add Configuration
  2. Select the integration from the dialog
  3. The integration card expands and enters edit mode

Build Rule Conditions

Each rule has four components:

ComponentDescription
Object TypeThe CRM object to query (e.g., Lead, Contact, Account)
FieldThe specific field on that object
OperatorHow to compare the value
ValueThe expected value

Available Operators

Operators shown in the dropdown depend on the selected field's type.

OperatorField Types
Equals / Not EqualsString, picklist, boolean, enumeration, date/datetime
Contains / Not ContainsString
Starts With / Ends WithString
Greater Than / Less ThanString, number, currency, percent, date/datetime
Greater Than or Equal / Less Than or EqualString, number, currency, percent, date/datetime
Is Empty / Is Not EmptyString, number, currency, percent, date/datetime, enumeration
Is True / Is FalseBoolean

Field metadata is loaded from your CRM automatically. For picklist/enumeration fields, available values are shown in the value selector.

Allow If Empty

Each rule has an Allow If Empty toggle. When enabled, leads where the field has no value will still pass the rule (rather than being excluded).

Save Rules

Click Save to apply. Rules become active immediately for all future evaluations.

Rule Examples

Exclude opted-out leads (Salesforce):

  • Object: Lead | Field: HasOptedOutOfEmail | Operator: Is False

Only score marketing qualified leads (Salesforce):

  • Object: Lead | Field: Status | Operator: Equals | Value: Marketing Qualified Lead

Filter by account revenue (Salesforce):

  • Object: Account | Field: AnnualRevenue | Operator: Greater Than | Value: 1000000

Exclude do-not-call contacts (HubSpot):

  • Object: Contact | Field: hs_do_not_call | Operator: Is False

Filter by product plan (Product Org):

  • Field: planName | Operator: Equals | Value: Enterprise

Product Org rules are flat (no object type tabs). Use dot notation for nested fields, e.g., customFields.projects_count or featureFlags.api_enabled.

Multiple Rules

You can define multiple rules per integration. All rules within an integration are evaluated together -- a lead must satisfy all conditions to be included in scoring.

Rules across different integrations are independent. You might have Salesforce rules filtering by lead status and Product Org rules filtering by product plan.

Managing Rules

Edit Existing Rules

  1. Expand the integration card
  2. Click Edit to enter edit mode
  3. Modify, add, or remove rule conditions
  4. Click Save

Delete Rules

  • Single integration: Remove all rules for that integration by clearing all conditions and saving
  • All rules: Click Delete All to remove rules for all integrations
Deleting rules is permanent and takes effect immediately.

How Rules Affect Evaluation

During evaluation, TrailSpark checks each lead's cached integration data against the configured rules. Leads that fail any rule condition are excluded from AI scoring entirely -- they will not receive a score or appear in evaluation results.

Rules use AND logic within each integration: a lead must satisfy all conditions for that integration to pass. Rules across different integrations are evaluated independently.

Field metadata (the list of fields available in dropdowns) is cached and refreshed periodically.

Next Steps