Custom GenericAgent script?

Moderator: crythias

Locked
nking
Znuny newbie
Posts: 35
Joined: 07 May 2012, 19:56
Znuny Version: OTRS 3.0
Real Name: Natalia King
Company: Lyons Consulting Group
Location: Chicago, Illinois
Contact:

Custom GenericAgent script?

Post by nking »

We have just recently got involved with a new Customer who requires very fast response. For example, for High Priority tickets, we are required to respond within 30 minutes. What I need to accomplish is a custom script that runs at least every 5 minutes or more frequently, and moves tickets from High Priority queue to Emergency queue if they were not responded to within a few minutes. I tried using GenericAgent option that looks for tickets in High Priority queue that were created "before 1 minute". However, this is not fast enough because GenericAgent runs every 10 minutes, and it just needs to be a little quicker than that... Is there a way to create something like CustomGenericAgent.pl file and add it to cron?
OTRS 3.0, CentOS 5.5
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Custom GenericAgent script?

Post by jojo »

yes, you can.

create a new GenericAgentEmergency.pm file in Kernel/Config (copy the GenericAgent.pm.example)
change it according to your needs


create a cronjob which triggers every minute:

Code: Select all

otrs.GenericAgent.pl -c 'Kernel::Config::GenericAgentEmergency'
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
nking
Znuny newbie
Posts: 35
Joined: 07 May 2012, 19:56
Znuny Version: OTRS 3.0
Real Name: Natalia King
Company: Lyons Consulting Group
Location: Chicago, Illinois
Contact:

Re: Custom GenericAgent script?

Post by nking »

Code: Select all

    'move all High Priority tickets from abc to Emergency' => {
        # get all tickets with these properties
        Queue => 'Problem::High Priority',
        CustomerNo => ['abc'],
        # new ticket properties
        New => {
            Queue => 'Problem::Emergency!',
            Owner => 'abc@abc.com',           
        },
    },
Does that look about right?
OTRS 3.0, CentOS 5.5
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Custom GenericAgent script?

Post by jojo »

why there are square brakets around the customer number?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
nking
Znuny newbie
Posts: 35
Joined: 07 May 2012, 19:56
Znuny Version: OTRS 3.0
Real Name: Natalia King
Company: Lyons Consulting Group
Location: Chicago, Illinois
Contact:

Re: Custom GenericAgent script?

Post by nking »

I was modifying this part:

Code: Select all

Queue => 'Problem::High Priority',
        Priorities => ['3 normal'],
But you are right, I dont need them. I just wanted to make sure 'CustomerNo' is the attribute I should use to make sure it only moves tickets for that particular client
OTRS 3.0, CentOS 5.5
Locked