AI complaint management system — Novetex case study
By Péter Ujvári · May 4, 2026 · 10 min read · Client: Novetex Matrac (and brands: Hollandia, Reflex, Sealy)
TL;DR
A custom-built complaint-management web application running 24/7 in production for a mattress and bedding manufacturer. It manages the full lifecycle of customer complaints from intake to resolution, with automatic deadline tracking, timeline visualisation and full audit logging. An AI agent built on the OpenAI Assistant API supports the agents: it accepts natural-language queries against the entire database, analyses images and PDFs, and gives complaint-specific recommendations. Built on Python/Flask + PostgreSQL with email integration (SMTP/IMAP) and brand-specific theming.
24/7
production uptime
25+
data fields / complaint
4
supported brands
350 MB
max attachment size
Overview
Novetex Matrac and its brands (Hollandia, Reflex, Sealy) deal with customer complaints daily — product defects, shipping issues, warranty cases. The previous process relied on Excel sheets, email threads and phone notes: the 30-day legal deadline was hard to track, agents could not see the entire case in one place, and management reports had to be assembled manually.
The new system handles the entire complaint workflow — from intake to resolution — in a single web application, while supporting the agents' work with artificial intelligence.
Tech stack
Backend: Python 3, Flask
Database: PostgreSQL
AI: OpenAI Assistant API (chat, function calling, Vision, PDF parsing)
Operations: 24/7 production environment, health-check endpoints, AI warmup service
File handling: image, PDF, video attachments with automatic thumbnail generation
1. Full complaint lifecycle management
25+ data field complaint intake
New complaints are recorded with more than 25 data fields: customer details, product info (brand, model, serial number), defect description, manufacturer correspondence, on-site inspection dates. Every field has full CRUD (view, edit, delete).
Visual timeline
Each complaint gets an automatically generated timeline: intake → on-site inspection → manufacturer discussion → decision → final resolution. The agent sees at a glance where the case is and what happened when.
Deadline tracking (30-day rule)
Automatic alerts for the 30-day legal/internal deadline. Visual badges flag cases past or close to the deadline — nothing slips through unnoticed.
"Excel-like" tabular overview
A Hungarian-headed table view for quick scanning — agents can navigate, filter and sort using the Excel logic they already know.
Full audit log
Every change is tracked: who changed which field, when — old and new value both recorded. Documentation that can be produced immediately for consumer-protection or quality audits.
2. AI support
The system has deep AI integration on top of the OpenAI Assistant API.
AI chat agent (/assistant-agent/)
You can ask the entire complaint database in natural language:
"How many open complaints are there for the Hollandia brand?"
"Show cases past 30 days."
"Which product had the most complaints last quarter?"
Through function calling the agent runs the appropriate SQL query or data update in the background and returns the answer in a structured table.
Per-complaint AI analysis
Each complaint can be analysed individually. The AI reviews the case, the audit log and attachments, and suggests a next step — e.g. "based on the photo, manufacturing defect is likely, request an on-site inspection" or "according to the customer submission this is misuse, send the standard reply".
Image analysis (GPT-4 Vision)
Uploaded photos of the defective product are analysed by GPT-4 Vision and given a preliminary verdict: manufacturing vs. usage defect, rough categorisation (stitching, material flaw, deformation), and a flag if an on-site inspection is recommended.
PDF analysis (PDFAnalyzer)
A dedicated service extracts and interprets text from uploaded PDFs (invoices, customer submissions, warranty cards). The extracted data can be mapped automatically to the relevant complaint fields.
Rich formatting and Excel export
AI responses support Markdown tables, Mermaid diagrams and math formulas. Tables can be copied to the clipboard with one click or pasted directly into Excel — management reports are produced in seconds.
3. Files and document handling
Attachments for images, PDFs and videos, up to 350 MB per file.
Automatic thumbnail generation and gallery preview for images.
Excel import: a robust importer that intelligently maps Hungarian column names (e.g. "rk szám", "vevő neve", "hiba leírása") to the database fields — legacy spreadsheet records can be migrated easily.
PDF export: AI conversations and reports can be exported to PDF for documentation.
Report generation: dedicated templates for summary reports (weekly, monthly, by brand).
4. Subtasks and work organisation
Subtasks: each complaint can be broken down into smaller subtasks (on-site inspection, manufacturer discussion, quote sending) with deadlines and assignees.
Assignment: who works on which task and when it is due — the manager sees team load at a glance.
5. Email integration
80% of complaint handling is email communication. The integrated SMTP + IMAP service:
Sends emails to customers and supervisors directly from the system.
Email threads: customer replies attach automatically to the right complaint — no more "lost" emails.
Contact management: customer and partner contacts stored and reusable for sending email.
6. Users and security
Session-based login, user activity tracking.
Access control across the whole application.
Audit log for full accountability — meeting Hungarian consumer-protection and quality assurance documentation requirements.
7. Brand-specific support
The UI and reports support the specific look and requirements of each brand (Hollandia, Reflex, Sealy, Novetex) — multiple brands can be handled in one system without data and visual identity getting mixed up.
8. Operational stability
Because the system is a daily critical tool for agents, explicit attention went into stability:
"Always On" mechanisms and health-check endpoints — 24/7 availability.
AI warmup service: keeps the OpenAI Assistant connection warm so users do not wait for the 4–6 second cold-start latency.
Fault tolerance: an AI outage does not block the core system (classic complaint handling still works).
What does this mean for customer experience?
Faster response: the agent sees everything in one place with an AI-supported recommendation.
More accurate documentation: audit log + timeline that holds up well in consumer-protection and manufacturer disputes.
Management transparency: complaint trends (manufacturing vs. usage defect ratio, complaint volume by brand) are available in seconds via AI analysis.
Lessons for other companies
Complaint management (or any complaint/case-tracking system) is an ideal AI deployment ground for three reasons:
Structured data exists (customer, product, date, status) — easily queryable, the AI can work with it.
Lots of repetitive communication (template replies, common questions) — the AI can produce a first-draft answer for the human to check.
High documentation requirements (legal deadlines, audits) — automatic logs and reports alone justify the deployment.
The key to deployment is not the model choice but process clarity. AI only helps if the human work is thought through first.
Need a similar complaint or case-tracking system? Send an email and let's spend 30 minutes discussing what can be automated in your process.