# Setting up Quality Control Rules
In Swarmica, you can set up rules for quality control checks. For example, you can assign reviewers separately for the first and second lines, include or exclude specific channels for verification, or set more detailed settings for any ticket fields and properties. Additionally, you can limit the number of tickets per reviewer.

# Adding and Configuring Quality Control Rules

You can add and configure quality control rules in the **Settings** - **Quality Control Settings** - **Sampling Rules for Review** section.

To add a new rule, click !["Create a new rule"](https://support.swarmica.com/attachments/I/p/IpmTrPk3r-AZk-S0_a/image.png) in the upper right corner.

A window with a configured rule looks like this:

![](https://support.swarmica.com/attachments/K/s/KsFmjyDOx648M96a_a/image.png)

To add a new condition, click ![](https://support.swarmica.com/attachments/y/O/yOGqRW8hpSEIEEHx_a/image.png)

A condition consists of Field, Operator, and Value.

**Field** - a field on the ticket page.
**Value** - the contents of this field.
**Operator** - the relationship of the field to the value (equal, not equal, greater than, less than). The operator can be NULL - this indicates that the selected field must be empty.

Let's give an example. We want to apply the rule only to tickets with the highest priority. We select the **field** Priority, **operator** '=', value **Urgent**. Here's what we get:
![](https://support.swarmica.com/attachments/3/9/39IG7ODDpY7Eet4r_a/image.png)

Click !["Add"](https://support.swarmica.com/attachments/D/u/Du0ZNg8x8i7FVJwJ_a/image.png) to add the condition to the rule. To cancel an incorrect condition, click !["Cancel"](https://support.swarmica.com/attachments/Z/g/ZgM3vOUf-XSwL1_T_a/image.png). To delete an incorrectly added condition, click the trash can icon ![](https://support.swarmica.com/attachments/r/z/rzsAxOZSlxKhks4R_a/image.png) to its right, or edit it with the pencil ![](https://support.swarmica.com/attachments/1/n/1n65pw_RM2CnzOBa_a/image.png).

Don't forget to click ![](https://support.swarmica.com/attachments/U/0/U03rewdWSCFWIMOY_a/image.png) in the lower right corner after completing the settings.

After saving the rule, on its settings page, you will be able to select criteria for this specific rule. Move the necessary criteria from the 'Available Criteria' column to the 'Active Criteria' column using the plus sign next to them and save:

![](https://support.swarmica.com/attachments/R/v/Rvjhq5l5Ln80vgZX_a/image.png)

Each active criterion can have its weight changed. Weight is the index of the criterion's significance. The service quality index in percent is calculated from the weight of each criterion. By default, all existing criteria have a weight of 1. If one of the criteria has a higher weight, its fulfillment or non-fulfillment will have a greater impact on the quality index than fulfilling or not fulfilling criteria with a lower weight.

In the same way, you can assign different quality criteria to different employee groups or departments. An example of such a rule:

![](https://support.swarmica.com/attachments/i/O/iO1EoyxDtlnMdI9b_a/image.png)

# Configuring Reviewers

Reviewer settings are in the **Settings** - **Employee Management** section.

Find an employee in this section and go to their card. To designate an employee as a reviewer, enable the **Quality Control** option for them:

![](https://support.swarmica.com/attachments/v/n/vnx_4DtuYsx3htlJ_a/image.png)

The number to the right of the switch is the weekly number of tickets for review for this employee. You can change it and save it with a checkmark to the right:

![](https://support.swarmica.com/attachments/s/p/spZBnTnmm1EcowtQ_a/image.png)

In the right part of the page, on the **QA Samples** tab, there is a list of review rules. It consists of two columns: **Active Rules** and **Available Rules**:

![](https://support.swarmica.com/attachments/b/m/bmK0v3C_jYubbwL3_a/image.png)

**Available Rules** are all rules added in the settings.

To assign a rule to an employee, click the **+** icon next to the available rule, and it will become active for the employee.

![](https://support.swarmica.com/attachments/1/Y/1YG_RYuMiiFJEpmM_a/image.png)

To **view and/or edit a rule**, click on it.

If an employee has several active rules, they will be applied by the system in the order from top to bottom. **The order of active rules can be changed** by grabbing the handle next to the rule with the left mouse button and moving it:

![](https://support.swarmica.com/attachments/B/Q/BQiurbToc6uTny5K_a/image.png)

Review tickets will be assigned first according to the first rule according to the weekly number of review tickets. If after applying the first rule there is still a reserve in the number of weekly tickets, then the second rule is applied.