For Business Owners · 7 min read

How do you stop two sales reps from calling the same lead?

Background: what an appointment setter does

AllyOS is the business system I built for our company with Claude Code and a small team of AI agents. Sales, quoting and production all run through it.

Plenty of small B2B companies split sales into two jobs. Appointment setters call and text cold leads to book a real meeting. Closers run that meeting and win the deal. A setter does not own the customer; the setter's job is to get the person on the calendar and hand them over.

The trouble is the shared pool. Every setter works from the same list, and anyone can call anyone. With one setter, a quick "I've got this one" in the hallway is enough. Add a second setter, or a new hire, and sooner or later the same prospect gets two calls from your company on the same day. The prospect thinks you're disorganized. Your reps waste a call and may end up arguing over credit.

Think of a parking lot with no "taken" signs: two cars heading for the same spot is only a matter of time. This post is about putting a "taken" sign on every lead. All code and names below have been made generic, and nothing here uses business data.

Why not just give the lead to whoever calls first?

Short answer: "who is working this lead" and "who owns this customer" are different facts, and merging them breaks your hand-off rules.

The obvious fix is to make the first caller the lead's owner. We didn't, because the system already has a hand-off rule: an unowned lead that books a meeting goes to the person hosting the meeting, and booking a meeting never moves a lead that already has an owner.

If a setter became the owner on the first call, the lead would already be owned by the time the meeting was booked, so it would never reach the closer. Fixing double calls that way would quietly break the hand-off.

So the design adds a separate "Setter" row next to Owner. It is a label only. It changes no owner, assignment or booking rule. I wrote "the mark is not the owner" into the acceptance criteria on purpose, so nobody "simplifies" the two into one field later.

Where does the mark come from: a stored field or the history?

Short answer: compute it from the contact history you already keep. It's more accurate and less work.

"Who contacted this person first" is already recorded. Every call has the rep who placed it, every outbound text has a sender, and every email sent from the lead page has an author. I wrote one read-only query that lines up those three kinds of records by time and picks the earliest one made by someone who is currently a setter. That person holds the mark.

Why not write a "setter" field at the moment of the call? Three reasons:

  1. No backfill. Calls made before the feature shipped count from day one, without a one-off migration script.
  2. No lag. Our system doesn't let one module write another module's data inline; that kind of side effect goes through an async queue, which can be seconds late. The warning needs to work the moment the first call lands.
  3. No disagreement. There is one source of truth, the contact history, and the mark is always derived from it. A field can't say "A" while the history says "B".

It's also cheap. All three record types were already indexed by the person who acted, and the set of setters is small.

One more detail: only contacts by someone who holds the setter role *now* count. A manager who covers one call for a colleague does not become the setter.

Should the mark expire?

Short answer: no. Expiry looks fair but brings the double calls right back.

My first idea was to clear the mark 7 days after the last touch, so cold leads would go back to the pool. Walk through it and the flaw is obvious: a prospect talked to rep A last month and calls back today. If the mark is gone, rep B sees nothing and calls them again. That is exactly what we were trying to prevent.

So the mark never clears on its own. What about leads held by someone who left? A person handles that: a manager can move the mark to another setter or clear it. After a clear, the next setter to touch the lead gets the mark. Every move or clear writes a timeline entry saying who changed it, from whom and to whom.

The trade-off: the system never decides on its own, but every manual change is on the record.

Warn or block when a second rep calls?

Short answer: warn. Don't block.

Sometimes the second call is legitimate. The prospect asked for that rep by name, or the first rep is out sick. Block it and people will route around the system, say by calling from their own phones, and then you lose the data completely.

Here's what we built:

  1. The lead page's Setter row reads "*Name* is working this lead · last call 2h ago · 4 calls".
  2. When another setter presses Call, a confirm dialog appears first: "*Name* is already working this lead", with the latest touch and the counts, plus Cancel and Call anyway.
  3. Texting works the same way: the SMS sheet shows the warning and its button changes to Send anyway.
  4. No dialog for non-setters, for the setter who holds the mark, or for an unmarked lead.
  5. If the mark can't be read, the call goes through anyway. A warning is a nice-to-have. It must never stop normal work.

The part that's easiest to miss is the entry points. I counted 6 places in the app that can start a call to a lead: the lead page, the contact panel in the customer list, the contact page, call-back from the messages panel, the call-back list, and the phone bridge button. The dialog has to cover all of them, not just the most visible button, so the check sits in the shared dialing layer that every entry point goes through.

The leads list also gained a Setter column and a "Mine / No setter yet" filter. The server applies the filter, so paging and totals always agree.

Measured numbers

All of these are engineering counts. None of them are business data.

MetricValueHow it was measured
First commit to both phases mergedabout 3 h 5 min2026-12-03, commit times of the two merges (2026-12-02, 11:30 → 14:34 US Eastern)
Non-merge commits6 (2 in phase 1, 4 in phase 2)2026-12-03, git rev-list --no-merges --count
Size of the change66 files, 2,991 lines added2026-12-03, git diff --shortstat, both phases summed
New frontend and module unit tests18, across 3 files2026-12-03, static count (not run in this container)
New database test assertions21, across 2 files2026-12-03, assertion counts declared in the test files
Entry points with the confirm dialog6 for calls + 1 for texts2026-12-03, checked item by item against the design doc
Record types the mark is derived from3: calls, texts, emails2026-12-03, design doc
Automatic expirynone (never expires)2026-12-03, acceptance criteria

A checklist you can copy

  1. Separate "who owns the customer" from "who is working the lead". Don't make one field do both jobs.
  2. List every place your system already records who contacted whom (calls, texts, emails) and derive the mark from those records instead of adding a hand-filled field.
  3. Count only people in the setter role today, so a manager covering one call doesn't take the mark.
  4. Don't auto-expire the mark. Let a manager move or clear it, and log every change on the timeline.
  5. After a clear, the next rep to make contact gets the mark automatically.
  6. Warn a second rep instead of blocking them, and give them a "Call anyway" button.
  7. Put the check in the shared dialing and messaging layer so every entry point goes through it, and count the entry points before you ship.
  8. If the mark can't be read, let the call through. A warning feature must never block real work.
  9. Add "Mine / No setter yet" filters to the list and apply them on the server, so paging and totals match.
  10. Write "this does not change ownership rules" into the acceptance criteria so the two concepts stay apart.

Further reading: Wikipedia's entries on lead generation and audit trails cover the general ideas behind this approach.

FAQ

We only have two or three reps. Do we really need this in software?

With a tiny team, talking it out works, until a new hire starts or everyone is pulling from the same big list. Then double calls are close to guaranteed. The feature itself is small: both phases merged in a little over three hours. What it depends on is every call being logged in the system. If your reps still dial from personal phones and keep notes in different places, pulling the contact history into one place comes first. If you want to move a sales process like this online, see my services.

Why not use round-robin assignment instead?

Round-robin answers "who should call next", not "who already called". Call-backs, referrals and the same person filling in your form twice all break it. The mark doesn't care how leads are split. It records what actually happened and warns before a collision, and you can run it alongside round-robin. An earlier post, why incremental sync silently drops records, makes the same point from another angle: trust one source of truth.

If marks never expire, won't the pool fill up?

It can drift that way, so managers have two actions: move and clear. The "No setter yet" filter shows how many leads nobody has touched. If one rep is holding more leads than they can work, a manager can reassign them, and each change is logged.

About the author

Morningstar Lucifer (晨星·路西法) is an AI engineering systems architect based in Chengdu, China, with 12 years in front-end architecture and team leadership. Using Claude Code and a multi-agent development pipeline, he built AllyOS, the system that runs AllyNutra's entire business, in 118 days. He also built TeacherCopilot, a profitable AI product.

Written by the author together with AI. All numbers were measured in the AllyOS repository on the dates shown; code samples and paths are rewritten generic versions to protect client and company information.

Book a 15-minute call Services and process (in Chinese)