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.
Canvas
Section titled “Canvas”This workflow has two parts. The first answers the agent quickly; the second follows the complaint through.
Complaint intake (answers the agent)
- 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. - Mask PII: fields
input.phone, mask as last4, for Logs only, so the run view does not show the full number. - MCP tool: your helpdesk, tool
create_ticket, inputs frominput.*. Store result asticket. Retries 3. - Sub-workflow: workflow Complaint follow-through, inputs
ticketId = ticket.idplus the input fields, Wait for it off. - End: outcome
logged, outputticketId = 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)
- 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. - Decision (rules): outcomes
billing_desk,service_desk,customer_care. Rules:input.category == "billing"→billing_deskinput.category == "service"→service_desk- default →
customer_care
- On each outcome, an Escalation for that team: reason
Ticket {{ input.ticketId }}: {{ input.summary }}, priority high, SLA4h. - MCP tool: your helpdesk, tool
update_ticket,status = "resolved". - Audit checkpoint: evidence name
complaint_resolved, evidenceticketId = input.ticketId,category = input.category. - 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.
Trigger payload
Section titled “Trigger payload”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.”
What each step does
Section titled “What each step does”- 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.
Test it
Section titled “Test it”- 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.
- Complain as a customer. The agent calls the intake workflow and gives you a ticket number from your sandbox helpdesk.
- 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.
Variations
Section titled “Variations”- 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.