Skip to content
← All articles

How I built a live AI receptionist for a dental clinic on Retell

By Muhammad Umer Khan
Published

I built an AI receptionist that answers the phone for a dental clinic, an international client, and it is live on Retell AI. It works out what the caller needs, takes their details, books an open slot in Cal.com, creates the lead and the deal in HubSpot and tells the team. The integrations were not the hard part. The setup was, then keeping the agent's working context right through a call, and most of all the prompt.

What it does on a call

  • A patient calls the clinic, and the agent answers.
  • It works out what they need and takes their details.
  • It checks the open slots in Cal.com through a function call, and offers them.
  • It books the slot the patient picks.
  • It creates the lead and the deal in HubSpot.
  • It tells the team a new lead has landed.

Where Retell fits

Retell carries the call itself: the phone line, the speech-to-text, the voice and the turn-taking. Everything the agent knows and does is mine to build: the prompt, the functions it can call, and the webhooks that write to Cal.com and HubSpot.

The setup was the slowest part

Before the first real call, several systems have to agree with each other: the phone number, the agent, the Cal.com event the clinic books into, the HubSpot pipeline the deal lands in, and the webhooks between them. Each piece is simple on its own. Getting all of them to line up, and to fail loudly when one doesn't, is where the time went.

Working context: what the agent knows at each moment

A phone agent only knows what is in front of it on this turn: its prompt, what the caller has said so far, and what its functions returned. When something is missing, such as the clinic's hours, today's date or a detail the caller gave two minutes ago, the agent fills the gap, and it does so confidently. So the context has to be built on purpose.

  • Availability only ever comes from a function call. The agent never says a slot is free unless Cal.com said so on this call.
  • Time comes from the platform, in the clinic's own time zone. Retell gives the agent the current time as a variable, but it defaults to America/Los_Angeles, so an agent for a clinic anywhere else has to ask for its own zone, or "tomorrow at ten" lands on the wrong day.
  • Details the caller has confirmed are read back once, then treated as settled, so the agent doesn't ask for them again.

Prompt engineering was most of the work

What I noticed most on this build was how much of the agent's behaviour lives in the prompt. A good phone prompt is not a good chat prompt. People can't scroll back on a call, and every extra sentence is something they have to hold in their head.

  • One question at a time, in short sentences.
  • Say exactly when each function should run. Retell's own docs recommend writing that into the prompt instead of leaving the model to decide.
  • Confirm before acting: the agent repeats the day, the time and the name, and books only after a yes.
  • Write down what happens when a tool says no, so a taken slot or a slow calendar becomes a sentence the caller hears, not a pause.

Traps to plan for in any booking agent

These are the problems that catch most phone booking agents, whatever the platform. None of them is hard to handle once it is in the plan.

  • Names, emails and phone numbers are easy to mishear. Have the agent read them back, letter by letter where it matters.
  • Relative dates such as "next Friday" mean nothing without today's date in the right time zone.
  • A slot can be taken between the offer and the booking. Check again at the moment of booking, and keep a second slot ready.
  • Callers interrupt and wander. Short turns let the agent recover and steer back to the one thing it needs next.
  • Some questions belong with a person: prices, treatment advice, insurance. The agent should take the details and hand over, not guess.
  • Functions fail. A webhook that times out has to turn into something the caller hears, not silence on the line.

Source: Retell dynamic variables (opens in a new tab)Retell custom functions (opens in a new tab)

I build these for startups. AI voice agents

Free 30-minute build audit

Get in touch to start building yours.

Bring the idea or the workflow. In 30 minutes you get what I would build first and how I would prove it works. NDA before the first call.

calls 2pm to 11pm PKT · reply within 24h · WhatsApp +92 343 2187868