All case studies

Case study 05 / E-commerce / Online Retail

AI Ticket Routing & SLA Escalation for E-commerce

AI classification, P1–P4 prioritization, and three levels of SLA escalation for HouseBox.

Customer support
n8nOpenAIGoogle Sheets

Context

HouseBox is an e-commerce case focused on automating customer support operations. The project covers incoming inquiries about orders, deliveries, payments, returns, and product information.

Problem

Incoming customer emails needed to be reviewed, categorized, prioritized, and assigned to the appropriate team members.

Handling these steps manually could delay responses to urgent requests, while tracking SLA deadlines separately made it harder to identify and escalate overdue tickets.

The goal was to automate ticket routing and establish a consistent SLA monitoring and escalation process.

Solution

Built an AI-powered ticket management workflow in n8n that automatically processes incoming customer emails.

OpenAI classifies each request, assigns a priority from P1 to P4, selects the responsible team member, and generates a ticket summary with classification reasoning. Valid tickets are logged in Google Sheets, while spam is filtered out.

A separate SLA monitoring workflow checks open tickets and automatically triggers one of three escalation levels through Telegram or email when a deadline is breached.

Process

  1. Ingest customer email: An IMAP trigger receives incoming messages. n8n collects the message ID, sender, subject, body and creation time into the ticket context.
  2. Classify and filter: OpenAI returns structured classification data: category, P1–P4 priority, responsible owner, summary and reasoning. A separate check filters out spam before ticket logging.
  3. Route and log: Valid requests are assigned to the responsible team member according to the classification. Ticket details and SLA deadlines are recorded in Google Sheets, and the owner is notified through Telegram.
  4. Monitor SLA deadlines: A separate scheduled workflow runs every five minutes, reads open tickets from Google Sheets and checks for breached SLA deadlines.
  5. Escalate overdue tickets: The workflow computes an escalation level and routes notifications: L0 reminds the owner through Telegram, L1 notifies the team lead through Telegram, and L2 emails the director through Gmail.
  6. Verify scenarios: Testing logged 10 tickets and exercised all three escalation levels. These results demonstrate ticket processing and escalation behavior, without establishing automatic ticket resolution or persistence of escalation states.

Tech Stack

  • Automation: n8n
  • AI: OpenAI
  • Email ingestion: IMAP
  • Ticket log: Google Sheets
  • Notifications: Telegram Bot API
  • Director escalation: Gmail

Results

  • Automated Ticket Processing: Incoming emails are classified and routed without manual sorting.
  • AI-Powered Prioritization: Tickets receive a category, priority, assigned owner, summary, and classification reasoning.
  • Centralized Ticket Log: Ticket details and SLA deadlines are stored in Google Sheets.
  • Spam Filtering: Promotional emails are separated from customer support requests.
  • SLA Escalation: Overdue tickets trigger notifications at three escalation levels.
  • Verified Workflow: Successfully logged 10 tickets and tested all three escalation levels.

Visuals

Next case study

Fantasy Football Data Automation & AI Matchday AnalysisBack to all projects