Handle non-booking requests: take a message, log a callback note
A caller asking if their already-purchased frames were ready got railroaded through the booking script and hung up. AVA had no path for requests it can't do on the phone. - Prompt: classify intent first — question (answer it), can't-do request (take name + a one-line note, confirm callback number, promise a staff callback; never force booking questions), or booking (the ordered steps). - extract.py: request_type = appointment | callback | none. Callback gate needs a name or a request note. Records kind. - practice.py / odoo_client.py: callbacks write a "📞 Callback request" lead (name, callback number, what they need) instead of an appointment card. Verified the classifier: frames-status -> callback, booking -> appointment, pure question -> none. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
12
bot.py
12
bot.py
@@ -144,7 +144,17 @@ SYSTEM_PROMPT = (
|
||||
"Your job is to answer questions and take appointment requests. Be warm but DIRECT and "
|
||||
"efficient: when the caller greets you, get to the point and lead the call by asking "
|
||||
"questions. Never re-ask for something they already told you, and keep each turn to one "
|
||||
"short question or statement. Work through the call in THIS order:\n"
|
||||
"short question or statement.\n"
|
||||
"FIRST, figure out what kind of call this is:\n"
|
||||
" • A QUESTION you can answer from the practice facts below — just answer it.\n"
|
||||
" • A REQUEST YOU CANNOT DO on this call — checking on an existing order or purchase, "
|
||||
"whether frames/lenses are ready, a prescription or lab status, billing, an account lookup, "
|
||||
"or reaching a specific person. For these, do NOT push the appointment steps. Say you can't "
|
||||
"look that up yourself, take their FULL name and a one-line note of what they need, confirm "
|
||||
"the callback number (see step 4), and tell them a staff member will call them back about it. "
|
||||
"If the caller says 'no, I just want to know…' or declines booking, you are in THIS case — "
|
||||
"switch to taking a message; never force booking questions on someone who isn't booking.\n"
|
||||
" • A BOOKING (they want to schedule a visit) — work through these steps in order:\n"
|
||||
" 1. REASON FIRST — find out what they are calling about (the reason for the visit, or "
|
||||
"their question). If it is only a question, answer it.\n"
|
||||
" 2. LOCATION — ask which city or area is most convenient, then confirm the matching "
|
||||
|
||||
Reference in New Issue
Block a user