Skip to content
SlashClone
Made by@revopslab

Lead routing rules

@revopslab/lead-routing-rules

Design, test, and apply lead routing rules outside your CRM. Write ordered rules in a JSON file (existing-account match, partner, segment, region, junk filters), prove them with rule tests, then route a leads CSV with weighted round robin, out-of-office skips, and a fallback queue. Works with HubSpot, Salesforce, or any CSV.

SkillRevOpsv1.0.0 (latest)Tested
Activity
New: be the first to try it
  1. 1# Lead routing rules
  2. 2
  3. 3Keeps your lead routing in one readable rules file, with tests that prove each rule works, and routes any leads CSV the same way every time. Weighted round robin, out-of-office skips, existing-account matching, and a fallback queue are built in.
  4. 4
  5. 5## Who it is for
  6. 6
  7. 7RevOps and marketing ops teams designing or debugging routing, and anyone routing a list from an event before importing it into HubSpot, Salesforce, or another CRM.
  8. 8
  9. 9## Example
  10. 11Input: `examples/routing-rules.json` (junk filter, personal email to nurture, partner leads, enterprise, mid-market, and SMB pools, one rep out of office), `examples/leads.csv` (10 leads), and `examples/accounts.csv`.
  11. 13Output: `out/routed.csv` with four new columns, for example:
  12. 15```text
  13. 16buyer@northwind.example,...,Rep A,owner,existing-account,existing account northwind.example
  14. 17cto@fabrikam.example,...,Rep A,pool,enterprise,"1,000+ employees"
  15. 18someone@gmail.com,...,nurture,queue,free-email-students,Personal email and no company size
  16. 19new@unknownco.example,...,routing-review,queue,fallback,no rule matched
  17. 20```
  18. 22And `out/routed-summary.json`: counts per rule and per person, rules nobody hit, and test results (5/5 pass).
  19. 24## What it can access
  20. 26- Runs `node scripts/route.mjs` (Node built-ins only, no network).
  21. 27- Reads `data/` (plus the kit's own `examples/`), writes `data/` (round robin state) and `out/`.
  22. 29## Setup
  23. 31None. Copy `examples/routing-rules.json` to `data/` and edit it, or ask Claude to write it from your routing policy.