Skip to Content
Ranlanka CRM documentation — pre-release, subject to change.
FeaturesLead Management

Lead Management & Client Email Composer

The Lead Management module (/leads) captures pre-sale travel inquiries before they become full customer profiles and operational bookings, with a Send Email workflow for sharing documents directly from a lead.


1. Pipeline Stages & Views

Leads can be viewed either as a Kanban Board or a Filterable Table, scoped by service type (VISA, FLIGHT, TOUR), source, priority, and assigned consultant:

  • NEW — Raw inquiry captured from WhatsApp, phone, social media, website, or walk-in.
  • CONTACTED — Initial outreach completed.
  • QUALIFIED — Discovery completed (dates, destination, budget, and service intent confirmed).
  • PROPOSAL_SENT — Client email / quote / document has been shared with the lead.
  • NEGOTIATION — Client reviewing pricing, dates, or itinerary adjustments.
  • WON — Converted via 1-click handover into a Customer profile and draft booking request.
  • LOST — Disqualified or unconverted with a structured lost reason and notes.

2. Sending Emails & Local Attachments (SendLeadEmailModal)

From any lead’s detail drawer, staff can click Send Email to compose and send a branded email directly to the prospect without leaving the CRM:

  1. Compose & Attach:
    • Recipient Email (To): Prefilled from lead.email and editable before sending.
    • Subject & Body: Prefilled with lead context (client name, destination, service type, consultant) and fully editable as plain text (blank lines become paragraphs; single newlines become line breaks).
    • Optional Local File Attachment (up to 10 MB): Click or drag-and-drop a PDF, Word, Excel, CSV, TXT, ZIP, or image file from your computer. Files are validated client-side and server-side, then archived to Cloudflare R2 under leads/{leadId}/emails/{fileName}.
  2. Live Branded Preview:
    • Switching to the Email Preview tab calls POST /api/v1/leads/{id}/emails/preview (debounced) so the preview matches the exact EmailHtmlBuilder.wrapExternalEmail(...) HTML that will be delivered.
    • Rendered inside a sandboxed <iframe> alongside recipient, subject, and attachment details.
  3. Pipeline Update & Confirmation:
    • Optional checkbox: Mark lead status as Proposal Sent after sending (updates non-WON leads to PROPOSAL_SENT).
    • Clicking Send Email opens an inline confirmation summary before dispatching via POST /api/v1/leads/{id}/emails and logging a LEAD activity entry.

3. Sent Emails History

Every dispatched email is persisted in lead_emails (V90__create_lead_emails_table.sql) and listed in the lead drawer’s Sent Emails section (GET /api/v1/leads/{id}/emails):

  • Shows subject, recipient address, timestamp, sending staff member, and attachment badge/size.
  • Attachments are downloaded via short-lived Cloudflare R2 presigned URLs (GET /api/v1/leads/{id}/emails/{emailId}/attachment).
Last updated on