SLA Management¶
Version: 0.6.0
Status: Production Ready
Last Updated: January 3, 2026
Overview¶
Service Level Agreement (SLA) management in Arctyk ITSM provides organizations with tools to track response and resolution times for tickets. SLA fields and lifecycle timestamps work together to monitor compliance and generate metrics.
SLA Fields¶
Response Target (response_target)¶
- Purpose: Tracks the target time for initial agent response
- Set By: Automatically populated when ticket is created or first response added
- Type: DateTime field
- Format: ISO 8601 datetime with timezone
- Usage: Report on how quickly agents respond to new tickets
Resolution Target (resolution_target)¶
- Purpose: Tracks the target time for ticket resolution
- Set By: Automatically populated based on ticket priority and SLA policy
- Type: DateTime field
- Format: ISO 8601 datetime with timezone
- Usage: Monitor resolution time compliance and identify bottlenecks
Lifecycle Timestamps¶
Lifecycle timestamps track ticket progression through different states:
created_at¶
- When: When ticket is created
- Who: Automatically set by system
- Usage: Baseline for SLA calculations
first_responded_at¶
- When: When first comment or response is added to the ticket
- Who: Automatically set when first public comment created
- Usage: Calculate actual response time vs response target
- Integrates With: Comment system - automatically recorded on first comment
resolved_at¶
- When: When ticket status changes to "Resolved"
- Who: Automatically set by workflow system
- Usage: Calculate actual resolution time vs resolution target
- Integrates With: Workflow engine - automatic on status transition
closed_at¶
- When: When ticket status changes to "Closed"
- Who: Automatically set by workflow system
- Usage: Track customer acknowledgment and final closure
- Integrates With: Workflow engine - automatic on status transition
SLA Calculations¶
Response Time¶
Resolution Time¶
Time to Close¶
SLA Configuration¶
Default Response Targets¶
By Priority:
- Urgent: 1 hour
- High: 4 hours
- Medium: 8 hours
- Low: 24 hours
Default Resolution Targets¶
By Priority:
- Urgent: 4 hours
- High: 8 hours
- Medium: 24 hours
- Low: 72 hours
Note: These are configurable in Django admin and
settings.py
Integration Points¶
With Comments System¶
The comment system automatically records response times:
- When first public comment is created →
first_responded_atis set - Internal notes do NOT count as responses
- Staff responses count toward SLA response time
With Workflow Engine¶
Status transitions trigger timestamp recording:
- Status → "Resolved" →
resolved_atset - Status → "Closed" →
closed_atset - Automatic via workflow engine signals
With Reports¶
SLA data used for:
- Response time metrics
- Resolution time metrics
- SLA compliance percentage
- Average time per ticket
- Average time per status
With Changelog¶
All SLA field changes logged automatically:
- Who changed response/resolution targets
- When changes were made
- Original vs new values
- IP address of changer
Working with SLA Fields¶
In the Django Admin¶
Navigate to Tickets → Ticket and select a ticket:
- View
response_targetandresolution_target - Edit targets if needed (triggers changelog entry)
- View lifecycle timestamps in read-only fields
In Ticket Detail View¶
Ticket detail page displays:
- Response target with indicator if breached
- Resolution target with indicator if breached
- Lifecycle timeline showing state transitions
- Actual response time displayed
- Actual resolution time displayed
Programmatically¶
from tickets.models import Ticket
from django.utils import timezone
ticket = Ticket.objects.get(pk=1)
# Check response compliance
if ticket.first_responded_at:
response_time = ticket.first_responded_at - ticket.created_at
is_compliant = response_time <= (ticket.response_target - ticket.created_at)
else:
is_compliant = False # Not yet responded
# Check resolution compliance
if ticket.resolved_at:
resolution_time = ticket.resolved_at - ticket.created_at
is_compliant = resolution_time <= (ticket.resolution_target - ticket.created_at)
else:
is_compliant = None # Not yet resolved
Reporting¶
SLA Compliance Report¶
Generates metrics on:
- Percentage of tickets meeting response target
- Percentage of tickets meeting resolution target
- Average response time
- Average resolution time
- Tickets approaching breach
By Priority¶
Compare SLA performance:
- Urgent tickets compliance
- High priority tickets compliance
- Medium priority tickets compliance
- Low priority tickets compliance
By Agent/Department¶
Evaluate team performance:
- Which agents have best response times
- Which teams handle urgent requests well
- Performance trends over time
Best Practices¶
Setting Realistic Targets¶
- Base on historical data
- Account for business hours vs 24/7 support
- Adjust per priority level
- Review and adjust quarterly
Monitoring Compliance¶
- Set up alerts for approaching breaches
- Review compliance reports weekly
- Identify patterns in non-compliance
- Adjust processes accordingly
Communication¶
- Include SLA terms in documentation
- Set customer expectations
- Notify on approach to breach
- Track exceptions for analysis
Troubleshooting¶
SLA Fields Showing Null¶
Problem: response_target or resolution_target not being set
Solutions:
- Check ticket creation - ensure SLA initialization hook is being called
- Verify migrations have been run:
python manage.py migrate - Check
settings.pyfor SLA configuration - Manual set via admin if needed
Lifecycle Timestamps Not Recording¶
Problem: first_responded_at, resolved_at, closed_at not being set
Solutions:
- For
first_responded_at: Create a comment on the ticket - For
resolved_at/closed_at: Use workflow transitions, not manual status changes - Verify workflow engine is properly configured
- Check Django signals are registered:
src/tickets/signals.py
SLA Breach Calculations Wrong¶
Problem: Compliance calculations seem incorrect
Solutions:
- Verify timezone settings in
settings.py(should beAmerica/Toronto) - Check that timestamps include timezone info
- Manually calculate:
(target - created_at).total_seconds()in shell - Review changelog for when targets were modified
API Endpoints¶
Get Ticket SLA Info¶
Response includes:
{
"id": 123,
"response_target": "2026-01-04T14:30:00-05:00",
"resolution_target": "2026-01-05T10:30:00-05:00",
"created_at": "2026-01-03T10:30:00-05:00",
"first_responded_at": "2026-01-03T11:45:00-05:00",
"resolved_at": "2026-01-04T09:15:00-05:00",
"closed_at": null,
"response_time_hours": 1.25,
"resolution_time_hours": 22.75
}
Version History¶
v0.6.0 (January 3, 2026)¶
- ✅ Initial SLA implementation
- ✅ Response and resolution target fields
- ✅ Lifecycle timestamp tracking
- ✅ Automatic timestamp recording via signals
- ✅ Integration with comments system
- ✅ Integration with workflow engine
- ✅ Django admin support
- ✅ Changelog integration
Future Enhancements¶
- 📋 SLA breach notifications
- 📊 Automated SLA reports
- 🎯 Custom SLA policies per project
- 📈 SLA trending and forecasting
- ⏰ Business hours SLA calculations