Check complaint status through AI chat

Workflow purpose
This guide demonstrates how to use Proto's AI agent to let a person check the status of a complaint or support ticket – submitted, in review, awaiting their reply, resolved or closed – without waiting for a live agent.
The workflow asks for the case reference and a matching contact detail, looks the case up in your case management system, then replies with a status message written for each stage. Overdue cases and anyone who asks for more help are handed to a live agent with the case details already attached.
"Where is my complaint?" is one of the most frequent follow-ups after any intake channel goes live, which makes it a strong second automation after complaints intake.
Who can benefit from this guide:
- Customer support teams answering repeated status enquiries
- Regulators and grievance-redress units tracking complaints against regulated entities
- Government agencies handling citizen service requests
- Hospitals and health plans managing patient complaints and requests
- Any organisation that issues a reference number when a case is logged
Check complaint status
This workflow verifies the person, looks up their case and returns its current status 24/7 on web and messaging channels. See how to build a complaint status workflow.
1. Create a trigger
Start the flow when a person asks about an existing complaint or ticket.
- 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. “Complaint Status”) and add a short description (e.g. “Triggers if user asks about the status or progress of a complaint, case or ticket they have already submitted.”).
- Add training phrases (e.g. “Check my complaint”, “What’s the status of my ticket”, “Any update on my case”, “Where is my complaint”). The description and phrases help the AI tell a status check apart from a new complaint.
2. Send an opening message
Set expectations before asking for any details.
Add a Send message action:
“I can check the progress of your complaint. I’ll need your reference number and the email address you used when you submitted it.”
3. Collect the case reference and a contact detail
Ask for two details, so only the person who submitted the case can see its status.
Add an Ask survey action. Action title: Case lookup
| Field | Variable | Type | Invalid reply |
|---|---|---|---|
| Reference number | case_reference |
Text | Please enter the reference number from your confirmation email |
email |
Please provide a valid email address |
Make sure Enable skip is off for both fields. If the complaint was logged through Proto, the reference appears in the subject line of the confirmation email, e.g. [Ticket #A1B2C3].
On channels where the person is already known – a signed-in Webchat or a WhatsApp number linked to their customer profile – you can take the email from the {_customer.email} system variable instead of asking for it.
4. Look up the case
Fetch the live status from the system that holds your cases.
Add a Send API action:
- HTTP method: GET
- URL endpoint: your case management system’s lookup endpoint, passing
case_referenceandemail - Headers: the authorisation key your system requires
- Resulting variable:
case_lookup
If your cases are held in a database rather than behind an API, use a SQL Query action – available on Enterprise plans – against a connection set up in Database Connections. The query is read-only and never takes variables directly – use bind parameters instead, e.g. SELECT status, updated_at, team FROM complaints WHERE ref = $1 AND email = $2 on PostgreSQL, then set Bind parameters $1 to {case_reference} and $2 to {email}. On MySQL, use %(ref)s and %(email)s in place of $1 and $2.
Both Send API and SQL Query branch into Success, Error and Timed out, so the not-found and error handling in Step 6 can sit under those branches.
Then add a Set variable action to store the values the next steps need: case_status, last_updated and assigned_team.
5. Reply based on status
Give the person a message that fits the stage their case is at, not a raw status code.
Add a Branch action with one condition per status:
| Condition | Send message |
|---|---|
case_status == "open" |
“Your complaint {case_reference} is with our {assigned_team} team and is being reviewed. Last update: {last_updated}.” |
case_status == "pending" |
“Your complaint {case_reference} is waiting for information from you. Please reply to the email we sent to {email} so we can continue.” |
case_status == "resolved" |
“Good news – your complaint {case_reference} has been resolved. Details have been sent to {email}.” |
case_status == "closed" |
“Your complaint {case_reference} is closed. If the issue continues, I can help you log a new complaint.” |
case_status == "overdue" |
Continues to Step 7 |
After each status message, add a Send message with quick reply options: That’s all | Speak to an agent. Under a Message received sub-trigger for Speak to an agent (training phrases: speak to an agent, talk to someone, I need help), add a Jump action pointing to Step 7.
6. Handle a case that isn’t found
Stop people getting stuck when a reference or email doesn’t match.
Under the Else branch, add a Send message:
“I couldn’t find a complaint with that reference and email. Please check both and try again.”
Then add a Jump action back to Step 3. To avoid a loop, use a Set variable action to count attempts and a Branch to send the person to Step 7 after a second failed lookup.
7. Hand over to a live agent
Route overdue cases and anyone who asks for more help to your team, with the case already identified.
Add a Live agent handoff action, assigned to the team responsible for complaints. Turn on Live agent availability check, so you can tell the person when to expect a reply if no live agent is online. Before the handoff, add a Send message:
“I’ve passed your complaint {case_reference} to our team. A live agent will join this chat shortly.”
The live agent sees the full chat in the Inbox, including the reference, email and status the AI agent found, so the person doesn’t have to repeat themselves. Live agents can tag these chats in the Inbox (e.g. status-enquiry) to track how many status checks need a live agent.
8. Test the flow
Validate every path before going live using the AI agent tester side panel.
- Test one case for each status and check the right message and variables appear.
- Test a valid reference with the wrong email and confirm no case details are shown.
- Test an invalid reference twice and confirm the second failure reaches a live agent.
- Test Speak to an agent from a resolved case and confirm the handoff carries the reference.
- Build and test in an undeployed version – Duplicate the live version first – then Deploy it once every path passes.
Finalise the AI agent deployment by configuring your preferred channels and languages.
.png)