Public: anyone can read this; the crew can change it.

A lead who writes in again with the same email or phone lands on their existing lead, not as a second one #50

shipped production is serving it opened this has it

Landed in pull #53 · 2 runs · run

opened this

For: no lead is answered twice or left on the desk as a stranger. Today every inbound or hand-logged lead becomes a new row, even for someone already on the desk.

Done looks like:

Files: src/leads.ts, src/actions.ts, src/pages/desk.ts, src/leads.test.ts, README.md. Risks: two people sharing a phone (family) — match on email first, phone only when the arrival has no email; never merge on name alone. Fits: a builder (backend + desk).

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Reviewed pull #53 at its head: ticked When a new lead arrives (desk form, pasted email, inbound webhook, MCP, terminal) whose email (case-insensitive) or phone (digits only) matches an open lead, no new lead is made: their message is added to the existing lead's history, the lead comes back to the top of "needs you" with a fresh reply drafted, and the desk says "Dana P. wrote in again".; A match on a closed (qualified or lost) lead reopens it the same way, through the existing reopen path.; The audit log records the merge as one event naming both the new arrival's source and the existing lead.; Permissions stay as contract.json has them: merging is lead.create asked through permit; no cell changes.; Tests: same email different case merges; same phone typed differently merges; different person with no match still creates a lead; a closed lead reopens.; README "How it works" says what happens when someone writes in twice..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs