Rule-Based Routing
What is Rule-Based Routing. Rule-based routing assigns records to specific users or teams based on criteria you define. Distribution Engine evaluates each record against your rules and routes it to t…
What is Rule-Based Routing
Rule-based routing assigns records to specific users or teams based on criteria you define. Distribution Engine evaluates each record against your rules and routes it to the appropriate destination. This method ensures records reach the right person based on business logic rather than availability alone.
Unlike round-robin distribution which cycles through team members sequentially, rule-based routing provides intelligent matching based on specific conditions and business requirements.
How Distribution Engine handles Rule-Based Routing
Distribution Engine processes rules in priority order from top to bottom. When a record matches a rule's criteria, it routes to the specified assignee and stops evaluating further rules.
This priority-based algorithm ensures deterministic routing where each record follows a predictable path through your rule set.
When to Use Rule-Based Routing
Use rule-based routing when:
- Assignment depends on business logic (territory, product, tier, compliance)
- You need deterministic outcomes (the same input always routes the same way)
- Records should route to specific teams or queues, not just the next available user
Supported Records
Rule-based routing can be applied to:
- Leads
- Opportunities
- Cases
- Accounts
- Contacts
- Custom objects (if enabled in your org)
Rules evaluate fields on the routed object and, where supported, related records.
How Rule-Based Routing Works
When a record matches a rule's criteria, Distribution Engine assigns the record and halts further rule evaluation.
This means:
- Rule order is critical
- More specific rules should be placed above broader rules
- Only one rule can ever assign a record in a single routing pass
Common Use Cases
You can configure Distribution Engine in a variety of ways.Here are just a few examples that are applicable to almost any routing use case in Salesforce:
Territory assignment - Route leads to reps based on geographic criteria such as state, country, or region.
Product specialization - Assign opportunities to teams with expertise in specific product lines or service categories.
Account tiering - Direct enterprise accounts to senior reps while routing SMB accounts to a general sales pool.
Language or timezone matching - Route support cases to agents who speak the customer's language or work in their timezone. This prevents situations where an agent would receive assignments outside their working hours.
Lead source handling - Assign partner referrals to a dedicated partner team while inbound leads follow standard distribution.
Rule Configuration
A rule is a collection of criteria that determines whether a record matches. Rules are evaluated in priority order (lower numbers first).
Criteria - The conditions a record must meet. Build criteria using any standard or custom field on the record. Supports AND/OR logic for complex conditions, allowing you to define all possible combinations needed for accurate routing.
Priority - The order in which rules are evaluated. Lower numbers are evaluated first. This determines which conditions are checked in sequence.
When a rule matches, you specify the assignment action: route to a specific user, queue, or team. You can also specify a distribution method such as round robin to distribute among team members.
Rule Design Best Practices
Order from most specific to most general
Place narrow, high-intent rules (e.g. Enterprise + Region + Product) above catch-all rules.
Avoid overlapping criteria where possible
If two rules can match the same record, priority order becomes the only differentiator.
Use fallback rules instead of broad conditions
Instead of Region != NULL, rely on fallback behavior for cleaner logic.
Name rules descriptively
Example: ENT | West | Product A | Licensed Reps
This makes audits and troubleshooting significantly easier.
Fallback Options
When no rules match a record, Distribution Engine offers several fallback behaviors and alternative routing decisions:
- Assign to a default user or queue
- Trigger an alternative distribution method (such as round-robin for equal distribution)
- Leave unassigned for manual review
- Route to the record owner's manager
Common Troubleshooting Scenarios
Record routed to the wrong team
- Check rule priority order
- Confirm field values at the time of routing
- Verify no earlier rule matched unexpectedly
- Record not assigned
- Confirm fallback behavior is configured
- Validate required fields are populated
- Check rule criteria logic (AND vs OR)
- Rule not triggering
- Ensure the rule is active
- Confirm the record meets criteria exactly (picklist values, case sensitivity where applicable)
Frequently Asked Questions
What happens if a record matches multiple rules?
Distribution Engine evaluates rules in priority order and assigns based on the first matching rule. Subsequent rules are not evaluated once a match occurs. This prevents duplicate assignments and maintains a clean routing sequence.
Can I route based on related record data?
Yes. You can build criteria using fields from related objects such as the parent account on an opportunity or the contact on a case. This allows for complex routing logic that considers relationships across your data model.
How do I test my rules before activating them?
Use the Assignment Simulator feature to process sample records against your rules without creating actual assignments. This validates your logic before going live with pre-production testing.
The Distributor test tool also allows you to test a record against a distributor to see why it is not assigning.
Can rules change based on time of day or business hours?
Yes. Criteria can include time-based conditions, and rules can reference business hours calendars to route differently during and outside working hours. This ensures records route to available team members rather than those outside their timezone or schedule.
Summary
Rule-based routing provides deterministic, logic-driven assignment based on your business rules. It works best when combined with secondary distribution methods and clearly defined fallback behavior. Correct rule order and testing are essential for predictable outcomes.
How did we do?
Skill Based Matching