Case study · Workflow automation

2 to 3 people, 3–4 hours a day. Now 1 person, 5 minutes.

A sales team received lead lists every day and turned them into assigned, CRM-ready leads by hand — looking up territories, removing duplicates, and passing each one to the next rep in line. That was two or three people’s mornings, every day. It is now one upload, and it comes out the same way every time.

A custom web tool for a B2B sales team — cleans a lead export, maps every lead to a territory by phone area code or ZIP, assigns it to the next rep in that team’s rotation, and returns a formatted workbook plus a file the CRM imports as-is.

Client A B2B sales team at a national retailerType Workflow automationStatus Live, in daily use

See it for yourself

A working demo of the real tool, with an invented roster, invented territories and a built-in sample file. Nothing in it belongs to a real company or a real person, and nothing you upload leaves your browser.

Open the live demo →

Click a report, press “Load sample export,” then “Run report.” Run it twice and watch the assignments continue from where the last run stopped.

Why a sales team outgrows the spreadsheet

Two reports arrived on a schedule: a daily export of web sign-ups from the CRM, and one-off lists of companies and phone numbers from other sources. Both had to become the same thing — a clean list of leads, each with a territory and a rep’s name on it, in exactly the layout the CRM would accept. Every step lived in someone’s head and a set of spreadsheets:

Which territory is this?

Look the phone’s area code up in a reference table with tens of thousands of rows. Toll-free numbers, Canadian numbers and unknown codes each had their own rule.

Whose turn is it?

Reps take leads in rotation, per team. The “next up” pointer was a person remembering where the last report left off.

Have we seen this one already?

Duplicates inside a file, and leads already owned by a current rep, had to be spotted by eye before they were handed out.

Did Excel eat the phone number?

A 13-digit number becomes 5.2E+12; a ZIP loses its leading zero. Both break an import silently.

It worked, mostly, because two or three experienced people carried it — three to four hours of their day, every day. That is also the problem: it depended on those people being available, it wore on them, and an error showed up as a lead in the wrong rep’s queue rather than as an error.

What the tool does

One page. Choose the report, upload the file (or paste straight from the CRM report grid), run, download. The rules are the team’s own rules, written down once and applied the same way every time.

CleanNormalize phonesRemove duplicatesMap territoryExclude owned leadsAssign in rotationWorkbook + CRM file

Territory mapping

By phone area code first, mailing ZIP as the fallback, with the team’s explicit overrides on top. Every lead exits through exactly one rule, so there is never a question of why it landed where it did.

Exceptions you can see

Out-of-country and unresolved toll-free numbers come out highlighted yellow; unknown area codes red. They stay in the file for a human to look at, and they never take a rep’s turn.

Round-robin that can’t double-count

One rotation pointer per team, shared by both reports, advanced once per lead. A run that fails halfway advances it zero times. Submitting the same file twice is caught.

Owned leads stay owned

If a web lead already belongs to a current rep, it is set aside and reported, not reassigned. The list of what was excluded, and why, is on screen after every run.

Files the CRM accepts first time

A workbook with the original data on one tab and the results on another, formatted the way the team’s approved reports always were — and a CSV the CRM imports without touching.

Reference data is an upload, not a code change

The rep roster and the territory table are replaced through an admin screen. Each upload is checked before it goes live; every previous version is kept.

Three decisions that made it trustworthy

Every rule was written down before anything was built

The order in which mapping rules apply, what counts as a duplicate, which phone formats are valid, what colour an exception gets — each was settled with the team and recorded in plain English. Where the old written procedures disagreed with what people actually did, that got resolved on paper first. The tool never guesses: if a record does not fit an approved rule, it is flagged, not routed.

The rotation is protected like money

Who gets the next lead is the one thing everyone on a sales floor cares about. So the rotation advances exactly once per lead, in the same transaction as the run record and the audit log. Retries, refreshes and duplicate uploads cannot move it a second time. A suite of automated tests attacks exactly that, every time the code changes.

It reproduces the team’s own approved reports, cell for cell

Before it went live, the tool was run against real past reports and compared to the files the team had already accepted — same rows, same assignments, same formatting. That comparison is now a permanent test, so a future change that alters the output gets caught before anyone sees it.

What changed

3–4 hoursa day, by hand, before
5 minutesa day, now
2–3 → 1people needed to run it
  • What took two or three people three to four hours a day now takes one person about five minutes: upload, run, download. The hours add up, but the bigger change is that a grinding daily chore no longer sits on two or three employees.
  • Every lead is routed by the same written rule, whoever runs the report and whatever day it is. Duplicates and already-owned leads are removed before anyone’s turn is used, and the report says what it removed.
  • Every run, every file and every assignment is stored in one place. If a question comes up months later — who got this lead, and why — the answer is a lookup, not an archaeology dig through old spreadsheets.
  • A rep joins or leaves, a territory rule changes: the team uploads a new roster or table and it takes effect immediately. No ticket, no waiting on an IT or architecture queue, and the rotation carries on without skipping anyone.
  • Phone numbers and ZIP codes come out exactly as they went in. Nothing is rounded, truncated or reformatted by a spreadsheet on the way through.

“The tool never guesses. If a lead doesn’t fit a rule, it’s flagged — not quietly sent to the wrong rep.”

How it was built, and what it costs to run

A web application with a small database behind it for the rotation, run history and reference files, and a set of background functions that do the processing. The rules themselves are a separate, self-contained module with no connection to the web or the database — which is what makes them testable, and what makes the public demo possible: the demo runs that same module in your browser.

Hosting runs on the free tier at this volume. There are no per-seat licences, and adding a report type is configuration and tests, not a new system. The whole thing is covered by more than a hundred automated tests, including the ones that try to break the rotation.

The team’s data stays private

Lead files contain real companies and real phone numbers, so the tool treats them that way. Uploads and generated files are stored privately and are never addressable from the browser; the site is password-protected; every run is written to an audit log. The reference roster and territory table live inside the system, not in a shared folder.

Nothing about a client appears on this site without their say-so, which is why this page names no company and the demo is built entirely from invented data.

Where else this fits

Any team that receives leads, applications or requests and has to hand them out fairly by territory or turn:

  • Inside sales and SDR teams working inbound lists
  • Dealer, franchise and distributor networks routing enquiries to the right location
  • Insurance and financial-services agencies assigning inbound quotes
  • Recruiting teams distributing applicants across recruiters
  • Nonprofits routing volunteer or client intake by region

Got a report somebody builds by hand every day?

Thirty minutes, no charge, no deck. We look at where the time goes and whether there is something here worth building.

Book a free 30-minute call Tell me about your project