Grievance Redress

Route complaints to the right regulator by mandate

Workflow purpose

This guide demonstrates how to use Proto's AI agent to check whether a complaint falls within your regulator's mandate and, if it doesn't, transfer it to the regulator that can handle it.

The workflow reads the person's description, uses an LLM to match it against each regulator's mandate, and explains the result in plain language. Complaints within your mandate continue to intake. Others are handed to the right regulator's AI agent through Proto's AI Agent Network, with the details already collected, so the person never has to start again.

People rarely know which regulator covers which sector, and complaints sent to the wrong place are often closed without redress. This workflow suits shared consumer protection platforms where several regulators sit behind one front door.

Who can benefit from this guide:

  • Regulators sharing a consumer complaints platform
  • Ombudsman schemes and consumer protection agencies
  • Government contact centres serving several agencies
  • Grievance-redress units that receive out-of-mandate complaints

Route complaints by mandate

This workflow classifies each complaint by mandate and routes it to the right regulator with full context. See how to build a mandate routing 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 person wants to make a complaint.

  • 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 Routing”) and add a short description (e.g. “Triggers if user wants to make a complaint about a company, service provider or institution.”).
  • Add training phrases (e.g. “I want to make a complaint”, “My bank won’t refund me”, “My internet provider overcharged me”, “I have a problem with my insurer”).

2. Collect the complaint description

Ask the person what happened and who it’s about, in their own words.

Add an Ask survey action. Action title: Complaint summary

Field Variable Type Invalid reply
Which company or provider is your complaint about? provider_name Text Please enter the name of the company or provider
Please describe what happened complaint_description Text Please describe your complaint

Keep Enable skip off for both fields.

3. Match the complaint to a mandate

Use an LLM to decide which regulator the complaint belongs to.

Add an LLM Processing action:

  • Model: your preferred model
  • System Prompt: list each regulator and the sectors and providers it covers, then ask for a JSON reply, e.g. “You route consumer complaints. Mandates: Communications regulator – telecoms, internet, broadcasting, postal. Financial regulator – banks, insurers, pension funds, microlenders. Energy regulator – electricity and fuel. Reply only with JSON: {"regulator": "communications" | "financial" | "energy" | "unclear", "reason": "one sentence"}.”
  • Input: {provider_name} – {complaint_description}
  • Temperature: low (e.g. 0), so the same complaint is always routed the same way
  • Resulting variable: mandate_result

Then add a Set variable action – Variable: mandate_result, Chat script: _.json_parse(mandate_result).

4. Explain the result and confirm

Tell the person where their complaint belongs before moving it.

Add a Branch action:

  • If mandate_result["regulator"] == "communications" (your own mandate): Send message – “This falls within our mandate, so we can take your complaint.” Then a Jump action to your complaints intake trigger.
  • Else if mandate_result["regulator"] == "unclear": Send message asking for more detail, then a Jump action back to Step 2.
  • Else: Send message – “Complaints about {provider_name} are handled by the {mandate_result[“regulator”]} regulator. {mandate_result[“reason”]} I can transfer you now with the details you’ve shared.“ Add quick reply options: Transfer me | No thanks.

5. Hand over to the right regulator

Transfer the conversation, with everything already collected, to the receiving regulator’s AI agent.

Under a Message received sub-trigger for Transfer me, add a Branch with one condition per regulator. Under each, add an AI agent handoff action and select that regulator’s AI agent from your AI Agent Network. Handoffs work on Webchat, full-screen Webchat, WhatsApp and Messenger.

The receiving AI agent can read what was collected through {_transferred_context.provider_name} and {_transferred_context.complaint_description}, so its intake can skip questions already answered.

Before each handoff, add a Send message:

“I’m transferring you to the {mandate_result[“regulator”]} regulator with the details you’ve shared, so they can pick up from here.“

6. Handle a failed transfer

Make sure the person always leaves with a way forward.

Under the handoff’s When external AI agent transfer failed branch, add a Send message with the receiving regulator’s contact details, then a Create ticket action assigned to your complaints team, so someone can follow up.

7. Test the flow

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

  • Test a complaint for each regulator and check the LLM picks the right one.
  • Test a vague complaint and confirm the agent asks for more detail.
  • Test No thanks and confirm the person is given the other regulator’s contact details.
  • Confirm the receiving AI agent sees the transferred details.
  • 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.