Handle medical bill enquiries through AI chat
Workflow purpose
This guide demonstrates how to use Proto's AI agent to answer the questions patients ask most about their hospital bills – what they owe, what each charge is for, and why their health plan didn't cover all of it – without waiting on the billing office phone line.
The workflow verifies the patient, looks up their bills in your hospital billing system and explains each line item in plain words, using your price list and charge codes as the source. It shows what the health plan paid and what is left for the patient, sends an itemised invoice as a document and hands over a secure payment link from your payment provider. Requests for a payment plan and disputed charges go to the billing team as tickets, and anyone who says they can't afford their bill is offered a person straight away.
The AI agent never changes an amount, promises a discount or takes payment inside the chat – your billing system stays the only source of what is owed.
Who can benefit from this guide:
- Hospital and clinic billing offices
- Patient financial services and revenue cycle teams
- Private hospital groups with high volumes of self-pay patients
- Health plans and HMOs explaining member cost-sharing
- Patient experience teams reducing billing complaints
Medical bill enquiries
This workflow explains hospital bills line by line, shows what the health plan covered and sends a payment link 24/7. See how to build a medical bill enquiry workflow.
1. Create a trigger
Start the flow when a patient asks about a bill, a charge or what they owe.
- Navigate to the Workflows tab in the AI agent settings.
- Click New workflow and select Message received as the Workflow type.
- Name the trigger (e.g. “Medical Bill Enquiry”) and add a short description (e.g. “Triggers if user asks about a hospital bill, an invoice, a charge they don’t understand, how much they owe or how to pay a medical bill.”).
- Add training phrases (e.g. “I got a bill from the hospital”, “What is this charge for?”, “How much do I owe?”, “Why didn’t my insurance pay for this?”, “Can I get an itemised bill?”).
Questions about whether a treatment will be covered before it happens belong to your health plan eligibility flow – add them to the description as things this trigger should not match.
2. Verify the patient
Bills show diagnoses, procedures and medicines, so confirm who is asking before anything is shown.
Add a Send message action:
“I can help with your hospital bill. First, I need to check a few details.”
Add an Ask survey action. Action title: Patient verification
| Field | Variable | Type | Invalid reply |
|---|---|---|---|
| Patient number or bill number | bill_ref |
Text | Please enter the patient number from your hospital card, or the bill number at the top of your bill |
| Date of birth (DD/MM/YYYY) | date_of_birth |
Text | Please enter your date of birth as DD/MM/YYYY |
Keep Enable skip off for both fields. Then add a Send API action:
- HTTP method: POST
- URL endpoint: your hospital billing system’s patient verification endpoint
- Headers: the authorisation key your system requires
- Body:
bill_refanddate_of_birth - Resulting variable:
patient
Under Success, add a Branch: if patient["verified"] == true, store patient["id"] and patient["first_name"] with a Set variable action and continue. Under Else, say the details don’t match and Jump back to the survey, counting attempts with a Set variable action. After a second failure, give the billing office’s phone number and opening hours. Under Error and Timed out, do the same – never show a bill you couldn’t verify.
3. Find the bill
Show only open or recently settled bills.
Add a Send API action:
- HTTP method: GET
- URL endpoint: your billing system’s bills endpoint, passing
{patient["id"]}and a filter for open bills and those paid in the last 90 days - Resulting variable:
bills
Add a Set variable action – Variable: bill_count, Chat script: _.len(bills) – then a Branch action:
| Condition | What happens |
|---|---|
bill_count == 0 |
Send message: “I can’t find any open bills for you. Bills can take up to 10 working days to appear after a visit.” Offer Ask the billing team as a quick reply, which leads to Step 8. |
bill_count == 1 |
Store bills[0] in bill with a Set variable action and continue to Step 4. |
| Else | Show carousel with one card per bill (up to 10): title {bills[0]["visit_date"]} – {bills[0]["department"]}, description Balance {bills[0]["patient_balance"]}, button Send Message “View this bill”. |
4. Explain the line items
Turn charge codes into words a patient understands, using your own price list as the only source.
Load your price list and charge code descriptions into the AI agent’s Knowledge tab › Knowledge base – Upload file for a CSV or PDF export, or Add URL for a published price transparency page. Check that Large language model is on under Personalization on the Agent tab.
Add a Send API action (HTTP method: GET) to your billing system’s line items endpoint, passing {bill["id"]}, with the resulting variable lines. Then add an LLM Processing action:
- Input:
{lines} - Model: your preferred model
- Temperature: 0
- System prompt: “You explain hospital bill line items to patients. For each line, give the charge code, a plain-language description of one sentence taken from the knowledge provided, and the amount exactly as given. Never change, round or total any amount. Never say whether a charge was correct or medically necessary. If a code is not in the knowledge, write ‘Ask the billing team about this charge’. Use short sentences and no medical jargon.”
- Use Knowledge info to provide more context: on
- Resulting variable:
explained
Add a Send message action:
“Here’s what’s on your bill from {bill[“visit_date”]}:
{explained}“
Totals and balances always come from the API response, never from the LLM output – the model only describes what each charge is.
5. Show what the health plan covered
Most billing questions are really about the gap between the total and what the patient owes.
Your billing system holds the claim outcome against each bill. Add a Branch on bill["claim_status"]:
| Condition | Send message |
|---|---|
bill["claim_status"] == "paid" |
“Total charges: {bill[“total”]}. Your health plan, {bill[“plan_name”]}, paid {bill[“plan_paid”]}. Your share is {bill[“patient_balance”]} – this is made up of your co-payment and any items your plan doesn’t cover.“ |
bill["claim_status"] == "pending" |
“We’ve sent this bill to {bill[“plan_name”]} and are waiting for their decision. You don’t need to pay anything yet – your balance may go down once they reply.“ |
bill["claim_status"] == "denied" |
“{bill[“plan_name”]} declined this claim. The reason they gave is: {bill[“denial_reason”]}. You can ask us to review it or contact your health plan.“ |
| Else | “This bill wasn’t sent to a health plan, so the full amount of {bill[“patient_balance”]} is yours to pay.“ |
Under denied, add quick replies: Ask for a review | Pay my balance. A review request goes to Step 8. If your AI agent also serves health plan members, point people who want to check their cover before their next visit to the health plan eligibility flow with a Jump.
6. Send the itemised invoice
Give the patient a document they can keep, claim against or share with a family member.
Add a Send message with quick replies: Send itemised invoice | Pay my balance | Question about a charge | I can’t afford this.
Under Send itemised invoice, add a Send API action (HTTP method: GET) to your billing system’s invoice endpoint, passing {bill["id"]}, with the resulting variable invoice. Then add a Send attachment action. File format: Document. Source: Chat script, e.g. invoice["url"]. Follow it with a Send message:
“Here’s your itemised invoice, number {invoice[“number”]}. Most health plans accept it for claims you make yourself.“
7. Send a payment link
Payment always happens on your payment provider’s page – never inside the chat.
Under Pay my balance, follow the same pattern as the fines and fees payment guide: a Send API POST to your payment provider with {bill["id"]} only, so the amount comes from your billing system and can’t be changed in the chat, a Show carousel card with an Open Link button to the checkout page, and a status check when the patient taps I’ve paid.
Two differences matter for hospital bills:
- If
bill["claim_status"] == "pending", add a Branch before the payment request that asks Pay now or wait for your health plan’s decision? – paying early often leads to refunds. - Allow part payments if your billing system does. Add an Ask survey Number field, How much would you like to pay?, and send that amount in the request body for your billing system to check against the balance.
8. Log payment plans and disputed charges
Requests the AI agent can’t settle go to the billing team with everything they need.
Under Question about a charge and Ask for a review, add an Ask survey action. Action title: Billing request
| Field | Variable | Type | Invalid reply |
|---|---|---|---|
| Which charge are you asking about, and why? | dispute_details |
Text | Please describe the charge and what you think is wrong |
| Supporting documents (optional) | dispute_files |
Attachment | Please upload a photo or PDF |
Turn Enable skip on for the attachment. For a payment plan, ask instead How much could you pay each month? as a Number field, stored in plan_amount.
Add a Create ticket action:
- Assignee: your billing team
- Subject: Billing review – {bill[“number”]}
- Description: the bill number,
dispute_detailsorplan_amount, and the claim status - Full name and Email: from the verified record
- Attachment(s):
dispute_files - Auto-apply tags: billing, dispute or payment-plan
Then add a Send message:
“Thank you, {patient[“first_name”]}. Your request has been sent to our billing team – your reference is {_new_ticket.short_id}. We’ll put this bill on hold while we look into it and email you with an answer.“ Make sure your billing system pauses reminders for bills with an open dispute. The billing team replies from the ticket in the Inbox, and the teamspace’s overdue rule under Settings › Tickets › Overdue rules applies to every ticket.
9. Offer a person for financial hardship
Someone who can’t afford their care needs a conversation, not a form.
Under I can’t afford this, and whenever a patient mentions losing their job, debt or going without medicine to pay, add a Live agent handoff action assigned to your patient financial services team, with Live agent availability check on. Add the same rule to the Agent persona on the AI agent’s Agent tab, so it applies anywhere in the conversation.
Before the handoff, add a Send message:
“Thank you for telling me. I’m connecting you to someone in our financial support team who can talk through your options, including payment plans and any assistance programmes you may qualify for.”
Under If there is no live agent online, create a ticket as in Step 8, tagged hardship, and tell the patient no action will be taken on the bill while the team reviews it.
10. Test the flow
Validate every path before going live using the AI agent tester side panel.
- Enter a wrong date of birth twice and confirm no bill details are shown.
- Open a bill with a charge code missing from your price list and check the reply says to ask the billing team rather than guessing.
- Try a bill with a denied claim and one with a pending claim, and check the cover message and the pay-now prompt.
- Say “I lost my job and can’t pay this” and confirm the handoff, then repeat with no live agents online to check the hardship ticket.
- Build and test in an undeployed version – Duplicate the live version on the Workflows tab – then Deploy when every path passes.
Finalise the AI agent deployment by configuring your preferred channels and languages.
.png)