Sprache wechseln auf deutsch
Znuny Professional Services

The ((OTRS)) Community Edition Fork with long-term Support (LTS)

Automatic Priority Increase

Many tasks are programmable with the generic agent, but a little-known secret is how to use generic agent modules to increase efficiency. In this use case, we want to make use of a freely available generic agent module to increase the priority based on your own schedule.

We can approach this in many ways, but in this case, we want to run the task every day and see if tickets of state new need an increase in priority, ensuring that the service chain remains intact.

Let's say we have a queue where requests take too long to process. Let's automate the task of increasing the priority.

We can select many ticket filter options and set options in the administration interface. In our case, all new tickets not answered in the last 7 days (See Module Settings), should receive some love and be promoted to the next higher priority.

In the interface, we can filter for tickets meeting our criteria and have the generic agent run every day at 08:00 A.M to evaluate these. The generic interface cannot know the next higher priority unless we have hard-wired this and created 5 generic agents to fill the bill.

Luckily, Znuny offers the option to make changes to tickets using Perl modules. There is also a module already included to do this task. The module's name is

Kernel::System::GenericAgent::AutoPriorityIncrease

To use this module, we need only one generic agent and need to know the configuration options for the module.

Module Settings:

In this case, the only key is TimeInterval. This value is an integer representing the minutes since the last automatic priority increase.

Program Schedule:

Generic Agent Schedule Settings
Fig. 1 - Schedule settings

Set your filter accordingly:

The job looks at each ticket in the new state at 08:00 A.M. Monday - Friday. If the there has been no priority escalation since creation the TimeInterval is compared to the create time, otherwise it's compared to the last time the ticket was automatically increased. If the time span is higher, the priority is increased by one to the next higher priority (defined by Database ID in ticket_priority). If the ticket remains untouched for another week, it will increase again becoming ever more present and visible.

Ticket Selection Settings
Fig. 2 - Ticket filter setting

Default priorities:

    MariaDB [znuny]> SELECT id,name FROM ticket_priority WHERE valid_id=1;
    +----+-------------+
    | id | name        |
    +----+-------------+
    |  1 | 1 very low  |
    |  2 | 2 low       |
    |  3 | 3 normal    |
    |  4 | 4 high      |
    |  5 | 5 very high |
    +----+-------------+

Add the module name to the following section, and set the time interval to 604800 (one week.)

Generic Agent Custom Module Settings
Fig 3 - Custom module settings

Be creative and automate your way to success.

Have fun with Znuny ❤️!