Skip to main content
Service Level Agreements (SLAs) define response and resolution time commitments for tickets based on priority, ticket type, and other criteria.

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

1

Navigate to SLA Settings

Go to Settings > SLA in the Frappe Helpdesk agent interface.
2

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
3

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
4

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
The SLA timer only counts time during these working hours.
5

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
6

Configure Priorities

Add priority levels with response and resolution times:
PriorityResponse TimeResolution Time
Urgent1 hour4 hours
High2 hours8 hours
Medium4 hours24 hours
Low8 hours48 hours
7

Set Default Priority

Select which priority is assigned to new tickets by default. This auto-populates when you save the priorities table.
8

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”)
These override the global settings in HD Settings.
9

Save the SLA

Click Save to create the SLA. It will now be available for ticket assignment.

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:
1

Define Conditions

Use the condition fields to specify when this SLA applies:Simple Python Expression (for developers):
doc.ticket_type == 'Bug' and doc.priority == 'High'
JSON Condition (generated from portal view):
[["ticket_type", "==", "Bug"], ["priority", "==", "High"]]
2

Test Conditions

Create test tickets to verify the SLA is assigned correctly based on your conditions.

Example Conditions

# Enterprise customers get priority SLA
doc.customer == 'Enterprise Corp'

# Critical bugs get fast response
doc.ticket_type == 'Bug' and doc.priority == 'Urgent'

# VIP support for specific agent group
doc.agent_group == 'VIP Support Team'
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

1

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)
2

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)
24/7 Support:
  • Add all days with 00:00 - 23:59
  • Or configure as continuous support
3

Configure Holidays

Create an HD Service Holiday List:
  1. Navigate to Holiday List settings
  2. Add holidays with dates
  3. Link to the SLA
  4. SLA pauses during these dates

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
The raised_outside_working_hours flag on tickets (see hd_ticket.json:28) helps track tickets created after hours for reporting purposes.

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:
  1. Ticket Creation Time: Starting point for SLA timer
  2. Working Hours: Only counts time during support hours
  3. Priority Level: Determines response and resolution targets
  4. Holidays: Excluded from calculations
  5. Status Changes: Paused or resolved status stops timers

SLA Fields on Tickets

Tickets track SLA compliance with these fields (from hd_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
These fields are in the Response tab of tickets (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
Paused Category:
  • SLA timer stops
  • Does not count toward SLA
  • Use for “Waiting on Customer” or “On Hold” statuses
Resolved Category:
  • SLA timer stops permanently
  • Resolution time is recorded
  • Agreement status is finalized

Ticket Reopen

When customers reply to resolved tickets:
  1. Status changes to the SLA’s “Ticket Reopen Status” (or global setting)
  2. SLA timer restarts
  3. New response deadline is calculated
  4. Previous resolution time is preserved
Implementation: hd_ticket.py:58-64

Best Practices

SLA Design

  1. Start Conservative: Set achievable targets initially
  2. Measure First: Review current performance before setting SLAs
  3. Match Business Hours: Align working hours with actual support availability
  4. Differentiate Priorities: Ensure meaningful differences between priority levels
  5. Plan for Growth: Build in buffer for increasing ticket volume

Working Hours

  1. Be Realistic: Don’t overcommit to hours you can’t support
  2. Include Breaks: Account for lunch breaks in shift definitions
  3. Handle Holidays: Maintain an accurate holiday calendar
  4. Review Regularly: Update working hours for seasonal changes
  5. Consider Time Zones: For global teams, define hours clearly per region

Priority Levels

  1. Limit Priorities: 3-5 priority levels are usually sufficient
  2. Clear Definitions: Document what qualifies for each priority
  3. Train Team: Ensure agents understand priority assignment criteria
  4. Monitor Usage: Check that priorities are distributed appropriately
  5. Adjust as Needed: Refine response times based on actual performance

Monitoring and Improvement

  1. Track Compliance: Regularly review SLA achievement rates
  2. Identify Bottlenecks: Find common causes of SLA failures
  3. Adjust Targets: Update SLAs based on team capacity
  4. Customer Communication: Inform customers of SLA commitments
  5. Team Training: Help agents understand SLA importance

Troubleshooting

SLA Not Assigned

Issue: Tickets don’t have an SLA assigned Solutions:
  1. Verify at least one SLA is enabled
  2. Check that conditions match ticket properties
  3. Ensure a default SLA is configured
  4. Review SLA priority assignment logic

Incorrect Times

Issue: Response or resolution times are wrong Solutions:
  1. Verify working hours are configured correctly
  2. Check holiday list is up to date
  3. Ensure server timezone is correct
  4. Review priority time configurations

Timer Not Pausing

Issue: SLA timer continues when ticket is paused Solutions:
  1. Verify ticket status category is “Paused”
  2. Check status configuration in HD Ticket Status
  3. Review custom status mappings

Build docs developers (and LLMs) love