# Setting up Service levels (SLA)

An IT Service Level Agreement (SLA) is a documented agreement between an IT service provider and a customer, defining the services required and the level of service expected. In GLPI, it is possible to enter these SLAs so that the level of service expected by a customer is in line with the contract signed between the 2 parties.

Setting up SLAs involves several stages:

1. Define intervention times via the calendar (working hours, on-call, etc. several possible calendars).
2. Definition of SLAs (Service Level Agreements)
   * Maximum Time To Own (TTO)
   * Maximum time to resolution (TTR - Time To Resolve)
3. Definition of OLA (Operational Level Agreement)
   * Maximum Time To Own (TTO)
   * Maximum time to resolve (TTR - Time To Resolve)
4. Implementation of SLA assignment rules (escalation level)
5. Set up SLA reminder notifications
6. Automatic action settings
7. Checking the cron

{% hint style="success" %}
**Optional steps**

Depending on the contract with your customer, not all of these steps may be necessary. For this example, we'll take as complete a case as possible in order to have a complete view of GLPI's possibilities in terms of SLAs.Add an SLA
{% endhint %}

***

### Create SLA

* From **Setup** > **Service levels**, click on **Add**.
* Add a **name** to your SLA
* In the calendar insert, select the one you want from the list.
* If nothing suits you, you can add a new calendar by clicking on . You can refer to the article [Calendar](https://help.glpi-project.org/tutorials/readme-1/calendar) to add a new calendar.

{% hint style="warning" %}
**Important step**

&#x20;The calendar step is important because your SLAs will take into account the opening or intervention times that have been entered.
{% endhint %}

***

### Add SLA service level

***

#### Add a TTO

* In your SLA, click on **Add a new item**.
* Select **Time to own**.
* Add the desired value (generally defined by the contract). In our example, we'll take 4 hours.
* Click on **Add**

![Add TTO](https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2Fgit-blob-1805687b07af640c87417b3d04d9936b61363e22%2Fadd_sla-1.png?alt=media)

***

#### Add a TTR

* Click on **Add a new item**.
* Select **Time to resolve**
* Add the value you want (usually defined by the contract). In our example we'll take 5 days
* Indicate whether the last day of the SLA should be a working day
* Click on **Add**

![Add TTR](https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2Fgit-blob-16651e2538e4635908eabf687c5e1d769fa2f7c3%2Fadd_sla-2.png?alt=media)

{% hint style="info" %}
To **summarize**

The ticket should therefore be:&#x20;

* taken care of within 4 hours
* resolved within 5 working days
  {% endhint %}

***

### Add OLA service level

OLAs are internal service levels; they have no impact on SLAs, but define a level of service internal to the IT department.

Adding an OLA is strictly identical to the SLA, so you can repeat the above process.

![Add OLA](https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2Fgit-blob-915e53d38e4db6d36c68246a5d35735e4abee798%2Fadd_sla-3.png?alt=media)

***

### Escalation levels

The escalation level enables you to apply a rule before/after the deadline imposed by the TTO or TTR, whether positioned in the SLA or the OLA.

You can, for example, add a TAG, assign a priority, assign a default technician, etc.

The following operation can be repeated for each TTO or TTR included in an SLA or OLA.

{% hint style="success" %}
**Example**

"We're going to create 2 types of escalation level:

1. For the SLA TTO :&#x20;
   * If the ticket is still in **New** status, a **group of technicians** will be automatically **assigned**.
   * The **priority** will be changed to **Very high**.

2. For SLA TTR:
   * 2 days before the end of the TTR, SLAs will be reminded that the ticket is still open and must be resolved on time.
     {% endhint %}

You can, of course, add/modify/delete anything you like, just like any other GLPI rule.

***

#### SLA escalation level - TTO

* From **Setup** > **Service levels**
* In the SLA tab, click on the name of your TTO
* In the escalation level tab
  * Enter a **name**
  * Indicate when the **execution** is to take place (before/after or at the end of the TTO)
  * **Active** to **Yes**
  * Click on **Add**

![Escalation levels](https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2FikeBdJf6IdBzzzzeqSW7%2FEscalation%20levels%20-%20creating.png?alt=media\&token=5e127bce-4457-4126-99b6-cb95d54d4e5a)

* Click on the **name** of your Escalation level to add a rule that will be applied.
* In the **Criteria** tab, click on **add a new criterion**.
* In our case, we will specify **Criteria - Status is new** (you can also add a category, a priority, etc.)
* Click on **+ Add**
* In the **Actions** tab, click on **Add a new action**.
* Specify ***Technician group*** > ***Add*** > ***the\_desired\_group***.
* Click on **Add a new action**.
* Specify ***Priority*** > ***Assign*** > ***Very high***

![Rules of escalation levels TTO](https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2FIGBFZs1BhcjlsUBFpMUo%2FEscalation%20levels%20-%20add%20criterion%20and%20action.png?alt=media\&token=8c16cbb4-ac1f-4608-b34b-67904b51391e)

***

#### SLA - TTR Escalation levels

* From **Setup** > **Service levels**
* In the SLA tab, click on the name of your TTR
* In the escalation level tab
* Enter a **name**
* Indicate when **execution** is to take place (before/after or at the end of the TTR)
* **Active** to **yes**
* Click on **Add**
* Click on the **name** of your Escalation level to add a rule that will be applied

{% hint style="danger" %}
**Logical operator**

&#x20;We're going to change the logical operator to **OR** because we're going to indicate that if the status isn't **closed OR solved**, then the rule will have to be applied.

<img src="https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2FS5Y91MPI6LlBYX9S0q1V%2Fadd_sla-6.png?alt=media&#x26;token=67f67056-955b-4d55-8371-db1584ee136a" alt="" data-size="original">
{% endhint %}

* In the **Criteria** tab, click on **add a new criterion**.
* In our case, we'll specify **Criteria - Status not closed&#x20;*****OR*****&#x20;resolved** (2 different criteria)
* Click on **Add**
* In the **Actions** tab, click on **Add a new action**.
* Specify ***Automatic reminders of SLA*** > ***Send*** > ***Yes***.
* Click on **Add**!

![Rules of escalation levels TTR](https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2Fgit-blob-b3d3097b6ec47294c9b442df97ef9816384da544%2Fadd_sla-7.png?alt=media)

{% hint style="info" %}
**OLA**

You can, of course, repeat this procedure for OLAs
{% endhint %}

## Recipient of reminder notifications

Reminders are used by the **`Ticket Recall`** notification and use the ticket template. By default, the recipients of this notification are left blank. This step is therefore necessary so that the people concerned by SLA reminders can receive the notifications.

* From **Setup** > **Notifications** > **Notifications**, search for **`Ticket Recall`** in the list.
* In the **Recipients** tab, select the desired values (profile, groups, ticket group, requester, entity administrator, etc.).
* Click **Update** to confirm your changes.

![Recipients ticket recall](https://2961961068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsGALtnzA2IROeldmXKt5%2Fuploads%2Fgit-blob-f7192e2f3793766b615d6020225862149ca68ccd%2Fadd_sla-8.png?alt=media)

## Automatic actions

In order for SLA actions to be carried out, the **`slaticket`** action must be activated.

* From **Setup** > **Automatic actions**, find the **`slaticket`** action.
* Make sure it is :
  * **scheduled**
  * in **CLI** mode
  * with a minimum frequency of **5 minutes**.
* Click on **Save**.

## Cron

For on-premise instances, please check that your **cron** is correctly configured. Please refer to the [official documentation](https://glpi-user-documentation.readthedocs.io/fr/master/modules/Setup/crontasks.html#configure-automatic-actions)
