All work

AI front desk for clinics

RingDesk

Dental practice, United States

A US dental practice was losing calls when its front desk was closed or busy. It had already proved, with a set of deployment scripts, that a voice agent could check a calendar and book a slot. What it lacked was a product: something a clinic could sign up for, configure without touching an API, and trust with patient calls. We built RingDesk, a multi-tenant web app in which each clinic onboards in four steps, connects its Cal.com calendar and gets a provisioned phone number answered by a voice agent. Mid-call, the agent checks real availability, books confirmed appointments, takes messages and directs emergencies to 911 and the clinic's emergency line. Every call lands in a dashboard with its transcript, outcome and any booking, and urgent messages trigger an email alert to staff. The working product was built in five days of active development, from scaffold to live phone number.

ringdesk
Dental practice, United States

At a glance

Client
A dental practice in the United States (after-hours phone coverage)
Problem
Calls outside front-desk hours went unanswered, and an earlier scripted voice-agent setup could not be configured or monitored by clinic staff
Solution
A multi-tenant web app that provisions a voice agent and phone number per clinic, books into Cal.com, takes and escalates messages, and logs every call
Timeline
Five days of active development, from scaffold to a live phone number
Engineering
28 commits, 5 database migrations, 3 signed agent-tool endpoints, 2 verified webhooks
Stack
Next.js 16TypeScriptPostgres (Neon)Drizzle ORMBetter AuthRetell AICal.com APIResend

The challenge

Clinics get a large share of booking and "please call me back" calls when nobody is at the desk. The practice's proof of concept showed the idea worked, but every change meant re-running scripts, there was no record staff could review, and nothing scaled past one clinic.

No self-service setup

Clinic name, hours, emergency number and the agent's persona were baked into scripts, not editable by staff.

Bookings had to be real

The agent could only offer genuinely free times, and failures had to come back as something it could say, not a stack trace.

Emergencies are not appointments

A caller describing a medical emergency must be sent to 911 immediately, never routed into scheduling.

Staff need visibility

Every call, transcript, booking and message needed to be visible the next morning, with urgent items first.

Secrets and public callbacks

The app holds each clinic's calendar key and receives calls from two providers over the internet, so storage and inbound requests both had to be secured.

Prompt drift

When a clinic changes its hours or greeting, the live phone agent has to pick that up without a manual redeploy.

Our approach

We treated the existing scripts as the specification and rebuilt them as a product, one layer at a time: auth and multi-tenancy first (a clinic is an organisation), then onboarding and settings, the calendar service layer, the call log, appointments and messages, and finally the voice agent wired to the app's own endpoints. Every layer returns typed results rather than throwing, because the final consumer is a voice agent mid-conversation that always needs a sentence to say.

What we built

1

Multi-tenant clinic accounts and onboarding

  • Email/password and Google sign-in, with every clinic its own tenant, created on signup with the user as owner.
  • A four-step onboarding wizard: clinic profile and timezone, front-desk hours per weekday, emergency contact, agent persona.
  • Every dashboard query is scoped to the signed-in clinic, and all clinic data is removed with the clinic.
2

Voice agent provisioning and live prompt sync

  • One click creates the clinic's voice agent and buys a phone number bound to it for inbound calls.
  • The system prompt is generated from clinic settings: tone, hours, tools, booking rules, "never give medical advice" and an explicit emergency section.
  • Saving settings re-pushes the prompt, greeting and tools to the live agent, with sync status and errors shown on the Integrations page.
3

Mid-call tools: availability, booking, messages

  • Three signed endpoints the agent calls during a conversation: check availability, book appointment and take message.
  • Availability follows what the caller actually said ("tomorrow", "Tuesday", "the 19th", "morning"); the date parser is deliberately strict so a vague phrase never becomes the wrong date.
  • Slots are spoken in the clinic's timezone ("Tuesday August 19th at 2:30 PM"), with up to three options.
  • Every failure returns a reason the agent can voice, such as asking for a callback number or offering to take a message.
4

Calendar integration

  • Clinics paste a Cal.com API key; it is validated, encrypted and stored with the chosen event type.
  • Typed outcomes (not connected, no availability, invalid slot, booking rejected, calendar unavailable) for the voice layer to translate.
  • A booking webhook keeps created, cancelled and rescheduled appointments in sync with the dashboard.
5

Call lifecycle and outcome tracking

  • Call started, ended and analysed events store caller number, duration, transcript, caller name and reason.
  • Every event is an upsert on the provider's call id, so out-of-order events never lose data.
  • Outcomes (booked, message, emergency, abandoned) are never overwritten by the end-of-call default once set mid-call.
6

Staff dashboard

  • Call log with outcome filters and a per-call page with the full transcript.
  • Upcoming and past appointments in the clinic's timezone, with live status badges.
  • A messages inbox with urgent items pinned, each linked to its transcript, plus an email alert that never holds up a live call.

Security and operations

  • Each clinic's calendar API key is encrypted at rest with AES-256-GCM and never leaves the server.
  • Voice-provider webhooks and all agent-tool endpoints verify an HMAC-SHA256 signature over the raw body, with a five-minute window and constant-time comparison.
  • Calendar webhooks are signature-verified when a secret is configured.
  • Logs are written to avoid secrets; provider errors are extracted and capped rather than dumped.
  • The agent prompt forbids medical advice and booking emergencies, and requires reading back name, date, time and email before booking.

Results

A product, not a script

Clinic staff sign up, set hours and persona, connect a calendar and get a live number without touching an API.

Real bookings from phone calls

The agent offers only times the calendar reports as free and creates confirmed bookings that appear in the dashboard.

Safer emergency handling

Emergency instructions are part of every generated prompt, and emergency callers are steered to 911 and the clinic line.

Next-morning visibility

Every call is logged with transcript and outcome, and urgent messages reach staff by email as well as the dashboard.

Key takeaways

  1. 1

    Design tool responses for speech. Typed, sentence-ready results from every integration let the voice agent recover gracefully instead of going silent.

  2. 2

    Assume webhooks arrive out of order. Upserting on the call id and never overwriting a set outcome kept records correct whatever order events came in.

  3. 3

    Turn a proof of concept into a product. Moving every hard-coded value into per-clinic settings, with automatic re-sync, is what made it usable by clinic staff.

Have a process like this?

Tell us what is costing your team the most time. We will show you how we would scope it, build it and get it into production.