How Operator qualifies incoming leads, asks dynamic intake questions, and calculates lead scores.
Qualification flows (qualification_flows) allow businesses to define structured criteria that the AI must gather before confirming high-value bookings.
Configured under Flows (/flows), a qualification flow consists of questions evaluated sequentially during the conversation.
The database schema supports four answer types (answerTypeEnum):
- text: Free-form responses (e.g., *"What symptoms are you experiencing?"*).
- single_select: Single choice from pre-defined options (e.g., *"New Patient"* vs *"Returning Patient"*).
- multi_select: Multiple choices (e.g., *"Select preferred days: Monday, Wednesday, Friday"*).
- number: Numeric inputs (e.g., *"What is your estimated property budget?"*).
Questions can be marked isRequired: true. The AI receptionist will politely insist on collecting required answers before confirming an appointment.
The scoring service (src/server/services/scoring.ts) evaluates every completed turn and updates lead_scores:
| Dimension | Points Weight | Evaluation Criteria |
|---|---|---|
| Contact Completeness | 25 points | Full name, verified phone number, valid email address provided. |
| Qualification Answers | 35 points | Percentage of qualification flow questions successfully answered. |
| Intent Clarity | 20 points | Explicit request for a bookable service or quote vs vague inquiry. |
| Urgency & Timeline | 20 points | Immediate booking date requested (e.g., today/tomorrow vs no date). |
Leads with a score >= 70 are highlighted with a High Priority badge in the Leads CRM (/leads).
All customer data is aggregated in lead_profiles:
- Contact details (name, email, phone, company).
- Captured qualification answers in lead_answers.
- Booking history and attendance record (completed vs no-show).
- Total lifetime conversation summaries generated by the background summarization engine.