sales-agent reads a CRM export, ranks accounts and drafts first touches that a person approves. Until now its tests used a hand-built file. I rewrote one with the column names HubSpot's export view uses (remembered, not from a live account) and two things went wrong.
- "Unsubscribed from all email" is HubSpot's wording; the reader only knew "...emails". A contact marked
truegot a draft. It is now dropped. - Lead Status beside Lifecycle Stage. The reader mapped both to one field and the lifecycle stage won, so a
Leadwith statusUnqualifiedwas ranked. Lead status is now its own field;UnqualifiedandDisqualifiedare dropped, and it still stands in for the lifecycle when that column is missing.
A test pins both (research.test.mjs). Caveat: header names and rows are made up from memory of HubSpot's layout; a real export is still wanted.