Automate IT Ticketing with ServiceNow Workflows
Your IT support team is drowning in tickets. Password resets. Software requests. Hardware issues. Everything hits the same queue, gets manually categorized, manually routed, and manually escalated.
Meanwhile, users wait hours for responses that should take minutes—and your team wastes time on repetitive tasks instead of solving real problems.
ServiceNow workflows can automate 60-70% of this manual work. Today we're building automation that routes tickets instantly, resolves common issues automatically, and escalates problems before they become critical.
What You'll Learn
- Auto-categorizing tickets using business rules
- Building approval workflows for common requests
- Automatic assignment based on skills and workload
- Self-service automation with catalog items
- Escalation workflows for SLA compliance
- Integration with Slack and email for notifications
The Manual Ticketing Problem
Without automation, every ticket requires manual intervention:
- User submits ticket → Sits in general queue
- Agent reads ticket → Determines category
- Agent reassigns → Sends to appropriate team
- Specialist reads ticket → Starts working on it
- Resolution → Closes ticket
Time wasted: 10-15 minutes per ticket on routing alone Result: Slow response times, overwhelmed staff, poor user experience
ServiceNow Workflow Automation
ServiceNow workflows automate the entire process:
Ticket submitted
↓
Auto-categorize (Business Rules)
↓
Auto-assign to team (Assignment Rules)
↓
Check for auto-resolution (Knowledge Base)
↓
If not resolved → Route to specialist
↓
If no response in 2 hours → Escalate
↓
Monitor SLA → Alert if at risk
↓
Resolve and notify userWorkflow 1: Automatic Ticket Categorization
The Goal
Categorize tickets based on keywords, user department, and priority level.
Business Rule Configuration
Navigate to: System Definition → Business Rules
Create New Rule: Auto-Categorize Incidents
1(function executeRule(current, previous /*null when async*/) {
2
3 // Extract description and short description
4 var description = current.short_description + ' ' + current.description;
5 description = description.toLowerCase();
6
7 // Password Reset Detection
8 if (description.indexOf('password') > -1 ||
9 description.indexOf('reset') > -1 ||
10 description.indexOf('login') > -1) {
11
12 current.category = 'Password Reset';
13 current.subcategory = 'Account Access';
14 current.assignment_group = 'Identity Management';
15 current.priority = 3; // Low priority
16 }
17
18 // Software Request Detection
19 else if (description.indexOf('software') > -1 ||
20 description.indexOf('install') > -1 ||
21 description.indexOf('license') > -1) {
22
23 current.category = 'Software';
24 current.subcategory = 'Software Request';
25 current.assignment_group = 'Software Management';
26 current.priority = 4; // Medium priority
27 }
28
29 // Hardware Issue Detection
30 else if (description.indexOf('laptop') > -1 ||
31 description.indexOf('monitor') > -1 ||
32 description.indexOf('keyboard') > -1 ||
33 description.indexOf('hardware') > -1) {
34
35 current.category = 'Hardware';
36 current.subcategory = 'Equipment Issue';
37 current.assignment_group = 'Desktop Support';
38 current.priority = 3;
39 }
40
41 // Network Issue Detection
42 else if (description.indexOf('network') > -1 ||
43 description.indexOf('wifi') > -1 ||
44 description.indexOf('internet') > -1 ||
45 description.indexOf('connection') > -1) {
46
47 current.category = 'Network';
48 current.subcategory = 'Connectivity';
49 current.assignment_group = 'Network Operations';
50 current.priority = 2; // Higher priority
51 }
52
53 // VPN Issue Detection
54 else if (description.indexOf('vpn') > -1) {
55 current.category = 'Network';
56 current.subcategory = 'VPN Access';
57 current.assignment_group = 'Network Security';
58 current.priority = 2;
59 }
60
61 // Email Issue Detection
62 else if (description.indexOf('email') > -1 ||
63 description.indexOf('outlook') > -1) {
64
65 current.category = 'Email';
66 current.subcategory = 'Email Access';
67 current.assignment_group = 'Messaging Team';
68 current.priority = 3;
69 }
70
71 // Default - Unknown Category
72 else {
73 current.category = 'General IT';
74 current.subcategory = 'Needs Classification';
75 current.assignment_group = 'IT Help Desk';
76 current.priority = 4;
77 }
78
79 // Log categorization
80 gs.log('Auto-categorized ticket ' + current.number +
81 ' as: ' + current.category);
82
83})(current, previous);Rule Configuration:
- When: Before Insert
- Condition: Category is empty
- Active: True
Testing the Rule
-
Create test incident: "I forgot my password"
- Expected: Category = "Password Reset", Group = "Identity Management"
-
Create test incident: "Need Photoshop installed"
- Expected: Category = "Software", Group = "Software Management"
Workflow 2: Intelligent Assignment Based on Workload
The Goal
Assign tickets to agents with lowest workload and relevant skills.
Assignment Rule Script
Navigate to: System Policy → Assignment Rules
1// Get all active agents in the assignment group
2var agentGroup = current.assignment_group;
3var activeAgents = new GlideRecord('sys_user');
4activeAgents.addQuery('active', true);
5activeAgents.addQuery('u_assignment_group', agentGroup);
6activeAgents.query();
7
8var leastBusyAgent = null;
9var lowestWorkload = 9999;
10
11// Loop through agents to find least busy
12while (activeAgents.next()) {
13
14 // Count active tickets assigned to this agent
15 var ticketCount = new GlideAggregate('incident');
16 ticketCount.addQuery('assigned_to', activeAgents.sys_id);
17 ticketCount.addQuery('active', true);
18 ticketCount.addAggregate('COUNT');
19 ticketCount.query();
20
21 if (ticketCount.next()) {
22 var currentWorkload = parseInt(ticketCount.getAggregate('COUNT'));
23
24 // Check if agent has required skills
25 var hasSkills = checkAgentSkills(activeAgents, current.category);
26
27 if (hasSkills && currentWorkload < lowestWorkload) {
28 lowestWorkload = currentWorkload;
29 leastBusyAgent = activeAgents.sys_id;
30 }
31 }
32}
33
34// Assign to least busy agent with skills
35if (leastBusyAgent) {
36 current.assigned_to = leastBusyAgent;
37
38 // Send notification to assigned agent
39 gs.eventQueue('incident.assigned', current,
40 current.assigned_to, current.assignment_group);
41}
42
43// Check if agent has required skills for category
44function checkAgentSkills(agent, category) {
45 var skills = new GlideRecord('user_skills');
46 skills.addQuery('user', agent.sys_id);
47 skills.addQuery('skill.name', category);
48 skills.query();
49
50 return skills.hasNext();
51}Workflow 3: Password Reset Self-Service
The Goal
Auto-resolve password reset requests with self-service link.
Workflow Builder Configuration
Navigate to: Workflow → Workflow Editor
Create Workflow: Auto-Resolve Password Resets
Steps:
-
If (Condition)
- Category = "Password Reset"
- State = "New"
-
Send Email (Core Activity)
PromptTo: ${caller_id.email} Subject: Password Reset Instructions - ${number} Body: Hello ${caller_id.first_name}, We received your password reset request. Please use our self-service portal to reset your password: https://yourcompany.service-now.com/selfservice/password_reset If you continue to have issues, please reply to this email. Ticket Number: ${number} IT Support Team -
Update Ticket (Set Field Values)
- State = "Resolved"
- Resolution Code = "Self-Service Provided"
- Resolution Notes = "User directed to self-service portal"
- Work Notes = "Auto-resolved - self-service link sent"
-
Wait (30 minutes)
-
If (Condition Check)
- Still Resolved (user didn't reopen)
-
Close Ticket
- State = "Closed"
- Close Code = "Solved"
- Close Notes = "Resolved via self-service"
Result: Password reset tickets resolved in under 2 minutes with zero manual work.
Workflow 4: Software Approval Automation
The Goal
Route software requests through approval chain automatically.
Approval Workflow
Create Workflow: Software Request Approval
Steps:
-
Set Variables
- Software Cost = ${requested_item.cost}
- Requester Manager = ${caller_id.manager}
- Department Budget = ${caller_id.department.budget}
-
Approval - Manager (if cost > $100)
PromptApprover: ${caller_id.manager} Conditions: Cost > 100 Message: ${caller_id.name} has requested ${requested_item.name} Cost: $${requested_item.cost} Business Justification: ${justification} Please approve or reject. -
Approval - Finance (if cost > $1000)
PromptApprover: Finance Team Conditions: Cost > 1000 AND Manager Approved Message: Software purchase approval needed. Item: ${requested_item.name} Cost: $${requested_item.cost} Department: ${caller_id.department} Budget remaining: ${department_budget_remaining} -
If Approved → Proceed
- Assign to Software Management team
- Create procurement task
- Notify requester: "Request approved"
-
If Rejected → End
- Close request
- Notify requester with rejection reason
- Log to metrics
Result: Automatic routing through approval chain based on cost thresholds.
Workflow 5: SLA-Based Escalation
The Goal
Automatically escalate tickets approaching SLA breach.
Escalation Workflow
SLA Definition:
- P1 (Critical): 1 hour response, 4 hours resolution
- P2 (High): 4 hours response, 24 hours resolution
- P3 (Medium): 8 hours response, 48 hours resolution
- P4 (Low): 24 hours response, 5 days resolution
Escalation Workflow:
1// Scheduled Job - Runs every 15 minutes
2var incidents = new GlideRecord('incident');
3incidents.addQuery('active', true);
4incidents.addQuery('state', '!=', 6); // Not resolved
5incidents.query();
6
7while (incidents.next()) {
8
9 // Calculate time remaining on SLA
10 var slaRemaining = calculateSLARemaining(incidents);
11
12 // 80% of SLA time elapsed - First escalation
13 if (slaRemaining < 0.2 && incidents.escalation_level == 0) {
14
15 // Escalate to team lead
16 incidents.assigned_to = getTeamLead(incidents.assignment_group);
17 incidents.escalation_level = 1;
18 incidents.urgency = increaseUrgency(incidents.urgency);
19
20 // Notify team lead
21 sendEscalationEmail(incidents, 'team_lead', 'First Escalation');
22
23 // Add work note
24 incidents.work_notes = 'Auto-escalated: 80% of SLA time elapsed';
25 incidents.update();
26 }
27
28 // 95% of SLA time elapsed - Critical escalation
29 else if (slaRemaining < 0.05 && incidents.escalation_level == 1) {
30
31 // Escalate to manager
32 incidents.assigned_to = getITManager();
33 incidents.escalation_level = 2;
34 incidents.urgency = 1; // Critical
35
36 // Notify management
37 sendEscalationEmail(incidents, 'management', 'CRITICAL Escalation');
38
39 // Trigger Slack notification
40 sendSlackAlert(incidents);
41
42 // Add work note
43 incidents.work_notes = 'CRITICAL: Auto-escalated to management - SLA breach imminent';
44 incidents.update();
45 }
46}
47
48// Helper functions
49function calculateSLARemaining(incident) {
50 // Calculate percentage of SLA time remaining
51 var sla = new GlideRecord('task_sla');
52 sla.addQuery('task', incident.sys_id);
53 sla.addQuery('active', true);
54 sla.query();
55
56 if (sla.next()) {
57 var totalTime = sla.duration.getValue();
58 var elapsedTime = sla.business_time_left.getValue();
59 return elapsedTime / totalTime;
60 }
61 return 1; // No SLA found, return 100%
62}
63
64function sendSlackAlert(incident) {
65 // Integration with Slack
66 var slackMsg = {
67 'text': '🚨 SLA BREACH ALERT',
68 'attachments': [{
69 'color': 'danger',
70 'fields': [
71 { 'title': 'Ticket', 'value': incident.number, 'short': true },
72 { 'title': 'Priority', 'value': incident.priority, 'short': true },
73 { 'title': 'Assigned To', 'value': incident.assigned_to.name },
74 { 'title': 'Description', 'value': incident.short_description }
75 ]
76 }]
77 };
78
79 // Send to Slack webhook
80 var r = new sn_ws.RESTMessageV2();
81 r.setEndpoint('https://hooks.slack.com/services/YOUR/WEBHOOK/URL');
82 r.setHttpMethod('POST');
83 r.setRequestBody(JSON.stringify(slackMsg));
84 r.execute();
85}Workflow 6: Knowledge Base Auto-Suggestion
The Goal
Automatically suggest KB articles to users and agents.
Configuration
Navigate to: Knowledge → Knowledge Base
Create Business Rule: Suggest KB Articles
1(function executeRule(current, previous /*null when async*/) {
2
3 // Search knowledge base for relevant articles
4 var searchTerms = current.short_description + ' ' + current.description;
5
6 var kb = new GlideRecord('kb_knowledge');
7 kb.addQuery('workflow_state', 'published');
8 kb.addQuery('text', 'CONTAINS', searchTerms);
9 kb.orderByDesc('sys_view_count'); // Most viewed articles first
10 kb.setLimit(5);
11 kb.query();
12
13 var suggestions = [];
14
15 while (kb.next()) {
16 suggestions.push({
17 'title': kb.short_description.toString(),
18 'number': kb.number.toString(),
19 'link': kb.getLink()
20 });
21 }
22
23 if (suggestions.length > 0) {
24 // Add work notes with suggestions
25 var notes = 'Suggested Knowledge Articles:\n\n';
26
27 for (var i = 0; i < suggestions.length; i++) {
28 notes += (i+1) + '. ' + suggestions[i].title +
29 ' (' + suggestions[i].number + ')\n';
30 notes += ' ' + suggestions[i].link + '\n\n';
31 }
32
33 current.work_notes = notes;
34
35 // Email suggestions to user
36 var email = new GlideEmailOutbound();
37 email.setSubject('Possible solutions for your ticket ' + current.number);
38 email.setFrom('noreply@yourcompany.com');
39 email.setRecipients(current.caller_id.email);
40
41 var body = 'Hello ' + current.caller_id.first_name + ',\n\n';
42 body += 'We found these articles that might help resolve your issue:\n\n';
43 body += notes;
44 body += '\nIf these don\'t solve your problem, our team will respond shortly.\n\n';
45 body += 'Ticket: ' + current.number;
46
47 email.setBody(body);
48 email.send();
49 }
50
51})(current, previous);Result: Users get instant KB article suggestions, often resolving issues without agent intervention.
Monitoring and Reporting
Key Metrics to Track
Create ServiceNow Dashboard: IT Automation Metrics
Widgets:
-
Auto-Resolution Rate
sql1SELECT 2 COUNT(*) as total, 3 SUM(CASE WHEN resolved_by = 'system' THEN 1 ELSE 0 END) as auto_resolved, 4 (SUM(CASE WHEN resolved_by = 'system' THEN 1 ELSE 0 END) * 100.0 / COUNT(*)) as percentage 5FROM incident 6WHERE sys_created_on >= DATE_SUB(NOW(), INTERVAL 30 DAY) -
Average Time to Assignment
- Track time from creation to first assignment
- Goal: Under 5 minutes
-
SLA Compliance Rate
- Percentage of tickets meeting SLA
- Goal: Above 95%
-
Escalation Frequency
- How often tickets escalate
- Goal: Under 10%
-
Category Accuracy
- Manual re-categorization rate
- Goal: Under 5%
Best Practices
1. Start Simple
Begin with one workflow:
- Password reset automation
- Measure results
- Refine
- Add next workflow
2. Monitor and Tune
Review weekly:
- Incorrect auto-categorizations
- False escalations
- Auto-resolution failures
Adjust rules based on data.
3. Keep Humans in Loop
Don't automate everything:
- Complex issues need human judgment
- Upset customers need empathy
- Political situations need discretion
4. Document Everything
- Workflow diagrams
- Business rule logic
- Approval chains
- Integration points
5. Test Thoroughly
Before production:
- Test each workflow separately
- Test edge cases
- Test with real data
- Get team feedback
Troubleshooting
| Issue | Solution |
|---|---|
| Tickets not auto-categorizing | Check business rule active/conditions |
| Wrong agent assignments | Review skill mappings and workload calc |
| Escalations not triggering | Verify SLA definitions and scheduled job |
| KB suggestions irrelevant | Refine search terms and ranking logic |
| Approval workflow stuck | Check approver availability and notifications |
Conclusion
ServiceNow workflow automation transforms IT support from reactive firefighting to proactive service delivery. By automating categorization, routing, approvals, and escalation, you:
- Reduce response time by 60%+
- Increase agent capacity by 40%+
- Improve user satisfaction scores
- Ensure SLA compliance
- Free agents for complex work
Start with password reset automation. Measure results. Expand from there. Each workflow compounds the benefits.
Your IT team shouldn't waste time routing tickets. They should solve problems. Let ServiceNow handle the routing.
Frequently Asked Questions
How long does it take to build these workflows? Basic workflows (auto-categorization, assignment): 4-8 hours. Complex workflows (approvals, escalations): 2-3 days. Plan 2-4 weeks for comprehensive automation including testing.
Do we need ServiceNow developers? Not for basic workflows. ServiceNow's workflow builder is low-code. For complex custom scripts, developer skills help but aren't required—many admins build these successfully.
What's the ROI of ServiceNow automation? Typical ROI: 3-6 months. A team of 10 agents saving 2 hours/day on routing = 20 hours daily = $100K+ annually in productivity gains.
Can workflows break existing processes? Yes, if not tested properly. Always test in non-production first, start with non-critical tickets, and keep human oversight initially.
How do we handle exceptions? Build in manual override options, monitor for patterns that need new rules, and maintain human review for escalated or complex tickets.
Related articles: Power Automate Email Workflows, Automated Employee Onboarding
Sponsored Content
Interested in advertising? Reach automation professionals through our platform.