Understanding SLAs
An SLA in Frappe Helpdesk includes:- Response Time: Maximum time to provide the first response to a customer
- Resolution Time: Maximum time to resolve the ticket
- Working Hours: Schedule defining when SLA timers are active
- Priorities: Different time commitments for each priority level
- Assignment Conditions: Rules determining which tickets the SLA applies to
SLA Components
Based on the HD Service Level Agreement doctype (helpdesk/doctype/hd_service_level_agreement/hd_service_level_agreement.json):
Basic Configuration
- Service Level Name: Unique identifier for the SLA
- Description: Brief explanation of the SLA purpose
- Enabled: Toggle to activate/deactivate the SLA
- Default SLA: Mark as the default for tickets that don’t match other SLAs
Validity Period
- Start Date: When the SLA becomes active
- End Date: When the SLA expires (optional)
Priority Settings
- Default Priority: Priority assigned to tickets when created
- Priorities Table: Response and resolution times for each priority level
Status Configuration
- Default Ticket Status: Status set when tickets are created with this SLA
- Ticket Reopen Status: Status set when customers reply to resolved tickets
- Apply SLA for Resolution Time: Enable/disable resolution time tracking
Creating an SLA
Create New SLA
Click “New SLA” and enter basic details:
- Service Level Name: e.g., “Standard Support”, “Premium Support”, “Enterprise SLA”
- Description: Brief overview of what this SLA covers
- Enabled: Check to activate immediately
Set Validity Period
Define when this SLA is active:
- Start Date: Today or a future date
- End Date: Leave blank for indefinite, or set an expiration date
Configure Working Hours
Add working hours for each day of the week:
- Select days (Monday-Sunday)
- Set start and end times (e.g., 9:00 AM - 5:00 PM)
- Add multiple shifts if needed
Set Holiday List
Link to a Holiday List to exclude holidays from SLA calculations:
- Select or create an HD Service Holiday List
- Add public holidays and company closures
- SLA timers pause during holidays
Configure Priorities
Add priority levels with response and resolution times:
| Priority | Response Time | Resolution Time |
|---|---|---|
| Urgent | 1 hour | 4 hours |
| High | 2 hours | 8 hours |
| Medium | 4 hours | 24 hours |
| Low | 8 hours | 48 hours |
Set Default Priority
Select which priority is assigned to new tickets by default. This auto-populates when you save the priorities table.
Configure Status Settings
Set the ticket statuses for this SLA:
- Default Ticket Status: Applied when tickets are created (e.g., “Open”)
- Ticket Reopen Status: Applied when customers reply after resolution (e.g., “Reopened”)
Assignment Conditions
Control which tickets the SLA applies to using conditions.Default SLA
Mark an SLA as “Default SLA” to apply it to all tickets that don’t match specific conditions:- Only one SLA can be the default
- Default SLA has no conditions
- Acts as a fallback for all unmatched tickets
Conditional SLAs
Create targeted SLAs based on ticket properties:Define Conditions
Use the condition fields to specify when this SLA applies:Simple Python Expression (for developers):JSON Condition (generated from portal view):
Example Conditions
The condition is evaluated when a ticket is created or updated. The first matching SLA (by priority order) is assigned.
Working Hours Configuration
Working hours determine when SLA timers are active.Adding Working Hours
Add Service Days
In the Working Hours table, add rows for each working day:
- Day: Monday, Tuesday, Wednesday, etc.
- Start Time: When support begins (e.g., 09:00:00)
- End Time: When support ends (e.g., 17:00:00)
Handle Multiple Shifts
For split shifts or 24/7 support:Split Shift Example:
- Monday 09:00 - 13:00 (morning)
- Monday 14:00 - 18:00 (afternoon)
- Add all days with 00:00 - 23:59
- Or configure as continuous support
Working Hours Behavior
- Timer Pause: SLA timers stop outside working hours
- Ticket Creation: If created outside hours, timer starts at next working hour
- Status Changes: Timer behavior depends on status category:
- Paused status: Timer stops
- Open status: Timer runs during working hours
- Resolved status: Timer stops permanently
Priority and Response Times
Configure time commitments for each priority level.Priority Configuration
Each priority in the Priorities table includes:- Priority: Link to HD Ticket Priority doctype
- Response Time: Hours/minutes for first response
- Resolution Time: Hours/minutes for full resolution
Time Calculations
The system calculates SLA deadlines based on:- Ticket Creation Time: Starting point for SLA timer
- Working Hours: Only counts time during support hours
- Priority Level: Determines response and resolution targets
- Holidays: Excluded from calculations
- Status Changes: Paused or resolved status stops timers
SLA Fields on Tickets
Tickets track SLA compliance with these fields (fromhd_ticket.json:25-33):
- sla: Reference to the assigned SLA
- response_by: Deadline for first response
- resolution_by: Deadline for resolution
- agreement_status: Current SLA status (On Track, Failed, etc.)
- on_hold_since: When ticket was paused
- total_hold_time: Cumulative time in paused status
- raised_outside_working_hours: Flag for after-hours tickets
- service_level_agreement_creation: Timestamp when SLA was assigned
SLA Status and Monitoring
Agreement Status
Tickets display real-time SLA status:- On Track: Within SLA targets
- First Response Due: Approaching first response deadline
- Resolution Due: Approaching resolution deadline
- Failed: Missed SLA target
- Paused: Timer stopped (paused status)
- Fulfilled: Successfully met SLA (resolved within targets)
Visual Indicators
The agent interface shows:- Color-coded status badges
- Time remaining until SLA breach
- Warning when approaching deadlines
- Failed SLA indicators
Reporting
Track SLA performance with:- SLA compliance rates
- Average response and resolution times
- Tickets breaching SLA
- Performance by priority level
Response Time Tracking
The system automatically tracks response metrics:First Response Time
- first_responded_on: Timestamp of first agent response (see
hd_ticket.py:298-314) - Set when ticket moves to “Paused” or “Resolved” category
- Used to calculate if response SLA was met
Response Metrics
- first_response_time: Duration from creation to first response
- avg_response_time: Mean time for all agent responses
- last_agent_response: Most recent agent communication
- last_customer_response: Most recent customer communication
hd_ticket.json:36-43).
Resolution Time Tracking
Resolution Configuration
Control resolution tracking:- Apply SLA for Resolution Time: Enable/disable resolution tracking (field:
apply_sla_for_resolution) - If disabled, only response time is tracked
- If enabled, both response and resolution times count toward SLA
Resolution Fields
Tickets track resolution with:- resolution_details: Description of how ticket was resolved
- resolution_date: Date ticket was resolved
- resolution_time: Exact timestamp of resolution
- user_resolution_time: Time to resolve from customer perspective
Status and SLA Interaction
Status Categories
SLA behavior changes based on status category: Open Category:- SLA timer runs during working hours
- Counts toward response and resolution time
- SLA timer stops
- Does not count toward SLA
- Use for “Waiting on Customer” or “On Hold” statuses
- SLA timer stops permanently
- Resolution time is recorded
- Agreement status is finalized
Ticket Reopen
When customers reply to resolved tickets:- Status changes to the SLA’s “Ticket Reopen Status” (or global setting)
- SLA timer restarts
- New response deadline is calculated
- Previous resolution time is preserved
hd_ticket.py:58-64
Best Practices
SLA Design
- Start Conservative: Set achievable targets initially
- Measure First: Review current performance before setting SLAs
- Match Business Hours: Align working hours with actual support availability
- Differentiate Priorities: Ensure meaningful differences between priority levels
- Plan for Growth: Build in buffer for increasing ticket volume
Working Hours
- Be Realistic: Don’t overcommit to hours you can’t support
- Include Breaks: Account for lunch breaks in shift definitions
- Handle Holidays: Maintain an accurate holiday calendar
- Review Regularly: Update working hours for seasonal changes
- Consider Time Zones: For global teams, define hours clearly per region
Priority Levels
- Limit Priorities: 3-5 priority levels are usually sufficient
- Clear Definitions: Document what qualifies for each priority
- Train Team: Ensure agents understand priority assignment criteria
- Monitor Usage: Check that priorities are distributed appropriately
- Adjust as Needed: Refine response times based on actual performance
Monitoring and Improvement
- Track Compliance: Regularly review SLA achievement rates
- Identify Bottlenecks: Find common causes of SLA failures
- Adjust Targets: Update SLAs based on team capacity
- Customer Communication: Inform customers of SLA commitments
- Team Training: Help agents understand SLA importance
Troubleshooting
SLA Not Assigned
Issue: Tickets don’t have an SLA assigned Solutions:- Verify at least one SLA is enabled
- Check that conditions match ticket properties
- Ensure a default SLA is configured
- Review SLA priority assignment logic
Incorrect Times
Issue: Response or resolution times are wrong Solutions:- Verify working hours are configured correctly
- Check holiday list is up to date
- Ensure server timezone is correct
- Review priority time configurations
Timer Not Pausing
Issue: SLA timer continues when ticket is paused Solutions:- Verify ticket status category is “Paused”
- Check status configuration in HD Ticket Status
- Review custom status mappings