CRM & Lead Pipeline
The CRM is how Royal Glow understands and nurtures every relationship — both the customers it already has and the prospects (“leads”) that come in from Meta and Instagram ads. One side is about knowing your regulars; the other is about converting cold ad traffic into paying customers.Lead vs customer. A lead is a prospect captured from a Meta/Instagram ad
via the
/book page — no slot, no sign-in. A customer books through the
homepage dialog (organic, GMB, in-store QR) or as a receptionist walk-in. The
two live in different tables (lead vs booking).What it is
Two connected things:- Customer management — a rich profile for each customer: contact details, visit history, tags, staff notes, and lifetime value (LTV).
- Lead pipeline — a kanban board that tracks ad-sourced prospects from first contact to a booked, paying customer.
How it works — customer profiles
Each customer has a profile that staff use to give a personal, informed service:- Identity — name, phone, email, gender, “member since” date.
- Tags — short labels for segmentation. Some are assigned automatically
(e.g.
vip,loyal,spa_lover,dormant); others are added manually by staff (e.g.bridal,corporate). - Notes — free-text notes staff add after visits (e.g. “allergic to ammonia”).
- KPIs — visits, lifetime value (total spend), average spend, no-show count, and gems balance.
How it works — the Meta-ad lead pipeline
This is the paid-acquisition funnel, designed for maximum conversion from cold ad traffic:/book page is deliberately minimal — no navigation, no sign-in prompt,
trust signals (4.9★, reviews, city) above a 3-field form, and a “Continue to
Booking” button. It exists only for ad traffic; the homepage, GMB, Google Maps,
and in-store QR all use /?book=1 instead so attribution stays clean.
If a lead submits the form but never completes a booking, a background job
flags it as stale after 48 hours and the receptionist follows up by phone or
WhatsApp from
admin.theroyalglow.in/leads.Lead status pipeline
A lead moves through a fixed set of statuses:
A lead automatically becomes
won when its linked booking is completed. Marking
a lead lost requires a reason.
Rules
How are phone numbers stored?
How are phone numbers stored?
Phone numbers are normalised to canonical
+91XXXXXXXXXX before storage, so the
same number is never duplicated under two formats.Is the public lead form protected?
Is the public lead form protected?
Yes.
POST /api/leads is the only unauthenticated write endpoint and is
rate-limited per IP to prevent abuse.How does WhatsApp follow-up stay in sync?
How does WhatsApp follow-up stay in sync?
Lead conversations are handled through AiSensy. When a status changes there, a
webhook updates Neon so the database stays the single source of truth.
What source do admin-created leads get?
What source do admin-created leads get?
Leads created from inside the admin portal are forced to
source = manual
(versus meta_ad for ad traffic).Related links
Leads API
Public lead capture plus the admin pipeline (list, detail, status, notes).
Customers & CRM API
Customer directory, profiles, notes, and tags.
Booking System
How a lead’s booking links back for attribution.
Data Model
The lead, lead_note, customer_tag, and customer_note tables.