Skip to main content

How a support team triages tickets and handles refunds with Windmill

Urgent tickets can get lost in the queue.

Tickets arrive in several channels, and a support agent often reads them one by one, looks up the customer in several tools and waits for a manager to validate each refund. Here, one Windmill tool classifies each ticket, drafts a reply and gets large refunds approved, and the team works from one app.

The tool​

This example is an internal tool for a support team and its manager, built in one Windmill workspace from five pieces: a triage flow, an AI agent, a refund flow, a data pipeline and an app. The data: tickets (channel, customer, category, urgency, status), orders and refunds (amount, reason, approver).

Each piece below comes with the prompt to build it in your own workspace. The whole project is on the Windmill Hub, with a recorded run of each piece, ready to add to your workspace: Support ticket triage on the Hub.

A flow triages each new ticket​

Each new ticket starts a flow, from the support tool's webhook or by email. An AI decision step classifies it (bug, billing or question) and scores its urgency, then a branch routes it on the answer.

Read more: AI decision steps.

Prompt

In the folder f/support, create a flow ticket_triage that starts on a webhook from the support tool and on an email trigger. An AI decision step returns the category (bug, billing or question) and the urgency (can wait, this week, today, right now), and a branch routes the ticket on the category.

An AI agent looks up the customer and drafts a reply​

An AI agent step reads the ticket, finds the customer and their orders with its tools, which are Windmill scripts, and drafts a reply. It sends nothing on its own: the draft waits for a support agent to review it.

Read more: AI agents.

Prompt

Add an AI agent step that reads the ticket, finds the customer and their orders with two script tools (get_customer by email and get_orders by customer id), and returns a draft reply for a support agent to review. It never sends the reply itself.

Refunds over the threshold wait for a manager​

A refund flow branches on the amount: under 200 €, the refund goes through; above, an approval step waits for a manager. The flow then updates the order and replies to the customer.

Read more: Approval steps.

Prompt

Create a flow refund that takes an order and an amount: under 200 €, it records the refund; above, an approval step waits for a manager first. Then it updates the order and sends the reply to the customer.

A data pipeline aggregates the tickets every night​

Every night, a schedule runs a pipeline that aggregates the day's tickets: volume by category, time to first response and refunds.

Read more: Data pipelines.

Prompt

Build a data pipeline that runs every night and aggregates the day's tickets into a daily_ticket_stats table: tickets by category, average time to first response and refunds.

The team works from one app​

A full-code app shows the queue sorted by urgency, the draft reply to review on each ticket, the refunds waiting for approval and the response times.

Read more: Full-code apps.

Prompt

Build a full-code app with the ticket queue sorted by urgency, the draft reply to review and send on each ticket, the refunds waiting for approval with an Approve button, and yesterday's response times by category.

A day with the tool​

  • 140 tickets arrive during the day. Each one is classified, and 6 are marked as urgent.
  • A support agent opens the app: urgent tickets on top, each with a draft reply to review.
  • A 40 € refund goes through on its own. A 600 € refund waits for the manager.
  • The manager approves it from the app. The order is updated and the customer gets the reply.
  • The next morning, the app shows the previous day's response times by category.