> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# SLA policies for sessions

> Set first reply, next reply, and resolution targets, pause timers outside office hours, apply policies with workflows, and track breaches in the inbox.

An SLA policy sets how quickly your team must reply to and resolve a session. Use it when you promise response times, for example to premium customers, and want countdowns in the inbox, breach alerts, and compliance reporting.

> [!NOTE]
>
> **Settings → SLA** in your [OpenCX dashboard](https://platform.open.cx/settings/sla). Creating, editing, and deleting policies requires the **SLA policies** permission under **Settings** in **Settings → Roles**.

This page covers SLAs for sessions. The same policy can also hold a phone answer-time target, which grades how fast callers waiting for an agent are answered; see [Phone answer-time SLA](https://docs.open.cx/phone/answer-time-sla.md).

## The three targets

| Target | Starts | Met when |
| - | - | - |
| **First Reply Target** | When the policy is applied to the session. | An agent sends the first reply to the customer. |
| **Next Reply Target** | When the customer writes again after the first reply target is met or breached. | An agent replies again. It restarts on each new customer message after a reply. |
| **Resolution Target** | When the policy is applied to the session. | The session closes. |

Agent replies count whether they are sent from the inbox or from a connected helpdesk. A workflow reply counts only when **Fulfill SLA** is on in its **Reply to ticket** or **Send macro** step.

## Create a policy

![Creating the SLA policy Premium with first reply, next reply and resolution targets in Settings, SLA](https://mintcdn.com/openchat/hiyaCL2S28Hya6Q7/images/ticketing/sla-policy-create.gif?s=bce7a003ffa6d2fe70f4431bc0a41fa5)

Create a Premium policy with 15 minute, 30 minute and 4 hour targets, and it appears in the Policies table.

**1. Open Settings → SLA**

Go to [Settings → SLA](https://platform.open.cx/settings/sla) and click **New policy**.

**2. Name the policy**

Enter a **Policy name**, such as *Standard* or *Premium*.

**3. Set targets**

Switch on **First Reply Target**, **Next Reply Target**, or **Resolution Target**, and enter a number in seconds, minutes, or hours. Set at least one target. A resolution target must be longer than both reply targets.

**4. Choose office hours**

Under **Custom Office Hours**, pick a schedule so timers pause outside business hours, or leave **None** so they run continuously, including nights and weekends.

**5. Save**

Click **Create policy**. The **Policies** table lists each target as **Not set** or as a duration.

## How timers pause outside office hours

With a schedule selected, a timer only counts business time. A policy applied outside business hours starts counting when they next begin. Running timers pause when business hours end and resume when they start again; the session timeline shows **SLA paused — office hours ended** and **SLA resumed — office hours started**.

If you edit the office hours schedule, deadlines already running are recalculated from the business time that has passed. If no schedules exist yet, the dialog links to [office hours](https://docs.open.cx/ticketing/office-hours.md) so you can create one.

## Apply a policy to sessions

Policies are applied with workflows. Teams do not apply session SLAs; a team only picks a phone answer-time policy.

* **Apply SLA** sets a policy on a session. By default the step fails if the session already has an SLA. Turn on **Replace existing SLA** to swap it for this policy, for example when a session moves to a stricter lane; the new clocks start from now. Re-applying the same policy changes nothing.
* **Pause SLA** pauses the resolution timer, for example while you wait on the customer. It resumes when the customer replies or the session reopens. Time spent paused does not count.

A policy that only has a phone answer-time target cannot be applied to a session.

## What agents see in the inbox

* **Countdown badge.** Sessions with an SLA show a timer badge in the header and in the session list, counting down to the most urgent deadline. It turns amber within an hour of the deadline and red within 30 minutes. Hover it to see the policy name and each target: a countdown, **met**, **breached**, **late** (met after a breach), or **paused**.
* **Sort.** Sort a view by **SLA Urgency** to put the nearest deadlines first.
* **Filter.** Add the **SLA Status** filter and pick a metric (**Any metric**, **First reply**, **Next reply**, **Resolution**) and a status (**Active**, **Breached**, **Fulfilled**, **Completed after breach**, **Paused**).
* **Timeline.** The session timeline records when the SLA was applied, when each target started, was met, or was breached.
* **Assignment.** Teams that use **SLA first** assignment hand out the session with the earliest outstanding deadline first. See [session assignment order](https://docs.open.cx/teams.md#choose-session-assignment-order).

## What happens on a breach

When a deadline passes while the session is open, the target is marked breached and the timeline records it. A snoozed session wakes up. The **SLA First Reply Breached**, **SLA Next Reply Breached**, and **SLA Resolution Breached** workflow triggers fire, so you can notify a lead, raise priority, or reassign. A reply or close after the breach marks the target as completed after breach (**late** on the badge).

## Edit or delete a policy

Edits apply to timers that start afterwards; deadlines already running keep their original targets. Deleting a policy asks for confirmation and cannot be undone. Sessions that used it no longer have an SLA, and no further breaches are recorded for them.

## Analyze SLA performance

Use the [SLA analytics API](https://docs.open.cx/api-reference/sla-analytics/index.md) for compliance rates, response and resolution time percentiles, trends, breakdowns, and a breach heatmap.

## Troubleshooting

| Symptom | Likely cause | Fix |
| - | - | - |
| *At least one target must be set* | Every target switch is off. | Turn on at least one target. |
| *Resolution target must be greater than the largest reply target* | The resolution target is shorter than or equal to a reply target. | Lengthen the resolution target or shorten the reply targets. |
| **Apply SLA** fails with *Session already has an SLA applied* | The session already has a policy. | Turn on **Replace existing SLA** in the step. |
| **Apply SLA** fails with *only grades phone calls* | The policy has no session targets. | Add a first reply, next reply, or resolution target. |

***

## Related Documentation

> [card] [Office Hours](https://docs.open.cx/ticketing/office-hours.md)
>
> Business hours that pause SLA timers.

> [card] [Teams](https://docs.open.cx/teams.md)
>
> SLA-first assignment order.

> [card] [Phone Answer-Time SLA](https://docs.open.cx/phone/answer-time-sla.md)
>
> Grade how fast callers are answered.

> [card] [SLA Policies API](https://docs.open.cx/api-reference/sla-policies/index.md)
>
> Manage policies programmatically.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.