Overview
The Helpdesk plugin adds a full-featured customer support system to your Codapult project. It combines traditional ticket management (priorities, assignments, SLA policies) with AI capabilities — automatic ticket classification, RAG-powered response suggestions, and optional auto-resolution for common questions using your help center content.
Package: @codapult/plugin-helpdesk · Price: $39 (one-time)
Install with:
npx @codapult/cli plugins add @codapult/plugin-helpdesk
Features
Ticket Management
Full ticket lifecycle with thread-based conversations:
- Status machine — enforced transitions: open → pending → in_progress → waiting_on_customer → resolved → closed
- Priorities — low, medium, high, urgent
- Agent assignment — assign tickets to team members
- Internal notes — private messages visible only to agents
- Tags — categorize tickets with custom tags
- Threaded messages — conversation thread with agent, customer, AI, and system messages
SLA Tracking
Service-level agreement enforcement:
- Per-priority policies — define first-response and resolution time targets for each priority level
- Deadline calculation — automatic SLA deadlines based on ticket priority and creation time
- Breach detection — cron job checks for approaching and breached SLA deadlines
- Escalation alerts — email notifications and in-app alerts when SLA deadlines are at risk
- Compliance dashboard — SLA compliance percentage tracked in analytics
AI Auto-Classification
Reduce triage time with automatic categorization:
- Priority assignment — AI analyzes ticket content and assigns the appropriate priority level
- Category detection — automatic category tagging based on the ticket subject and description
- Configurable — enable/disable classification per organization in support settings
AI Response Suggestions
RAG-powered draft responses for agents:
- Knowledge base search — searches your help center MDX articles and custom indexed content using Codapult's built-in RAG pipeline
- Suggested response — generates a draft response with confidence score
- Source citations — shows which help articles were used to generate the suggestion
- Agent control — agents can accept, edit, or dismiss suggestions with one click
- Suggestion history — all AI suggestions are stored for review and quality tracking
AI Auto-Resolution
Automatically resolve simple tickets without human intervention:
- Confidence threshold — configurable minimum confidence level per organization (e.g., 85%)
- Automatic response — when confidence exceeds the threshold, AI sends the response and closes the ticket
- AI resolution flag — tickets resolved by AI are flagged in analytics and ticket list
- Safety net — customers can reopen auto-resolved tickets if the answer was insufficient
- Toggle per org — organizations can enable/disable auto-resolve independently
Canned Responses
Reusable templates for common questions:
- Template library — create and manage response templates per organization
- Usage tracking — track how often each canned response is used
- Quick insert — agents can insert and customize templates in ticket replies
Satisfaction Surveys (CSAT)
Measure customer happiness:
- Post-resolution surveys — automatically sent after ticket resolution
- 1–5 star ratings — simple rating scale with optional comment
- Per-agent tracking — CSAT scores tracked per agent over time
- Analytics integration — satisfaction trends visible in the support dashboard
Email Notifications
Keep customers and agents informed:
- Ticket confirmation — email sent to customer when ticket is created
- Agent reply — notification when an agent responds
- Resolution notice — email when ticket is resolved
- SLA breach alert — notification to agents when SLA deadlines are at risk
Dashboard Pages
The plugin adds 5 pages under /dashboard/support/:
| Page | Path | Description |
|---|---|---|
| Ticket List | /dashboard/support/tickets | All tickets with filters and search |
| Ticket Detail | /dashboard/support/tickets/[id] | Conversation thread, AI suggestions, SLA |
| Canned Responses | /dashboard/support/canned | Response template management |
| SLA Policies | /dashboard/support/sla | SLA policy configuration |
| Analytics | /dashboard/support/analytics | Volume, SLA, AI stats, agent metrics |
API Routes
All routes are served under /api/plugins/helpdesk/. The plugin registers 27 API routes including:
GET|POST|PUT /tickets+POST /tickets/assign|close|reopen+GET|POST|DELETE /tickets/tags— ticket lifecycleGET|POST /messages— conversation threadGET|POST|PUT|DELETE /canned— canned response managementGET|POST|PUT|DELETE /sla— SLA policy configurationGET|PUT /settings— per-org support settings (AI toggles, thresholds, from email)GET /analytics/overview|ai|agents— reporting endpointsPOST|GET /satisfaction— CSAT submission and retrievalPOST /ai/suggest— generate AI response suggestion for a ticket
Database Tables
The plugin creates 8 tables prefixed with support_:
| Table | Purpose |
|---|---|
support_ticket | Tickets: status, priority, SLA timestamps, AI resolution |
support_ticket_message | Conversation messages (agent, customer, AI, system) |
support_ticket_tag | Ticket tags (composite PK) |
support_canned_response | Reusable response templates |
support_sla_policy | Per-priority SLA time targets |
support_settings | Per-org AI and email configuration |
support_satisfaction | 1–5 star ratings per ticket |
support_ai_suggestion | AI suggestions with sources and confidence scores |
Environment Variables
| Variable | Default | Description |
|---|---|---|
HELPDESK_FROM_EMAIL | — | Sender email for notifications |
HELPDESK_FROM_NAME | "Support" | Sender display name |
HELPDESK_AI_MODEL | "gpt-4o-mini" | Model for classification and suggestions |
HELPDESK_AUTO_RESOLVE | "false" | Enable AI auto-resolve globally |
HELPDESK_SLA_CHECK_CRON | "*/5 * * * *" | SLA breach check interval (cron expression) |
Integration with Core Modules
| Module | How Helpdesk Uses It |
|---|---|
retrieveContext() | RAG search for AI suggestions and auto-resolve |
sendEmail() | Ticket confirmation, agent reply, resolution, SLA alert |
enqueue() | Background jobs: classify, SLA check cron |
createNotification() | In-app notifications for assignments and replies |
Vercel AI SDK (ai) | Classification, response generation |
checkOrgQuota() | Enforce supportTickets resource limit |
logActivity() | Audit trail for ticket lifecycle events |
requireOrgMembership() | Access control on all routes |
onUserDeleted | Reassign/anonymize tickets when agent is deleted |