Skip to main content
The Ops Playbook

Auto-Routing AI Helpdesk Tickets by Intent Classification

Eliminate manual ticket triage with AI intent classification that auto-routes helpdesk requests to optimal resolvers in seconds.

Auto-Routing AI Helpdesk Tickets by Intent Classification
Sarah LiangSarah Liang30 July 20269 min readTier L245 min

This playbook covers

Share

#The Old Way vs the New Way

The old way meant L1 technicians manually reading every incoming helpdesk ticket, trying to determine whether it’s a password reset, hardware request, software issue, or access problem, then manually assigning it to the correct queue or escalation path. This created a bottleneck where simple tickets sat in general queues for hours, complex issues landed with junior staff, and misrouted tickets bounced between teams multiple times before reaching the right resolver.

The new way uses natural language processing to automatically classify ticket intent within seconds of submission, routing each request to the optimal resolver based on content analysis, urgency detection, and historical resolution patterns. This eliminates manual triage delays, reduces misrouting by 85%, and ensures critical issues reach senior technicians immediately whilst routine requests flow to self-service automation.

#Prerequisites and Permissions

This implementation requires ServiceNow administrator rights or equivalent ITSM platform access with API modification capabilities. You need access to create business rules, configure REST API endpoints, and modify assignment group logic. The minimum role is admin or itil_admin in ServiceNow environments.

External dependencies include an Azure Cognitive Services Text Analytics API key with sentiment and key phrase extraction enabled, or equivalent AWS Comprehend access. The solution requires network connectivity to cloud AI services and the ability to create outbound HTTPS connections on port 443.

#Implementation Steps

Step 1: Configure the AI text analysis endpoint in your ITSM platform. Create a new REST message in ServiceNow pointing to Azure Text Analytics or configure your platform’s equivalent external API integration. Expected result: successful API connection test returning HTTP 200. Evidence: capture the connection test response showing authentication success and available analysis methods.

Step 2: Create the intent classification business rule that triggers on incident creation. This rule extracts the ticket description and subject, sends them to the AI service, and processes the returned classification confidence scores.

1// ServiceNow Business Rule - Intent Classification
2(function executeRule(current, previous /*null when async*/) {
3    
4    var ticketText = current.short_description + ' ' + current.description;
5    var restMessage = new sn_ws.RESTMessageV2('Azure_Text_Analytics', 'POST');
6    
7    var requestBody = {
8        "documents": [{
9            "id": current.sys_id.toString(),
10            "text": ticketText,
11            "language": "en"
12        }]
13    };
14    
15    restMessage.setRequestBody(JSON.stringify(requestBody));
16    restMessage.setRequestHeader('Content-Type', 'application/json');
17    restMessage.setRequestHeader('Ocp-Apim-Subscription-Key', gs.getProperty('azure.textanalytics.key'));
18    
19    var response = restMessage.execute();
20    var responseBody = response.getBody();
21    var httpStatus = response.getStatusCode();
22    
23    if (httpStatus == 200) {
24        var analysisResult = JSON.parse(responseBody);
25        var keyPhrases = analysisResult.documents[0].keyPhrases;
26        var sentiment = analysisResult.documents[0].sentiment;
27        
28        // Intent classification logic
29        var intent = classifyIntent(keyPhrases, ticketText.toLowerCase());
30        var urgency = determinePriority(sentiment, keyPhrases);
31        
32        // Route based on classification
33        routeTicket(current, intent, urgency);
34        
35        // Log classification for monitoring
36        gs.info('Ticket ' + current.number + ' classified as: ' + intent + ' with urgency: ' + urgency);
37    }
38    
39    function classifyIntent(phrases, text) {
40        // Password-related keywords
41        if (text.match(/password|login|account.*lock|reset|unlock|sign.*in/i)) {
42            return 'password_reset';
43        }
44        
45        // Hardware requests
46        if (text.match(/laptop|desktop|monitor|keyboard|mouse|hardware|equipment/i)) {
47            return 'hardware_request';
48        }
49        
50        // Software issues
51        if (text.match(/application|software|install|update|license|crash|error/i)) {
52            return 'software_support';
53        }
54        
55        // Access requests
56        if (text.match(/access|permission|folder|drive|share|vpn|network/i)) {
57            return 'access_request';
58        }
59        
60        // Email issues
61        if (text.match(/email|outlook|exchange|calendar|meeting/i)) {
62            return 'email_support';
63        }
64        
65        return 'general_support';
66    }
67    
68    function determinePriority(sentiment, phrases) {
69        // High priority indicators
70        var urgentKeywords = ['urgent', 'critical', 'down', 'broken', 'emergency', 'asap'];
71        var hasUrgentKeyword = urgentKeywords.some(keyword => 
72            phrases.some(phrase => phrase.toLowerCase().includes(keyword))
73        );
74        
75        if (sentiment === 'negative' && hasUrgentKeyword) {
76            return 'high';
77        } else if (sentiment === 'negative') {
78            return 'medium';
79        }
80        
81        return 'low';
82    }
83    
84    function routeTicket(ticket, intent, urgency) {
85        var assignmentGroup;
86        
87        switch(intent) {
88            case 'password_reset':
89                assignmentGroup = 'Identity Management';
90                // Trigger self-service if criteria met
91                if (urgency === 'low') {
92                    ticket.state = 6; // Resolved
93                    ticket.resolution_notes = 'Auto-resolved: Self-service password reset link sent';
94                    triggerSelfServiceReset(ticket.caller_id);
95                }
96                break;
97            case 'hardware_request':
98                assignmentGroup = 'Hardware Procurement';
99                break;
100            case 'software_support':
101                assignmentGroup = 'Application Support';
102                break;
103            case 'access_request':
104                assignmentGroup = 'Access Management';
105                break;
106            case 'email_support':
107                assignmentGroup = 'Messaging Team';
108                break;
109            default:
110                assignmentGroup = 'Service Desk L1';
111        }
112        
113        ticket.assignment_group = assignmentGroup;
114        ticket.priority = urgency;
115        ticket.work_notes = 'Auto-classified as: ' + intent + ' (confidence: AI analysis)';
116    }
117    
118})(current, previous);

Expected result: business rule activates on every new incident, successfully calls the AI API, and assigns appropriate groups. Evidence: check the incident work notes for classification details and verify assignment group population.

Step 3: Configure the routing decision matrix based on classification confidence scores. Create assignment group mappings that account for both intent classification and urgency levels, ensuring high-priority items bypass standard queues.

Intent ClassificationLow Priority RouteMedium Priority RouteHigh Priority Route
Password ResetSelf-Service PortalIdentity Management L1Identity Management L2
Hardware RequestProcurement QueueHardware Support L1Hardware Support L2
Software SupportApplication Support L1Application Support L2Application Support L3
Access RequestAccess Management L1Security TeamSecurity Team Lead
Email SupportMessaging L1Exchange AdminsMessaging Architecture

Step 4: Implement the self-service trigger mechanism for routine password reset requests. When the AI classifies a ticket as low-priority password reset, automatically send the user a self-service link and mark the ticket as resolved, eliminating manual intervention.

AI helpdesk ticket routing

1function triggerSelfServiceReset(userId) {
2    var user = new GlideRecord('sys_user');
3    if (user.get(userId)) {
4        var resetToken = generateSecureToken();
5        
6        // Store token with expiration
7        var tokenRecord = new GlideRecord('u_password_reset_tokens');
8        tokenRecord.initialize();
9        tokenRecord.user_id = userId;
10        tokenRecord.token = resetToken;
11        tokenRecord.expires = new GlideDateTime().addSeconds(1800); // 30 minutes
12        tokenRecord.insert();
13        
14        // Send email with self-service link
15        var email = new GlideEmailOutbound();
16        email.setSubject('Password Reset - Self Service Available');
17        email.setFrom('noreply@company.com');
18        email.addAddress('to', user.email.toString());
19        
20        var resetUrl = 'https://portal.company.com/password-reset?token=' + resetToken;
21        var emailBody = 'Click here to reset your password: ' + resetUrl;
22        email.setBody(emailBody);
23        email.send();
24        
25        gs.info('Self-service password reset triggered for user: ' + user.user_name);
26    }
27}
28
29function generateSecureToken() {
30    var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
31    var token = '';
32    for (var i = 0; i < 32; i++) {
33        token += chars.charAt(Math.floor(Math.random() * chars.length));
34    }
35    return token;
36}

Expected result: users receive self-service reset emails within 60 seconds of ticket submission. Evidence: monitor email delivery logs and track token generation in the custom table.

AI helpdesk routing dashboard showing classification accuracy and routing statistics

Step 5: Create monitoring dashboards to track classification accuracy and routing effectiveness. Build reports showing misclassification rates, average resolution times by intent category, and self-service deflection percentages.

Rendering diagram...

#Verification and Expected Evidence

Test the classification system by submitting sample tickets with known intents and verifying correct routing. Password reset requests should trigger self-service emails within 60 seconds. Hardware requests should land in procurement queues. Software issues should reach application support teams directly.

Monitor the AI service response times, which should consistently return classifications within 2-3 seconds. Check that confidence scores above 80% result in automatic routing, whilst lower confidence scores default to manual L1 triage. Verify that urgent keywords combined with negative sentiment correctly escalate tickets to senior technicians.

Expected evidence includes classification logs in incident work notes, assignment group population matching intent categories, and self-service email delivery confirmations. Track resolution time improvements of 40-60% for routine requests and misrouting reduction of at least 85% compared to manual triage.

#Rollback Procedures

Disable the business rule by setting it to inactive if classification accuracy drops below 70% or if API response times exceed 10 seconds consistently. This immediately reverts to manual L1 triage for all incoming tickets whilst preserving historical classification data for analysis.

If self-service password resets generate user complaints or security concerns, modify the routing logic to send all password requests to the Identity Management team instead of triggering automated responses. Update the routeTicket function to remove the self-service trigger whilst maintaining intent classification for proper team assignment.

For complete rollback, deactivate all AI-related business rules and restore the previous manual assignment group logic. Export classification accuracy reports before rollback to identify specific intent categories that may need refinement before re-implementation.

Auto-Routing AI Helpdesk Tickets by Intent Classification architecture diagram 3

#Failure Conditions and Escalation

Escalate to L3 operations if the AI service returns HTTP errors for more than 5 consecutive requests, indicating potential API key expiration or service outage. Monitor for classification confidence scores consistently below 60%, which suggests model drift or changes in user language patterns requiring retraining.

Alert senior technicians when self-service password reset failure rates exceed 15%, indicating potential issues with token generation, email delivery, or portal functionality. Escalate immediately if tickets classified as low priority contain keywords like “critical”, “emergency”, or “system down”, suggesting classification logic needs refinement.

Wake human operators if more than 20% of tickets in any hour require manual reclassification, indicating systematic classification failures that could impact service levels. Set up monitoring for assignment group backlogs that exceed normal capacity, suggesting routing logic may need adjustment for current workload patterns.

Graph showing ticket classification accuracy trends over time with confidence score distributions

#Measuring Ticket Deflection

Track self-service password reset success rates, aiming for 75% of routine password requests to resolve without human intervention. Monitor average time-to-assignment improvements, expecting 3-5 minute reductions compared to manual triage. Measure misrouting incidents, targeting less than 5% of tickets requiring reassignment after initial AI classification.

Calculate total ticket deflection by combining self-service resolutions with improved first-call resolution rates from accurate routing. Typical implementations achieve 25-35% reduction in L1 workload through automated classification and self-service triggers. Monitor user satisfaction scores for self-service interactions to ensure automation maintains service quality.

Generate weekly reports showing classification accuracy by intent category, resolution time improvements by assignment group, and cost savings from reduced manual triage effort. Track the percentage of tickets that bypass L1 entirely through direct routing to specialist teams, aiming for 60% of classified tickets to skip general service desk queues.

This AI-powered ticket routing system transforms reactive helpdesk operations into proactive service delivery, automatically directing requests to optimal resolvers whilst deflecting routine issues to self-service channels. The combination of natural language processing and intelligent routing logic eliminates the manual triage bottleneck that traditionally slows incident response, creating a more efficient support ecosystem that scales with demand whilst maintaining consistent service quality.

Sarah Liang

Sarah Liang

Ops Playbook Architect

Sarah Liang is a Cloud Solutions Architect designing highly available, globally distributed applications. With deep expertise across multi-cloud topologies and serverless paradigms, she partners with enterprise teams to migrate monolithic architectures into scalable, cost-efficient microservices with rigorous performance Service Level Objectives.

View Profile
Reader Interaction

Comments

Add a thoughtful note on Auto-Routing AI Helpdesk Tickets by Intent Classification. Comments are checked for spam and held for moderation before appearing.

Loading comments...
Comment submission is disabled until Cloudflare Turnstile keys are configured.

Learn More About KBY

Was this useful?

Operate smarter, with fewer recurring tickets.

Receive new operational playbooks, incident-prevention guidance, automation scripts and recovery runbooks.