Modern customer support teams manage hundreds or thousands of tickets every day. Customers expect quick, accurate responses, and businesses want to reduce resolution time while improving satisfaction scores. Traditional ticketing systems help track and assign issues, but they do not assist support agents in forming quality responses.
Recent advances in AI—especially large language models (LLMs)—allow support systems to generate intelligent response suggestions, summarize long conversations, classify ticket categories automatically, and even draft full resolutions based on historical data.
In this article, we will build a production-ready architecture for a Customer Support Ticketing System with AI-powered response suggestions. The focus is on a backend service layer with ASP.NET Core, SQL Server, AI inference APIs, and an Angular frontend for the agent interface.
Topics covered
Business needs and use cases
System architecture overview
SQL Server data model
ASP.NET Core ticketing API
Integrating AI response suggestions
Angular application for support agents
Fine-tuning and improving suggestion accuracy
Security, audit logging, and data governance
Performance, scaling, and operational best practices
Testing and validation strategies
This article is written for senior developers and technical leads designing enterprise-grade support platforms.
1. Business Needs and Use Cases
AI features improve support operations in multiple ways.
1.1 Key Use Cases
AI Suggested Response
The system suggests a draft reply based on ticket content, customer history, and previous resolutions.Ticket Categorization
Automatically categorize incoming tickets into Billing, Technical Support, Account Access, Payments, Shipping, and more.Sentiment Detection
Identify frustrated customers and escalate faster.Summary Generation
Summaries help agents understand long conversations quickly.Knowledge-base Article Recommendations
Identify relevant internal documentation for faster resolution.
These features reduce response time (First Response Time) and improve resolution accuracy.
2. Architecture Overview
A modern AI-powered ticketing system contains the following components:
Angular App (Support Agent UI)
|
ASP.NET Core API Gateway
|
Ticket Service AI Service Auth Service
|
SQL Server (Tickets, Conversations, Knowledge Base)
|
AI Provider (OpenAI, Azure OpenAI, local LLM)
2.1 Responsibilities
SQL Server
Stores tickets, messages, past resolutions, knowledge-base content.
ASP.NET Core Backend
CRUD operations for tickets
AI integration
Authentication and authorization
Audit logging
Caching
AI Provider
LLM models for suggestions and summaries
Optionally fine-tuned models with enterprise data
Angular Frontend
Ticket dashboards
Conversation thread display
Interface for accepting/editing AI suggestions
3. SQL Server Data Model
A simplified, production-ready schema:
3.1 Tickets Table
CREATE TABLE Tickets (
TicketID INT IDENTITY PRIMARY KEY,
CustomerID INT NOT NULL,
Subject NVARCHAR(250),
Status NVARCHAR(50), -- New, Open, Pending, Resolved, Closed
Category NVARCHAR(100),
CreatedAt DATETIME2 NOT NULL DEFAULT GETDATE(),
UpdatedAt DATETIME2
);
3.2 TicketMessages Table
CREATE TABLE TicketMessages (
MessageID INT IDENTITY PRIMARY KEY,
TicketID INT NOT NULL,
SenderType NVARCHAR(20), -- Customer, Agent, System
MessageText NVARCHAR(MAX),
CreatedAt DATETIME2 NOT NULL DEFAULT GETDATE()
);
3.3 KnowledgeBase Table
CREATE TABLE KnowledgeBase (
ArticleID INT IDENTITY PRIMARY KEY,
Title NVARCHAR(250),
Content NVARCHAR(MAX),
Tags NVARCHAR(200),
UpdatedAt DATETIME2
);
3.4 SuggestedResponses Table
CREATE TABLE SuggestedResponses (
SuggestionID INT IDENTITY PRIMARY KEY,
TicketID INT NOT NULL,
GeneratedText NVARCHAR(MAX),
ModelName NVARCHAR(100),
ConfidenceScore FLOAT,
CreatedAt DATETIME2 DEFAULT GETDATE()
);
This table helps with auditability and compliance.
4. ASP.NET Core API Layer
A clean approach is to separate ticketing functions and AI suggestion functions.
4.1 Ticket Repository
Using Dapper for clarity and performance:
public async Task<Ticket> GetTicketWithMessages(int ticketId)
{
using var con = new SqlConnection(_connString);
var ticket = await con.QueryFirstOrDefaultAsync<Ticket>(
"SELECT * FROM Tickets WHERE TicketID = @Id", new { Id = ticketId });
var messages = await con.QueryAsync<TicketMessage>(
"SELECT * FROM TicketMessages WHERE TicketID = @Id ORDER BY CreatedAt",
new { Id = ticketId });
ticket.Messages = messages.ToList();
return ticket;
}
4.2 AI Suggestion Service (Backend)
public class AiSuggestionService
{
private readonly HttpClient _http;
public AiSuggestionService(HttpClient http)
{
_http = http;
}
public async Task<string> GenerateSuggestionAsync(string prompt)
{
var payload = new
{
model = "gpt-4o-mini",
messages = new [] {
new { role = "system", content = "You are a customer support assistant." },
new { role = "user", content = prompt }
}
};
var res = await _http.PostAsJsonAsync("/v1/chat/completions", payload);
var json = await res.Content.ReadFromJsonAsync<dynamic>();
return (string)json.choices[0].message.content;
}
}

Join the conversation! Your thoughts help the community grow.