Clinics and real estate
Two industry connectors, each with a template flow. Install them from Console, Admin, Integrations; credentials are sealed with the company's key and never shown again.
Clinics: Doctoralia
Connector doctoralia (category healthcare). The AI agent gets three tools, int_doctoralia_find_slots, int_doctoralia_book and int_doctoralia_cancel, and the template flow pbx/crates/flows/templates/clinic-reception.json (menu, AI booking agent, reception queue, voicemail; every branch ends at reception). The agent template clinic already carries the emergency and no_medical_advice prompt guardrails; the desk below enforces the same rules in code.
| Setting | Meaning | Default |
|---|---|---|
domain | country site: doctoralia.com.mx, .com.br, .com.ar, .cl, .com.co, .pe, .es, .it | required |
facility_id, doctor_id, address_id | the agenda that is booked | required |
service_id | visit type booked | the default visit |
timezone | IANA zone of the clinic | America/Mexico_City |
max_days_ahead / min_notice_minutes | booking horizon and shortest notice | 60 days / 60 minutes |
max_per_phone_day | bookings one number may make per day | 3 |
country_code | completes national numbers to E.164 | 52 |
escalate_to | extension or queue the agent hands the call to | none |
Secrets: client_id and client_secret of the Docplanner integration application.
Guardrails (clinic::guard, clinic::desk):
- Text that sounds like an emergency (chest pain, cannot breathe, overdose, bleeding, unconscious, suicide and the like in Spanish, English and Portuguese) is refused with
escalate: trueandescalate_to; the agent hands the call to staff. A request for a diagnosis, prescription, dose or test result is refused withreason: medical_advice. - The visit reason and note are screened and never sent to Doctoralia; only name and phone leave the PBX.
- A slot is booked only if the platform still offers it right before the write; a 409 is the same answer.
- Notice and horizon are enforced; one number may book
max_per_phone_daytimes a day. - Cancel needs the phone number the booking was made with (last ten digits compared); three wrong numbers lock the booking and escalate.
The desk talks to the clinic::provider::BookingProvider trait, so another booking system implements the same four calls.
Real estate: Inmuebles24
Connector inmuebles24 (category realestate), template flow real-estate-leads.json, tool int_inmuebles24_listing (price, size, rooms, neighborhood; no owner data). Create a hook endpoint for the connector (see integration-hooks.md, shared_secret scheme) and give its address to the portal.
Each lead post (id, posting, contact, message) is handled once (realestate::desk::LeadDesk):
- The phone is normalised to E.164 (legacy Mexican
044/045/+521forms included); a post without a usable number is only answered. - A reply goes to the lead at once, in
es,enorptor from the administrator'sreply_template({name},{title},{url},{when}). - A callback by the AI agent is queued
callback_delay_minuteslater, moved into the office hours (open,close,days,timezone; nothing starts in the last ten minutes). Numbers on the do-not-call list are never called, and a second lead from the same number about the same listing is answered but not called again. - If a step fails the inbox retries the post and only the missing step runs. The prospect's message reaches the agent only inside a fenced brief marked as data.
State is in memory until a later release. No migration, no new table.
Leads page
Admin > Settings > Integrations > Leads (/admin/integration-leads, needs integrations:read) lists the newest real-estate leads with the state of the reply and of the callback, the reason a callback was skipped (no usable number, number on the do-not-call list, already called back for the listing, no time left in office hours) and totals over all leads kept for 180 days. The page is read only and shows no name, message or phone number, because none is stored. A lead with a step missing is tried again when the portal resends it, or you can retry it in the delivery log of the hook endpoints.