Skip to content

Complaint escalation

When a customer complains to your support agent, open a ticket in your helpdesk, give the customer the ticket number in the same conversation, and make sure serious complaints reach the right team within their deadline, with a supervisor stepping in when it is missed.

This workflow has two parts. The first answers the agent quickly; the second follows the complaint through.

Complaint intake (answers the agent)

  1. Started by an agent: agents that may start it: your support agent. Input fields customerName, phone (phone), category (choice: billing, service, staff, other), severity (choice: low, medium, high), summary (text, required). The agent: On completion, response timeout 20s.
  2. Mask PII: fields input.phone, mask as last4, for Logs only, so the run view does not show the full number.
  3. MCP tool: your helpdesk, tool create_ticket, inputs from input.*. Store result as ticket. Retries 3.
  4. Sub-workflow: workflow Complaint follow-through, inputs ticketId = ticket.id plus the input fields, Wait for it off.
  5. End: outcome logged, output ticketId = ticket.id.

On the MCP tool’s On error port: an Error handler that escalates to Support team leads and ends with outcome ticket_failed. The agent then hears that the ticket could not be opened and can apologise and offer a call-back.

Complaint follow-through (runs in the background)

  1. The sub-workflow’s start: an API / webhook trigger with the same input fields plus ticketId. Your helpdesk can also start it through the Workflows API (beta) for complaints from other sources.
  2. Decision (rules): outcomes billing_desk, service_desk, customer_care. Rules:
    • input.category == "billing" → billing_desk
    • input.category == "service" → service_desk
    • default → customer_care
  3. On each outcome, an Escalation for that team: reason Ticket {{ input.ticketId }}: {{ input.summary }}, priority high, SLA 4h.
  4. MCP tool: your helpdesk, tool update_ticket, status = "resolved".
  5. Audit checkpoint: evidence name complaint_resolved, evidence ticketId = input.ticketId, category = input.category.
  6. End: outcome resolved.

On each Escalation’s On error port (SLA passed): an Escalation for Support supervisors with priority urgent and SLA 2h, then back to step 4.

The agent sends these as the tool’s arguments:

{
"customerName": "Farhan",
"phone": "+919800000000",
"category": "billing",
"severity": "high",
"summary": "Charged twice for the November plan and no refund after two calls."
}

The agent gets back something like: outcome logged, result {"ticketId": "TCK-88213"}, and tells the customer “Your complaint is logged as TCK-88213.”

  • Started by an agent turns the workflow into a tool the support agent can call. Its description and input labels tell the model when and how to use it.
  • Mask PII keeps the phone number out of the run view while steps still use it.
  • The intake ends as soon as the ticket exists, so the agent answers within seconds. The Sub-workflow with Wait for it off carries on in the background.
  • The Decision routes by category. The Escalation steps open cases in Workflows → Tasks and wait until someone marks them done.
  • When a team misses its SLA, the error path brings in a supervisor with a shorter deadline.
  • The Audit checkpoint records when and how the complaint was closed.
  1. Put the support agent and both workflows in a use case and open Test use case. Choose Drafts for the workflows the agents start, and Hours as seconds.
  2. Complain as a customer. The agent calls the intake workflow and gives you a ticket number from your sandbox helpdesk.
  3. The follow-through run appears. Let the SLA pass to see the supervisor escalation, then complete it.

You can also test each workflow alone with Test workflow, entering the arguments above as input.

  • Severity first: add a Condition input.severity == "high" before the Decision to send high-severity complaints straight to supervisors.
  • Hand the chat to a person (beta): in a conversation-led workflow, a Human agent step hands the live chat to your live agent platform. See Live agent handoff. Test it end to end in the test window first.
  • Customer updates: have your helpdesk notify the customer when it changes the ticket status, or use Status update (beta) and read it through the API.