---
title: "Strategy for the application of priorities in queues"
canonical: "https://help.telegra.de/space/TAK/9561593218053/Strategy%20for%20the%20application%20of%20priorities%20in%20queues"
format: markdown
---
The configured strategy for applying the priority rules determines how the set of rules affects the routing of calls in the associated queues.

![Routing strategy with priority assignment in waiting queues](media://91ba29cb-a4fa-44f4-a749-4a2e99b63d2c)


---

## Static strategy

With a static strategy, a call with the higher priority is always delivered to your agents before a call with a lower priority, regardless of the past waiting time.

### Use and calculation of static priority in routing

A function is added to the integer static priority, which supplies the values between 0 and 1, which becomes smaller the greater the waiting time. This ensures that a higher static priority always leads to a higher dynamic priority, but with the same static priority, the call with the longest waiting time receives a higher dynamic priority (i.e. a lower priority number) than the call with a shorter waiting time.

**Formula:**

```
dynamicPriority = call->getStaticPriority()+1.0/(waitingtime+1.0);
```

---

## Weighted strategy

With a weighted strategy, a long-waiting call with a low priority can also be given priority over a call with a better priority that has not been waiting as long. This can prevent low priority calls from "starving" in the queue. This can happen especially if you have a high volume of calls in your queues and the chance of delivery for calls with a low priority would otherwise decrease dramatically.

### Use and calculation of weighted priority in routing

If the weighted strategy is used, an exponential function of the static priority is multiplied by the waiting time, so that for calls with the same waiting time, the call with the higher priority is preferred, but calls with a lower priority can also gain priority if their waiting time is significantly greater.

This strategy ensures that calls with a low priority do not starve in the queue, should calls with a higher priority be constantly accepted in the queue. Thus, a call with a priority number higher by 1 (i.e. lower priority) has to wait longer by the corresponding factor to reach the same dynamic priority.

**Formula:**

```
dynamicPriority = pow(WEIGHTED_STRATEGY_FACTOR, (double) call->getStaticPriority())/(waitingtime+1.0);
```