Grievance Redress
Contact Centres

Triage complaints by urgency with LLM processing

Workflow purpose

This guide demonstrates how to use Proto's AI agent to read each complaint as it comes in and decide how urgent it is – before it joins the queue.

An LLM Processing step labels the complaint urgent, high or normal against rules you write. Urgent complaints – fraud in progress, a person cut off from their money or an essential service, a vulnerable person, a threat to safety – go straight to a live agent, with a ticket as the fallback when nobody is online. Everything else becomes a ticket with its urgency recorded in a custom field and tags, so your team can work the queue in the right order.

A complaint about a fee and a complaint about money leaving an account right now should never wait in the same line. This workflow adds that judgement to complaints intake without asking the person to rate their own urgency.

Who can benefit from this guide:

  • Regulators and ombudsman schemes receiving high complaint volumes
  • Banks, mobile money and fintech providers handling fraud and access complaints
  • Telecom operators where a disconnection can cut people off from essential services
  • Health services and government agencies with duty-of-care obligations
  • Grievance-redress units that need a defensible, consistent triage rule

Triage complaints by urgency

This workflow classifies each complaint, routes urgent ones to a live agent at once and records the urgency on every ticket. See how to build a complaint triage workflow.

Just starting with the platform?
For initial setup of your AI agent – including workspace setup, agent training, and channel deployment – please start here. This workflow guide assumes your AI agent is set up and ready for more advanced configurations.

1. Create a trigger

Start the flow when a complaint sounds like it can’t wait, and give your intake workflow somewhere to send every complaint for triage.

  • 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 Triage”) and add a short description (e.g. “Triggers if user reports money leaving their account right now, being locked out of their account or an essential service, or being at risk of harm.”).
  • Add training phrases (e.g. “Someone is taking money from my account”, “My account has been blocked and I can’t pay for anything”, “My electricity has been cut off”, “I’m being threatened by a debt collector”).

2. Connect intake and collect the complaint

Make sure every complaint passes through triage, however it arrives.

Most complaints reach this workflow from complaints intake. In the intake’s Confirm sub-trigger, replace the Create ticket action with a Set variable action – Variable name: full_name, Chat script: first_name + " " + last_name – and a Jump action pointing to Step 3 of this workflow. The person’s email, phone and complaint_description are already set, so triage starts straight away.

People who open the chat with an urgent message trigger this workflow directly and haven’t given those details yet. For them, add an Ask survey action. Action title: Urgent complaint details

Field Variable Type Invalid reply
What is happening? complaint_description Text Please tell us what is happening in a few words
Your full name full_name Text Please enter your full name
A phone number we can reach you on phone Phone Please enter a valid phone number
Your email address email Email Please enter a valid email address

Keep Enable skip off – a ticket needs a name and email if no live agent is online. Ask only what a live agent needs to start; the person can give the rest once someone has joined. On a signed-in Webchat, take the email from {_customer.email} instead of asking.

3. Classify urgency with LLM processing

Let the LLM apply your triage rules the same way every time.

Add an LLM Processing action. Action title: Classify urgency

  • Input: {complaint_description}
  • Model: your preferred model
  • Temperature: 0, so the same complaint always gets the same label
  • System Prompt: your triage rules, and a strict output format, e.g.

“You triage consumer complaints. Reply only with JSON: {"urgency": "urgent" | "high" | "normal", "reason": "one sentence"}. urgent: fraud or unauthorised payments happening now or in the last 24 hours; the person can’t access their money, account or an essential service such as power, water, phone or medicine; the person is elderly, unwell, a child or otherwise vulnerable and at risk; any threat to safety, harassment or self-harm. high: a financial loss that has already happened, a deadline within 7 days, or a repeated failure the provider has not fixed. normal: everything else, such as fees, service quality or delays. If unsure between two levels, choose the more urgent one. Never add any other text.”

  • Use Knowledge info to provide more context: off – triage should follow your rules, not your help articles
  • Resulting variable: triage_result

Under the Success branch, add a Set variable action – Variable name: triage_result, Chat script: _.json_parse(triage_result). Then a second Set variable – Variable name: urgency, Chat script: _.lower(triage_result["urgency"]).

4. Add guard rails

An unexpected answer should never make a complaint less urgent.

Under the Error and Timed out branches of the LLM Processing action, add a Set variable action – Variable name: urgency, Chat script: "high" – so a failed call still reaches your team quickly.

After Step 3, add a Branch action:

  • If urgency not in ["urgent", "high", "normal"]: Set variable with Variable name urgency and Chat script "high".

Keep the label internal. Never tell the person their complaint is “not urgent” or “normal priority” – a person who feels dismissed is more likely to complain again, or about you. Every confirmation message in Steps 6 and 7 is worded the same way, whatever the label.

Store the reason too – a Set variable with Variable name urgency_reason and Chat script triage_result["reason"] – so a live agent can see why the AI agent chose the label and correct it if needed.

5. Set up the urgency field and tags

Record the label where your team can sort, filter and report on it.

Navigate to Settings › Custom fields, open Conversation fields and click Create new field:

  • Type: Single select (grouped)
  • Name: Urgency
  • Description: How quickly the complaint needs a response
  • Field options: one group with Urgent, High and Normal

Then add three tags, urgent, high-priority and normal-priority, for the Inbox and your reports.

6. Send urgent complaints to a live agent

Put a person on the case while the harm is still happening.

Add a Branch action with the condition urgency == "urgent". Under it, add a Send message:

“Thank you for telling us. I’m connecting you with a member of our team now.”

If your rules include threats to safety, add a Send message before the handoff with your emergency number, so nobody waits on a chat for help they need from the police or an ambulance.

Then add a Live agent handoff action assigned to your urgent complaints team, with Live agent availability check turned on. The live agent sees the full chat in the Inbox, including the complaint and urgency_reason, and can correct the Urgency field in the side panel if the AI agent got it wrong.

Under the branch If there is no live agent online, add a Create ticket action:

  • Assignee: your urgent complaints team
  • Subject: Urgent complaint – {full_name}
  • Description: {complaint_description} followed by Triage reason: {urgency_reason}
  • Full name, Email and Phone number: the variables collected earlier
  • Auto-apply tags: complaint, urgent
  • Custom fields: Urgency set to Urgent

Then a Send message:

“Our team isn’t online right now, so I’ve logged your complaint as {_new_ticket.short_id} and passed it straight to them. They will contact you on {phone} as soon as they’re back. If your bank card or account is being used without your permission, call your provider’s 24-hour line to block it now.”

Adapt the last sentence to your sector – the point is to tell the person what they can do themselves while they wait.

7. Log high and normal complaints

Give every other complaint a ticket in the right place in the queue.

Under Else if urgency == "high" and Else, add a Create ticket action as in Step 6, assigned to your complaints team, with Auto-apply tags complaint and high-priority or normal-priority, and Urgency set to High or Normal.

After each, add the same Send message for both labels:

“Thank you, {full_name}. Your complaint has been logged as {_new_ticket.short_id}. A member of our team will be in touch at {email}.”

8. Keep urgent tickets moving

Make sure urgent tickets logged out of hours are the first thing your team sees.

Overdue rules (Settings › Tickets › Overdue rules) apply one timeframe, in days, to every ticket – there is no separate rule per urgency. Set them for your normal service standard, and handle urgent tickets through the queue itself:

  • In the Inbox, click Create view and add a view named Urgent complaints with the conditions Tags is urgent and Status is open. Pin it for the urgent team, so it’s the first list they open each morning.
  • Assign urgent tickets only to the urgent team, so they never sit behind routine complaints in a shared queue.
  • Use Assign ticket to teams in the overdue rule as a backstop, moving any ticket that passes your standard to a supervisors’ team.

Review a sample of labels each week. If live agents keep changing High to Urgent for a type of complaint, add it to the system prompt in Step 3.

9. Test the flow

Validate every path before going live using the AI agent tester side panel.

  • Test “Money is leaving my account right now” and confirm it’s labelled urgent and handed to a live agent.
  • Test a fee complaint and confirm it’s labelled normal, gets a ticket with Urgency set and the confirmation never mentions priority.
  • Test the urgent path with no live agent online and confirm a ticket is created with the urgent tag and the person is told what to do while they wait.
  • Change the system prompt so it returns a word outside the three labels, and confirm the complaint is treated as high.
  • 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.