# Skills Routing

Source: https://docs.qvoice.net/contact-center/skills-routing/

**Skills Routing** sends queued callers to agents whose skills match requirements set on the inbound call. Configure skills in the portal, enable **Skills Routing** on the queue, then use a **SmartPBX** callflow to tag each caller before they enter the queue.

**Videos:**

Watch the [Admins: Skills Routing](https://docs.qvoice.net/how-to-videos/admins/skills-routing/) videos for the whole setup, step by step.

### Individual Skills Routing vs Skills Group Routing

Both modes use the same **Skills Routing** toggle on the queue. The callflow decides which mode applies:

|  | **Individual Skills Routing** | **Skills Group Routing** |
| --- | --- | --- |
| **SmartPBX action** | **Set CAV** | **Set CAV** |
| **Variables set** | One numbered variable per skill: `Agent_Skill_1`, `Agent_Skill_2`, … | One numbered variable per priority group: `Agent_Skill_Group_1`, `Agent_Skill_Group_2`, … (comma-separated skills) |
| **What the caller needs** | A flat list of required skills | Ranked groups — Group 1 is tried first, then Group 2, and so on |
| **Agent must have** | **All** skills in the caller’s list | **All** skills in the **current** group being tried |
| **Dial behavior** | Match agents, then apply queue strategy (Single, Simultaneous, etc.) | Dial **every** matching agent in the current group before advancing to the next group |
| **Typical use** | “This caller needs Billing and English” — any qualified agent | “Try BDA agents first; if none answer, try BSA; then BSS” — tiered fallback |

**Detection:** If the call carries any `Agent_Skill_Group_*` variable, the queue uses **Skills Group Routing**. If only `Agent_Skill_*` variables are present, the queue uses **Individual Skills Routing**. Use one model per callflow branch.

**Skills Routing** works with any queue **strategy** (Single, Simultaneous, Weighted Random, and so on). It is disabled when an **AI persona** is assigned to the queue.

## Setup overview

Complete these steps in order:

1. **Create skills** on the Agent Skills page.
2. **Assign skills to users** (agents) on each user profile.
3. **Enable Skills Routing** on the queue. Its **Agents** tab shows each agent's skills (read-only).
4. **Add skills in the callflow** — use a **Set CAV** action before the queue to set `Agent_Skill_1`, `Agent_Skill_2`, … (individual) or `Agent_Skill_Group_1`, `Agent_Skill_Group_2`, … (priority groups).

```mermaid
flowchart LR
  A[Agent Skills page] --> B[User profile Skills]
  B --> C[Queue: Skills Routing ON]
  D[SmartPBX callflow] --> E["Set CAV (individual skills)"]
  D --> F["Set CAV (skill groups)"]
  E --> G[Queue module]
  F --> G
  C --> G
  G --> H[Matching agents]
```

## 1. Create agent skills

In the admin portal:

**Contact Center → Config → Agent Skills** (`/callcenter/config/agent_skills`)

1. Click **Add** to open **New Agent Skill** (or open an existing skill).
2. Set **Name** (no dots or spaces, for example `Language`) and, optionally, **Description**.
3. Click **+ Sub Skill** and type each sub skill (for example `English`, `Spanish`). At least one is required.
4. **Save**.

Each sub skill is stored with its full name, `Name.Sub` (for example `Language.Spanish`), and that full name is what you assign to agents and set in callflows. Use the copy icon next to a sub skill to copy its full name. There are no skill types or proficiency levels.

Skills defined here are available when assigning skills to users and in callflow **Set CAV** values. Deleting a skill here does not remove it from the users who have it.

**Naming:**

Use clear, stable names. When configuring the **Set CAV** callflow action, set numbered keys (`Agent_Skill_1`, `Agent_Skill_2`, …) with the skill name as the value.

## 2. Assign skills to users

Each agent needs the skills they can handle on their **user** record:

**Users** (`/users/list`) → **Edit User** → **Callcenter** section → **Skills**

1. Select one or more skills from the multi-select list.
2. **Save** the user ("The user has been saved successfully!").

These skills are stored on the user profile and used when the agent is a member of a queue with **Skills Routing** enabled. They are the only place an agent's skills are set.

## 3. Enable Skills Routing on the Queue

**Contact Center → Config → Queues** (`/callcenter/config/queues`) → open the queue.

### Turn on Skills Routing

In the **Configuration** section, enable **Skills Routing** ("Route calls to agents based on their specific skills") and **Save**.

When on, the queue dials only agents whose skills match the caller’s required skills (from the callflow). See [CX Queues](https://docs.qvoice.net/contact-center/home/) for other routing options.

### Agent skills on the queue (Agents tab)

On the **Agents** tab, each queue member has an **Agent Skills** column. It shows the skills from the agent's user profile and is **read-only**: change an agent's skills on the user (step 2).

| Column | Purpose |
| --- | --- |
| **Agent Delay (s)** | Wait time before dialing this agent. |
| **Agent Timeout (s)** | Ring time before trying the next agent. |
| **Agent Skills** | The agent's skills (from the user profile). |

**AI persona queues:**

**Skills Routing**, sticky agent routing, and manual agent selection are not used when an **AI persona** is set on the queue. See [AI Agents](https://docs.qvoice.net/contact-center/ai-agents/).

## 4. Add skills in the callflow

Inbound calls must carry **required skills** before they reach the queue. Set them in the callflow that routes the number or extension to the queue.

In the portal's top bar, open **PBX** (SmartPBX), then the **Callflows** app › **Callflows** › **Add Callflow** (or open an existing callflow):

1. **Click to add number** › **Extension** (or a spare number) › **Add**. The pencil on the callflow box sets its **Callflow Name**.
2. From the **Actions** panel on the right, **Advanced** › drag **Set CAV** ("Set Custom Application Var") onto the callflow. In **Setting custom application vars**, enter each variable as a **Key** and a **Value** (for example `Agent_Skill_1` and `Language.Spanish`, the skill's full name); the **+** adds a row. **Save**.
3. **Advanced** › drag **Callflow** under it and pick the queue's callflow in **Which Callflow?** › **Save**. (A **Queue** or ring-group step works the same way: the variables must be set **before** it.)
4. **Save changes**.

### Individual Skills Routing

Use **Individual Skills Routing** when the caller needs a specific set of skills and any matching agent may answer.

- Action: **Set CAV** (**Advanced** category)
- Add one numbered variable per required skill: `Agent_Skill_1`, `Agent_Skill_2`, etc.
- Set the value of each variable to the skill name.

**Example variables:**

```
Agent_Skill_1 = Billing
Agent_Skill_2 = Language.English
```

**Example callflow chain:**

```
DID / Extension → Menu or logic → Set CAV → Queue
```

A billing IVR branch might set `Agent_Skill_1 = Billing` and `Agent_Skill_2 = Language.English`, then route to the support queue. Only agents who have **both** skills are eligible.

### Skills Group Routing

Use **Skills Group Routing** when callers should be matched in **priority groups** — the queue tries every matching agent in Group 1 before moving to Group 2, and so on.

- Action: **Set CAV** (**Advanced** category)
- Add one numbered variable per priority group: `Agent_Skill_Group_1`, `Agent_Skill_Group_2`, etc.
- Set the value of each variable to a comma-separated list of skill names for that group.

**Example variables:**

```
Agent_Skill_Group_1 = Language.English,Department.BDA
Agent_Skill_Group_2 = Language.English,Department.BSA
Agent_Skill_Group_3 = Language.English,Department.BSS
```

**Example callflow chain:**

```
DID / Extension → Menu or logic → Set CAV → Queue
```

## Individual Skills Routing

When the callflow sets only `Agent_Skill_*` variables (no `Agent_Skill_Group_*`), the queue uses **Individual Skills Routing**.

### Matching rules

- Customer skills are read from each `Agent_Skill_*` variable on the call (e.g. `Agent_Skill_1`, `Agent_Skill_2`).
- An agent matches only when they have **every** required skill on their user profile. Names must match exactly (`Language.Spanish`).
- The queue **strategy** (Single, Simultaneous, Weighted Random, etc.) selects among all matching agents.

### Per-call flow

```mermaid
flowchart TD
  A[Caller enters queue with Agent_Skill vars] --> B[Read required skill list]
  B --> C[Filter agents with all required skills]
  C --> D{Any agents match?}
  D -->|No| E[Caller waits in queue]
  E --> C
  D -->|Yes| F[Apply queue strategy]
  F --> G["Dial matched agent(s)"]
  G --> H{Agent answers?}
  H -->|Yes| I[Call connected]
  H -->|No| J[Try next agent per strategy]
  J --> G
```

1. **Skill collection** — The queue reads `Agent_Skill_*` from the call’s custom channel variables (excluding `Agent_Skill_Group_*` keys).
2. **Agent filtering** — Only agents whose skill list includes **all** customer skills are candidates.
3. **Strategy** — **Single** dials one agent at a time; **Simultaneous** may ring multiple matched agents; **Weighted Random** and other strategies apply among the matched set.
4. **No match** — If no agent has the full skill set, the caller remains in queue until someone becomes available or timeout / next actions run.

### Example

**Set CAV sets:**

```
Agent_Skill_1 = Billing
Agent_Skill_2 = Language.English
```

**Agents:**

| Agent | Skills | Matches? |
| --- | --- | --- |
| Alice | `Billing`, `Language.English` | Yes |
| Bob | `Billing` only | No — missing `Language.English` |
| Carol | `Billing`, `Language.English`, `Language.Spanish` | Yes |

**Single caller, Single strategy:**

1. Filter to Alice and Carol
2. Dial first matched agent (per strategy / order) → if no answer, try the other

Unlike **Skills Group Routing**, there is no Group 1 / Group 2 fallback — the caller’s skill list is fixed for the entire queue stay.

## Skills Group Routing

When **Skills Routing** is enabled and the callflow sets `Agent_Skill_Group_*` variables, the queue service applies **Skills Group Routing** automatically.

### Matching rules

- An agent matches a group only when they have **all** skills listed in that group, on their user profile.
- Group numbers are integers (`1`, `2`, `3`, …). Lower numbers are higher priority in the callflow definition, but runtime selection also balances load across groups (see below).

### Per-call flow

```mermaid
flowchart TD
  A[Caller enters queue with Agent_Skill_Group vars] --> B[Assign target group]
  B --> C[Filter agents with all skills in that group]
  C --> D[Dial agents sequentially]
  D --> E{Agent answers?}
  E -->|Yes| F[Call connected]
  E -->|No| G{More agents in group?}
  G -->|Yes| D
  G -->|No| H{Other groups free?}
  H -->|Yes| I[Advance to next group]
  I --> C
  H -->|No| J[Stay on group and retry when agents free]
```

1. **Group assignment** — The queue reads `Agent_Skill_Group_*` from the call’s custom channel variables and picks a **target group** for this caller.
2. **Agent filtering** — Only idle agents who have every skill in the target group are candidates.
3. **Sequential dial** — In typical **Single** strategy, the queue dials one agent at a time within the group. Failed or unanswered attempts move to the next matching agent in the same group.
4. **Group exhaustion** — After every matching agent in the group has been tried (or is unavailable), the queue **advances to the next group** and repeats.
5. **Concurrent calls** — When multiple callers are waiting, the queue tracks which groups are already in use so new calls can be steered to other groups where possible.

### Example

**Callflow defines:**

| Group | Skills required |
| --- | --- |
| Group 1 | `Billing`, `English` |
| Group 2 | `Billing`, `Spanish` |

**Agents:**

| Agent | Skills |
| --- | --- |
| Alice | `Billing`, `English` |
| Bob | `Billing`, `English` |
| Carol | `Billing`, `Spanish` |

**Single caller:**

1. Target Group 1 → dial Alice → no answer
2. Dial Bob → no answer
3. Group 1 exhausted → switch to Group 2 → dial Carol

### Stay vs switch when a group is exhausted

- If **another group has free agents**, the caller moves to the next group.
- If **all other groups are busy** with other callers, the queue may **stay on the current group** and retry matching agents when they become available (instead of skipping to an empty group).

### CDR and reporting

The queue records skill-group progress on the call:

- **`entered_skill_groups`** — groups the caller entered during routing
- **`skill_group`** — the active group at connect time (group number and skills)

View these in **Contact Center → Reports → Queues Calls** (call detail / agent history) when skill routing was used.

## Verification

- **Contact Center → Reports → Queues Calls** — skill column and **entered skill groups** / **skill group** on call detail where enabled.
- Confirm test calls use a callflow that sets skills **before** the queue module.
- Confirm queue members have matching skills on their user profile (the queue **Agents** tab shows them).
- In the agent's web app, the call's **Call Information** shows **Agent Skills** (up to two skills), both while it rings and once answered.
- For **Individual Skills Routing**, confirm the callflow's **Set CAV** action sets `Agent_Skill_1`, `Agent_Skill_2`, … and agents have **all** listed skills.
- For **Skills Group Routing**, confirm the callflow's **Set CAV** action sets `Agent_Skill_Group_1`, `Agent_Skill_Group_2`, … and that at least one agent has **all** skills in Group 1 before expecting a connect.

## Related documentation

- [CX Queues](https://docs.qvoice.net/contact-center/home/) — queue configuration reference
- [AI Agents](https://docs.qvoice.net/contact-center/ai-agents/) — persona queues (skills routing disabled)
- User skills change events (integrators): Users Skills update events
