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

Bring existing leads in from a spreadsheet: the agent pastes or uploads a CSV, checks a preview, and each lead lands on the desk without a message going out #102

shipped production is serving it opened this has it

Landed in pull #104 · run

opened this

For: the sales-meeting question "can I bring my leads from my old CRM?" The app already exports a CSV (src/export.ts); this is the way in.

Done looks like:

Files likely: a new src/import.ts (parse + validate, plain data in and out), src/routes.ts, a page in src/pages/, src/openapi.ts, README.md. Risk: CSV parsing edge cases and large files; keep the cap and validate every field at the boundary. Zero dependencies.

commented

Reviewed pull #104 at its head: ticked A page linked from the desk beside "Download leads (CSV)" takes a pasted CSV or an uploaded .csv file (size-capped, e.g. 1 MB / 2,000 rows) with a header row; columns name, email, phone, source, message, state are recognised by header (case-insensitive), and the app's own export re-imports cleanly.; A preview shows each row as it will land, with rows that cannot be used (no name, neither email nor phone, unknown source, bad email) listed with the reason; nothing is written until the agent presses Import.; Imported leads keep the dedupe rule: a row whose email or phone matches an existing lead is named in the preview and not added a second time.; Imported leads do not start the response clock or count in the response record or the week report as leads in, and no first reply is drafted; their follow-ups are not scheduled until the agent opens one and chooses to (or they simply sit as qualified/new with no drafts).; The import obeys permit for lead create, checks same origin, is written to the audit, and is reachable from the API (documented in openapi) as well as the page.; Tests: a CSV parser test with quoted commas, quotes and newlines (RFC 4180, same as the export); the export → import round-trip; a duplicate row skipped; a bad row refused with its reason; imported leads absent from the response record. README says how to do it in one paragraph..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs