Syncs the event-lead-capture and lead-interests specs into main specs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
3.4 KiB
Proposal
Why
Go-live success is one thing: staff can track leads at an event. This change delivers that. A salesperson opens an event on a phone or iPad, keys a lead in, and the system says whether the person is new or already known. Staff then work through that event's leads. See docs/superpowers/specs/2026-11-26-co-lite-foundation-and-leads-design.md (Lead data model, Capture and matching rules, Listings, Access). Change 3 added events and each event's team of salespeople; this change uses that team.
The design's change 4 is split. This is 4a: the event floor. 4b adds the Lead Listing, the lead detail page with lead edits, and both CSV exports.
What Changes
- Interests: an admin-managed list of products and services used to tag leads (add, rename, reorder, deactivate). New
BO_INTERESTSmodule. - Lead tables in
services-counter:lead(one row per person),event_lead(one row per lead per event),interest,event_lead_interest. All carrycompany_id. - Key-in form: staff enter a mobile and/or an email. The mobile is normalised to E.164 (default +60) and the email trimmed and lowercased. Matching leads in the company are shown; staff pick one (EXISTING) or capture a different person (NEW). No match creates a new lead (NEW). Picking a match fills only the lead's blank fields. A lead already captured at this event is not captured again; the form opens that event lead.
- Event Leads Listing: one event's leads with name, mobile, email, NEW/EXISTING, salesperson, temperature, status, interests and next follow-up. Filters: salesperson, temperature, status, interest, NEW/EXISTING. Server-side paging.
- Event lead edit: salesperson, temperature, status, interests, next follow-up date and notes.
- Salesperson from the team: a lead's salesperson must be on the event's team (change 3). A salesperson already set stays allowed after they leave the team or are deactivated.
- Phone-width screens: the event picker, listing (cards on phones), key-in form and event lead edit work on a phone and an iPad.
- New module
BO_EVENT_LEADS(/event-leads) for the whole event-floor workflow: pick an event, list, capture and edit its leads. - New dependency
com.googlecode.libphonenumber:libphonenumberinmobile-api, for phone normalisation. Nothing in the repo parses phone numbers today, and hand-rolled parsing is how one person becomes two leads.
Not in this change (4b): Lead Listing, lead detail and lead edits, CSV exports, and the export permission.
Capabilities
New Capabilities
lead-interests: managing the interest list used to tag leads.event-lead-capture: capturing leads at an event with New/Existing matching, listing and editing an event's leads.
Modified Capabilities
None.
Impact
solvway-services-counter:Interest,Lead,EventLeadentities, repositories, a transactional capture endpoint, match, listing and update endpoints.solvway-mobile-api:AdminInterestController,AdminEventLeadControllerand services; libphonenumber dependency.solvway-admin-portal:app/interests/**,app/event-leads/**pages, route handlers, services, types, i18n, route-module map entries.- Database: four new
service-countertables and twoservice-system.modulerows. Additive only. local/seed/03-colite.sql: mirrors the new tables and modules.- No change to the gateway, the
eventtable or existing endpoints.