Chat with us
Up to 60% OFF with Recurring Discounts on Premium Upgrades & Whitelabel FlexUp to 60% OFF on Premium Upgrade & Whitelabel00:00:00:00Claim
Knowledgebase/WhatsApp AI Agent Configuration/Article

How To Build WhatsApp AI Agents for A Dental Clinic

  • 7 Oct 2026
  • 10 min read
  • 0 views
TL;DR:

⚡ Quick Answer

Chatbot Manager→Bots/Accounts→select your WhatsApp bot→AI→Agents→Create Agent

Create one agent per job. In this guide a dental clinic uses a dental support agent (answers about treatment, price, cost, doctor) and an appointment agent (answers about appointment or booking, schedule). Give each agent a name, a description, and a system prompt, and attach a knowledge source such as a Google Sheet with your product data.

Create the labels and custom fields the agents will use before you save them. Then open AI Configuration, turn on AI Agent, select both agents under Active Agents, add Agent Routing rules, click Save Settings, and test from a different WhatsApp number.

Before You Begin

✓An active BotSailor account with a connected and active WhatsApp bot.
✓The labels and custom fields your agents will use must already exist. If they do not, data will fail to save and the AI Agent will not work properly.
✓A knowledge source with your clinic data: treatments, approximate prices, duration, and clinic hours.

What Is a Multi-Agent AI Setup for a Dental Clinic?

A BotSailor AI Agent is a specialized assistant. It follows a system prompt, uses the business knowledge you attach, and takes actions such as adding a label, saving a custom field, transferring the chat to another agent, or assigning it to a human team. Instead of one agent doing everything, you create separate agents for separate jobs and let BotSailor route each conversation to the right one.

This guide uses a demo-clinic WhatsApp as the working example. The same steps apply to any clinic; only the prompts and the knowledge source change.

AgentPrimary Responsibility
dental support agentAnswers questions about treatments, prices, duration, and clinic hours from the knowledge source. Never diagnoses, never gives medical advice, and never guesses when data is missing.
appointment agentTakes over when the patient wants to book: collects the treatment needed, patient type, preferred date and time, name, and email, then sends a booking-request summary and hands the chat to your front-desk team to confirm the slot.

📌 Important

Creating an agent does not make it available to patients. After the agents are created, you must turn on AI Agent in AI Configuration and select them under Active Agents (Part 5).

1

Prepare Labels and Custom Fields

Your system prompt acts as a guide to the agents. To write the system prompt properly, you must add labels and custom fields to save patient's information. So, create these first.

1

Create Labels

Dashboard→Subscriber Manager→Manage→Labels→Create New Label

For this example, create two labels:

  • Dental Inquiry — applied when a patient starts a relevant conversation.
  • Appointment Requested — applied when the booking request is complete.
2

Create Custom Fields

Open Manage → Custom Fields and create a field for any or each piece of information the agents will save:

  • Treatment Interest
  • Patient Type
  • Preferred Date and Time
  • Patient Name
  • Email

💡 Tip

When you write a prompt, type ## and choose the action and the resource from the pop-up list instead of typing IDs by hand. BotSailor stores the ID of the label or custom field for you.

2

Open the AI Agents Section

Go to Dashboard → Chatbot Manager → Bots/Accounts, select the WhatsApp bot that will run the AI Agents (here, SmileCare Dental Clinic), then open:

AI→Agents→Create Agent
3

Create the First Agent (Dental Support Agent)

1

Fill In the Agent Details and Write the System Prompt

On the Create Agent form:

  • Name: dental support agent (the Slug is generated automatically).
  • Status: Active.
  • Description: answer patients' questions about treatments, prices, and clinic hours based on your knowledge base.

In System Prompt, tell the agent its role, what to answer, what to check before replying, and which action to run in which situation. Click the i button beside System Prompt to see what each command does.

You are the front-desk support agent of SmileCare Dental Clinic. You have to answer patients' questions about dental treatments, prices, treatment duration, and clinic hours. Before answering, you must cross-check your reply with your knowledge base. If there is no data, do not give vague or guessed answers; tell the patient that our team will confirm. Before answering for the first time, greet them with 'hi or hello'. Never diagnose a condition, suggest medication, or give medical advice.

##add_label##: 460652 when a relevant question is asked and a relevant conversation begins.

##save_custom_field##: 77264 when the patient mentions the treatment or problem they need help with.

##follow_up##: when a requested treatment or price is not in the knowledge base and tells the patient that we will get back to them.

##assign_human_role##: if the patient reports severe pain, swelling, bleeding, or an injury; tell them to contact the clinic directly right away and hand over the chat to the human team.

##transfer_agent##: when the patient wants to book an appointment.

The numbers after some actions are the IDs of the label or custom field in this demo account. Yours will differ; select them from the ## pop-up.

Action in the PromptWhat It Does
##add_label##Adds the Dental Inquiry label when a relevant conversation begins.
##save_custom_field##Saves the treatment or problem the patient mentions into Treatment Interest.
##follow_up##Sets up a follow-up when a requested treatment or price is not available.
##assign_human_role##Hands the chat to your human team for urgent cases such as severe pain, swelling, bleeding, or injury.
##transfer_agent##Hands the chat to the appointment agent when the patient wants to book.
Create Agent form for the dental support agent, with its name, slug, status, description, and full system prompt.

Create Agent form for the dental support agent, with its name, slug, status, description, and full system prompt.

2

Add the Knowledge Source

The system prompt controls behavior; the knowledge source supplies the facts. Scroll down to Knowledge Sources, open the Knowledge Set drop-down, choose Create New (or Select Existing to reuse a set), name it (here, dental_clinic_services), choose Google Sheet as the content type, then select the integrated sheet and the tab that holds your data. It then appears under Attached Knowledge. If your sheet is not integrated yet, follow How to Integrate Google Sheet with BotSailor for Data Fetch Campaign first.

Keep the sheet clean: one treatment per row and a header in the first row. Example columns (sample data only; replace it with your clinic's real treatments and prices):

IDCategoryTreatmentWhat It IncludesApprox. Price (BDT)Duration
1PreventiveTeeth Cleaning (Scaling & Polishing)Removes plaque and tartar build-up৳1,500 - ৳2,50030-45 min
2RestorativeTooth Filling (Composite)Tooth-colored filling for a cavity৳1,200 - ৳3,000 per tooth30-60 min
3CosmeticTeeth WhiteningIn-clinic whitening session৳8,000 - ৳15,00060 min

Add rows for clinic hours, address, and the policies you want the agent to quote, so it never has to guess. Finally, click Save Agent.

4

Create the Second Agent (Appointment Agent)

Go back to Agents and click Create Agent again.

1

Fill In the Agent Details and Write the System Prompt

  • Name: appointment agent (slug: appointment-agent).
  • Status: Active.
  • Description: help patients request a dental appointment.
You are the appointment agent of SmileCare Dental Clinic. You help patients request a dental appointment. Ask one question at a time.

##ask_information##: the treatment they need, whether they are a new or returning patient, their preferred date and time, their full name, and their email.

##save_custom_field##: 77264 Patient Type, Preferred Date and Time, Patient Name, and Email as the patient answers.

##add_label##: 460653 after all details are collected. Then thank them and give a summary like a booking note mentioning their name, treatment, patient type, and preferred date and time, and tell them our team will confirm the final slot shortly. Never confirm a slot yourself.

##assign_human_role##: after sending the summary so the team can confirm, and also if the patient wants to talk to a person before booking.

##transfer_agent##: if the patient wants to ask about treatments or prices again.
Action in the PromptWhat It Does
##ask_information##Collects the booking details from the patient, one question at a time.
##save_custom_field##Saves the treatment, patient type, preferred date and time, name, and email.
##add_label##Adds the Appointment Requested label once the request is complete.
##assign_human_role##Hands the chat to your front-desk team to confirm the slot, or earlier if the patient asks for a person.
##transfer_agent##Sends the patient back to the dental support agent for more treatment or price questions.
Create Agent form for the appointment agent, with its description and full system prompt.

Create Agent form for the appointment agent, with its description and full system prompt.

2

Save the Agent

Click Save Agent. Both agents are now created, but neither is live yet.

Note

In this setup the agent collects the appointment request; it does not read a live calendar. Your team confirms the final slot.

5

Activate AI Agents & Configure Agent Routing

1

Turn On AI and Select the Active Agents

Go to Chatbot Manager → Bots/Accounts → select your bot → AI and open the AI Configuration tab.

  • Turn on the AI Agent switch.
  • Select both agents (dental support agent and appointment agent) in the Active Agents box.
2

Add Agent Routing Rules

Click Add Rule and fill in Message type / when to use this agent (the keywords) and Assign agent. Add as many keywords as you need and keep them distinct for each agent.

Message Type / When to Use This AgentAssign Agent
treatment / price / cost / doctor / timingdental support agent
appointment / book / booking / scheduleappointment agent
AI Configuration: AI Agent switched on, both agents under Active Agents, and the two Agent Routing rules.

AI Configuration: AI Agent switched on, both agents under Active Agents, and the two Agent Routing rules.

3

Choose the AI Response Mode

Keep AI Agent for All Queries on so the AI responds to every incoming message. In AI as a Fallback Only mode, bot flows and keywords run first and the AI answers only when nothing matches.

4

Set Context & Memory

Turn on Enable Contextual Memory so the agents remember earlier messages, and choose a Memory Window. A larger window results in higher AI token consumption.

5

Configure Assignment

Turn on Assign to Team or Department, select a Team / Department (required), and write the Assignment Message the patient sees when a chat is handed to your team. Example: "Your conversation has been assigned to our front-desk team. We will get back to you shortly."

6

Review Misc. Settings and Save

Do Not Assign Agent in Business Off Hour and Enable Typing Indicator are optional. Scroll down and click Save Settings.

✓

Verification: Test the AI Agents on WhatsApp

From a different WhatsApp number, message the bot's number. Ask about a treatment, then say you want to book, and watch how each agent responds.

The dental support agent answers the price question from the Google Sheet. Once the patient wants to book, the appointment agent collects the details, sends the summary, and hands the chat to your team. The name and email in this test are sample data.

Shared inbox (part 1): the dental support agent answering a price question, then transferring to the appointment agent after a booking request.

Shared inbox: the dental support agent answers, then transfers to the appointment agent after a booking request.

Shared inbox (part 2): the appointment agent collecting the patient's name and email, then sending the booking summary.

Shared inbox, continued: the appointment agent collects the patient's details and sends the booking summary.

To confirm, open the Shared Inbox and check the chat history to see where the agents switched. Open Subscriber Manager to confirm that the expected labels and custom-field values were saved for the test subscriber.

!

Common Troubleshooting

The AI Agent does not reply at all

Creating an agent does not activate it. Open AI Configuration, make sure the AI Agent switch is on, and confirm both agents appear under Active Agents. Click Save Settings afterward.

The wrong agent answers, or routing does not match

Review Agent Routing. Keep each rule's keywords distinct so two agents do not compete for the same message, and use the words your patients actually type.

The agent gives no treatment information or wrong prices

Confirm the Google Sheet is attached under Knowledge Sources, the correct tab is selected, and the sheet has column headers and current data. If the knowledge source and the system prompt disagree, the system prompt takes priority.

The agent forgets details the patient already gave

Turn on Enable Contextual Memory and increase the Memory Window. A larger window uses more AI tokens.

Next Steps

Once the two agents work, you can add more specialists (for example, a lead qualification agent for new patient inquiries), restrict topics the AI should not discuss, and set business hours for human handoff.

Zihad Jony

Zihad Jony

Team
FAQ

Frequently Asked Questions

Find answers to common questions about this topic

The system prompt uses actions such as adding a label and saving a custom field. If those resources do not exist, data cannot be saved and the agent may not work properly.

Agent Routing rules match keywords in the customer’s message to an agent. After that, agents can pass the chat to another active agent with the transfer action when the topic changes.

Use the assign-to-human action in the prompt and turn on Assign to Team or Department in AI Configuration, with a team selected and an assignment message. Human assignment can follow your configured business hours, while AI agents can keep replying.

The system prompt defines the agent’s role, behavior, and actions. The knowledge source supplies business facts such as products, prices, and policies. If they conflict, the system prompt takes priority.

Go to Chatbot Manager > Bots/Accounts, select your bot, open AI > Agents, and click Create Agent. Add a name, description, and system prompt, attach a knowledge source if needed, and click Save Agent. Then enable the agent in AI Configuration.