Day 058 / n8n / Workflow Automation

Lead Routing Simulator

View source ↗Scroll to explore ↓
Lead Routing Simulator project cover
/ Overview

A dependency-free Python CLI that previews prioritized lead assignments and overlapping routing rules without repeating lead attribute values.

NameLead Routing Simulator

ClientIndependent daily build

IndustriesWorkflow automation tooling

DateDay 058 · October 27, 2026

/ Challenge

Lead-routing rules can overlap or send unmatched records to an unexpected fallback. Reviewing them directly inside an automation builder makes priority behavior harder to isolate, while logging full lead attributes creates unnecessary data exposure.

/ Provided services

Clear thinking.
Practical delivery.

01

Routing preflight

Shows the destination selected for each sanitized lead before rules are translated into an automation.

02

Overlap review

Keeps the winning rule and lower-priority matches visible so broad conditions can be reviewed.

03

Data-minimized output

Reports identifiers and routing outcomes without copying lead attributes into logs.

Lead Routing Simulator feature visual
/ Solution

Lead Routing Simulator validates one bounded local JSON plan, evaluates equals, one-of and exists conditions, orders matches by descending priority with stable source-order ties, and sends unmatched leads to an explicit default team. It reports lead IDs, destination teams, selected routes and lower-priority overlaps without repeating attribute values. It does not connect to n8n or a CRM, mutate leads, balance capacity, judge fairness or prove production readiness.

/ Impact

Three declarative condition types

Deterministic priority ordering

Stable tie handling

Explicit default destination

Overlapping-route detection

Value-free reports

100 routes and 1,000 leads

Eleven standard-library tests

/ Tech stack

Python standard library

Argparse, JSON and pathlib provide a dependency-free offline command-line tool.

Declarative rule evaluation

A small condition engine handles equality, membership and presence with explicit priority semantics.

Unittest

Eleven tests cover operators, priorities, ties, fallbacks, overlaps, duplicate keys and value-free output.

Next project

Secret Placeholder Checker

View case study ↗