Lead-quality gate: require a name or location, not just a reason
A call produced a near-empty lead (name=None, location=None, only reason="check on my eyes"). Changed the extraction gate from "name OR reason" to "name OR location" — a bare reason with no name and no office isn't an actionable worklist card, so skip it. Verified: reason-only -> skip; name-only, location- only, both -> keep. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -86,6 +86,9 @@ Trade-off: half-duplex — the caller can't barge in mid-utterance (fine for sho
|
||||
**Post-call extraction (`extract.py`)** — single JSON-mode completion after call ends.
|
||||
Correctly uses `format: json`, uses verified Twilio caller-ID instead of trusting model
|
||||
output, falls back to JSONL if Odoo is unreachable. Keep it.
|
||||
**Lead-quality gate:** a lead is only written if a NAME or a LOCATION was captured — a bare
|
||||
reason (e.g. "check on my eyes") with no name and no office is skipped (not worth a worklist
|
||||
card). Captures full name, phone (confirmed/alternate), insurance, reason, and resolved date.
|
||||
|
||||
**Odoo integration (`odoo_client.py`)** — already uses `ODOO_API_KEY` for XML-RPC auth,
|
||||
not password. Correct pattern. No changes.
|
||||
|
||||
Reference in New Issue
Block a user