Simulate lead routing rules before they break your funnel
Build a routing test harness that uses AI-generated edge cases, sample leads, and QA checks to catch assignment conflicts before new routing rules go live.
What you will have
A lead routing simulator with test records, expected outcomes, actual outcomes, conflict notes, and launch approval checks.
Setup time
3-5 hours
Time saved
4-8 hours per routing change
Estimated cost
$20 to $150 per month
Tools used
3 tools
Why this works
Routing bugs are expensive because they hide inside edge cases: missing country, duplicate company, partner source, current customer, enterprise account, or multiple product interests. This workflow creates those edge cases before launch and compares expected outcomes against actual workflow behavior. The result is a practical preflight system for routing changes.
Step-by-step workflow
Run the workflow
This workflow is fully available. Follow the steps below to build the system from start to finish.
1
Document the current and proposed routing rules
45-60 min
45-60 min
In Google Sheets, write the current routing rules and proposed routing rules in plain English. Include source rules, territory rules, segment rules, product rules, partner rules, customer rules, disqualification logic, fallback owner, SLA timing, and owner notification steps. If the rule cannot be explained clearly, it should not be launched yet.
Output
A plain-English routing rule document with current and proposed logic side by side.
Google SheetsHubSpot
Pro tip
Plain-English rule documentation exposes conflicts that workflow builders often miss because the automation UI hides logic across branches.
2
Generate routing edge cases with Claude
30-45 min
30-45 min
Give Claude the proposed rules and ask it to generate test leads that should exercise every branch and edge case. Include clean examples, missing-field examples, duplicate examples, conflicting-field examples, partner leads, customer leads, international leads, high-value enterprise leads, and disqualified leads. Each test row needs an expected owner and expected SLA.
Output
A routing test matrix with realistic lead records and expected routing outcomes.
ClaudeGoogle Sheets
Pro tip
The ugly edge cases matter more than the happy path. Routing almost always works for perfect leads and fails for messy ones.
Prompt template
Create a lead routing test matrix from these proposed rules.
Routing rules:
{{routing_rules}}
Sales territories:
{{territory_rules}}
Segments and owner groups:
{{segments_and_owner_groups}}
Lead sources:
{{lead_sources}}
Generate {{number_of_test_leads}} test records. Include:
- Happy path records
- Missing field records
- Conflicting field records
- Duplicate company examples
- Partner-sourced leads
- Current customer leads
- Disqualified leads
- International territory edge cases
- High-value enterprise edge cases
For each row include expected owner, expected SLA, expected lifecycle stage, and why this case matters.
3
Create test records in HubSpot
45-90 min
45-90 min
Create test leads or contacts in HubSpot using the test matrix. Use a clear naming convention such as TEST_ROUTING_BATCH_29 and prevent these records from entering live sales sequences. If possible, run them in a sandbox or test workflow first. Keep the Google Sheet open so you can compare expected outcomes with actual routing results.
Output
Test records created safely in HubSpot and mapped to expected outcomes.
HubSpotGoogle Sheets
Pro tip
Use a test email domain and suppression list so test contacts do not accidentally enter customer-facing automation.
4
Run the routing workflow and capture actual outcomes
45-60 min
45-60 min
Trigger the proposed routing workflow on the test records. Capture actual owner, assigned team, lifecycle stage, SLA task, notification, source attribution, and any workflow errors. Add these outcomes next to the expected results in Google Sheets. Do not judge the workflow by whether it ran. Judge it by whether it made the correct decision for each case.
Output
Expected-vs-actual routing results for every test record.
HubSpotGoogle Sheets
Pro tip
Workflow history is your friend. It shows which branch fired, which is usually where the bug hides.
5
Analyze mismatches and rule conflicts
30-45 min
30-45 min
Paste the expected-vs-actual table into Claude and ask it to identify mismatches, ambiguous rules, branch order issues, missing fallback rules, and field dependencies. Separate configuration bugs from policy questions. Configuration bugs can be fixed immediately; policy questions need stakeholder decisions.
Output
A mismatch report grouped by bug, ambiguity, missing rule, and stakeholder decision.
ClaudeGoogle Sheets
Pro tip
Many routing failures are not technical. They are unresolved sales policy decisions pretending to be automation problems.
Prompt template
Analyze this lead routing test result table.
Routing rules:
{{routing_rules}}
Expected vs actual outcomes:
{{expected_vs_actual_table}}
For each mismatch, classify it as:
1. Workflow configuration bug
2. Rule ambiguity
3. Missing fallback logic
4. Field dependency issue
5. Stakeholder policy decision
6. Test data problem
For each issue, explain the likely cause, recommended fix, and whether it blocks launch.
6
Fix rules and rerun the blocking cases
1-2 hours
1-2 hours
Update the HubSpot routing workflow and rerun only the cases that failed or exposed ambiguity. Keep version notes in Google Sheets so you know what changed between tests. Continue until every blocking case passes or has an explicit owner-approved exception.
Output
A corrected routing workflow with blocking test cases rerun and resolved.
HubSpotGoogle Sheets
Pro tip
Do not rewrite the whole workflow after every failed test. Fix one class of issue at a time or you will create new bugs while solving old ones.
7
Get launch approval and monitor first live records
30 min approval + ongoing monitoring
30 min approval + ongoing monitoring
Before launch, have marketing ops, RevOps, and sales leadership approve the test matrix and resolved issues. After launch, monitor the first 25-50 live leads and compare actual assignment patterns against your expected rules. Keep the simulator as a reusable test pack for future routing changes.
Output
Approved routing launch with live monitoring and reusable test cases for future changes.
HubSpotGoogle Sheets
Pro tip
Your first live records are the final QA pass. Watch them manually for 24-48 hours instead of assuming the simulator caught everything.
Expected results
Test coverage
30-75 test leads
This range is enough to cover happy paths, edge cases, and major routing branches without creating unnecessary test noise.
Routing rework saved
4-8 hours
Preflight testing catches assignment bugs before sales teams find them in live lead queues.
Launch confidence
Expected-vs-actual QA
The workflow requires comparing actual automation behavior against documented expected outcomes.
Reusable asset
Routing test pack
The same test matrix can be reused whenever territories, ownership, lead sources, or scoring logic changes.
Related workflows
Continue with workflows that share a similar GTM motion, category, or tool stack.