Classify complaints automatically with auto fill field
Workflow purpose
This guide demonstrates how to use Proto's AI agent to classify complaints from what the person says, instead of making them pick from long category menus.
You set up single-select custom fields – such as Product, Complaint category and Channel of harm – with the options your team already reports on. After the person describes their complaint, the Auto fill field action reads the conversation and fills each field with the best-matching option. The workflow then uses those values to ask follow-up questions that fit the complaint, and writes them into the ticket so every case can be filtered and counted.
People describe problems in their own words, rarely in your categories. Classifying for them gives cleaner data, shorter chats and complaint statistics you can report to a board or regulator without recoding cases by hand.
Who can benefit from this guide:
- Regulators that report complaint volumes by product and category
- Banks, mobile money providers and insurers tracking complaint root causes
- Telecom operators classifying service and billing complaints
- Government agencies sorting citizen complaints by service and office
- Complaints managers who spend time recoding miscategorised cases
Classify complaints automatically
This workflow fills complaint categories from the conversation and uses them to route, follow up and report. See how to build a complaint classification workflow.
1. Create a trigger
Start the flow when a person wants to complain about a product or service.
- 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 Classification”) and add a short description (e.g. “Triggers if user wants to complain about a product, payment, charge, service or the way they were treated.”).
- Add training phrases (e.g. “I want to complain about my loan”, “I was charged a fee I didn’t agree to”, “The agent took my money and didn’t deposit it”, “My transfer never arrived”).
If you already run complaints intake, use this workflow in its place for the description step, then collect contact details as intake does.
2. Set up the custom fields
Define the categories once, with descriptions the AI can follow.
Navigate to Settings › Custom fields, open Conversation fields and click Create new field. Auto fill field only fills fields of type Single select (grouped), so choose that type for each:
| Name | Field options (grouped) |
|---|---|
| Product | Payments – Mobile money, Card, Bank transfer; Credit – Loan, Overdraft; Accounts – Savings, Current account; Insurance – Life, Health |
| Complaint category | Unauthorised transaction, Fees and charges, Service failure, Mis-selling, Staff or agent conduct, Data and privacy, Other |
| Channel of harm | Branch, Agent, Mobile app, Website, Phone call, Text message |
Fill in the Description for each field and each option. The AI reads them when it classifies, so a description such as Mis-selling: the person was sold a product that didn’t suit them, or wasn’t told its costs or risks makes the difference between two options clear. Use the same option names as your existing reports, so the counts line up.
3. Ask what happened
Get a description rich enough to classify.
Add a Send message action:
“Please tell me what happened – which product or service it was, how it happened and what went wrong. Write it the way you’d explain it to a friend.”
Then add an Ask survey action. Action title: Complaint description
| Field | Variable | Type | Invalid reply |
|---|---|---|---|
| What happened? | complaint_description |
Text | Please describe your complaint in a few sentences |
Keep Enable skip off.
4. Fill the fields with auto fill field
Let the AI read the conversation and choose an option for each field.
Add an Auto fill field action. Action title: Classify complaint
- Select fields: Product, Complaint category and Channel of harm, from the Conversation group
- Variable name:
complaint_fill
Auto fill field reads the last 15 messages of the conversation, chooses one option per field and saves it on the conversation, where live agents see it in the Inbox side panel. If nothing in the chat matches a field, that field is left empty. Place the action straight after the description, while it’s within those 15 messages.
The action has two branches: Success and Error. Under Error, continue to Step 5’s fallback questions, so a failure never stops the complaint.
5. Read the result and fill the gaps
Check which fields were filled, and ask only about the ones that weren’t.
The result variable is keyed by field name. Each filled field holds its new value’s name and id, e.g. complaint_fill["Complaint category"]["new_value"]["name"]. A field the AI couldn’t fill isn’t in the variable at all.
Add a Branch action:
- If
"Complaint category" not in complaint_fill: Send message – “Which of these is closest to your complaint?” with quick replies for each category, then a Set variable with Variable namecategoryand Chat script_user_input. - Else: Set variable with Variable name
categoryand Chat scriptcomplaint_fill["Complaint category"]["new_value"]["name"].
Repeat for Product if your follow-up questions depend on it. Don’t ask the person about Channel of harm – an empty value there is fine for reporting.
To make the Branch safe on the Error path, add a Set variable before Step 4 with Variable name complaint_fill and Chat script _.json_parse("{}").
6. Ask follow-up questions for each category
Use the classification to ask what each type of complaint actually needs.
Add a Branch action on category:
| Condition | Follow-up |
|---|---|
category == "Unauthorised transaction" |
Ask survey for the transaction date (txn_date, Text), amount (txn_amount, Number) and reference (txn_ref, Text, Enable skip on). Then a Jump to your urgency triage workflow – money taken without permission may still be at risk. |
category == "Fees and charges" |
Ask survey for the amount charged (fee_charged, Number) and the amount they expected (fee_expected, Number, Enable skip on). |
category == "Staff or agent conduct" |
Ask survey for the branch or agent location (location, Text) and the agent’s name or number, if known (agent_id, Text, Enable skip on). |
category == "Data and privacy" |
Send message explaining your data protection contact, then an Ask survey for what data was involved (data_involved, Text). |
| Else | Continue to Step 7. |
People answer two or three relevant questions instead of a long form written for every possible complaint.
7. Write the categories into the ticket
Carry the classification onto the ticket your team works from.
Collect the person’s contact details as in complaints intake, Step 3. Then add a Create ticket action:
- Assignee: your complaints team
- Subject: Complaint – {category}
- Description:
{complaint_description}and the follow-up answers from Step 6 - Full name, Email and Phone number: the contact variables
- Auto-apply tags: complaint
- Custom fields: Product, Complaint category and Channel of harm, each set to a variable – the option’s
id, e.g.complaint_fill["Product"]["new_value"]["id"]
Single-select fields store the option’s ID, not its name, so use id here and name in messages. A field the AI left empty stays empty on the ticket rather than taking a wrong value. If you used the fallback question in Step 5, set Complaint category with a fixed value under each quick reply instead.
8. Filter and report by category
Use the fields to see where complaints come from.
- In the Inbox, click Create view and add views with conditions on a custom field, e.g. Complaint category is Unauthorised transaction, so each specialist team sees its own queue.
- In Analytics, use Segment by on a breakdown chart to split conversations by a custom field, or filter a report to one category or product.
- Live agents can correct a field in the Inbox side panel. Check a sample of corrections each month and sharpen the option descriptions where the AI keeps choosing wrongly.
9. Choose between auto fill field and LLM processing
Both use AI to read a complaint. Pick the one that fits the job.
| Use Auto fill field when | Use LLM Processing when |
|---|---|
| The answer is one option from a fixed list | The answer is free text, a summary or a judgement |
| You want the value saved on the conversation for reporting | You want a value only inside the flow |
| The facts are spread across the last 15 messages | You want to control exactly what the model reads, through its Input |
| You want no prompt to write – field and option descriptions do the work | You need your own rules, a JSON reply or knowledge base context |
For example, classify the product and category with Auto fill field, and use LLM Processing to summarise complaints for investigators.
10. Test the flow
Validate every path before going live using the AI agent tester side panel.
- Describe an unauthorised mobile money payment and confirm all three fields fill, the right follow-up questions are asked and the flow jumps to triage.
- Describe a vague problem (“it’s not working”) and confirm the category quick replies appear.
- Check the ticket in the Inbox and confirm the custom fields show the same options the chat chose.
- Test two complaints that sit close together, such as mis-selling and fees, and refine the option descriptions until they’re told apart.
- Build and test in an undeployed version (Duplicate the live version), then Deploy when every path passes.
Finalise the AI agent deployment by configuring your preferred channels and languages.
.png)