Assign new ticket to one of the online agent with same queue

English! place to talk about development, programming and coding
Post Reply
malikKhan91
Znuny newbie
Posts: 15
Joined: 25 Jul 2014, 08:52
Znuny Version: 3.3.8
Real Name: malik
Company: M & GS

Assign new ticket to one of the online agent with same queue

Post by malikKhan91 »

Hello there. I need to customize OTRS. By default, when a new ticket is opened, it is automatically assigned to admin OTRS. But what i want is, when a new ticket is opened, OTRS should first identify the queue to which ticket belongs and the agent group or the agents associated wih that queue. Then it should identify which of those agents are online and assign the ticket to anyone of them. If No one is online, then it should assign the ticket to a constant value, lets say to agent "Alex", whenever no agent is online.

How can I do that, Kindly elaborate in detail as i am an OTRS newbie and if there are any code changes, i wont be able to do that unless with full detail and any example or sample code. Thanks....
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Assign new ticket to one of the online agent with same q

Post by jojo »

this would requires loads of development.

Or just get https://www.otrs.com/feature-add-on/ticket-allocation/ (Service contract needed)
"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
malikKhan91
Znuny newbie
Posts: 15
Joined: 25 Jul 2014, 08:52
Znuny Version: 3.3.8
Real Name: malik
Company: M & GS

Re: Assign new ticket to one of the online agent with same q

Post by malikKhan91 »

No i want to develop it on my own. can you please help me?
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Assign new ticket to one of the online agent with same q

Post by jojo »

please read the developer manuals. Deep knowledge on OTRS functionality is needed, no job for a newbie as you describe yourself
"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
malikKhan91
Znuny newbie
Posts: 15
Joined: 25 Jul 2014, 08:52
Znuny Version: 3.3.8
Real Name: malik
Company: M & GS

Re: Assign new ticket to one of the online agent with same q

Post by malikKhan91 »

Well, thats worrying.... :( i am reading the developer's manual................ Kindly if you can help me more, any links, any similar tasks performed? Anything which can give me the overview of whic files are needed to be changed and how can i change that!
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Assign new ticket to one of the online agent with same q

Post by reneeb »

On a first guess, I would implement it this way:

* Create a ticket event module (example: https://gist.github.com/reneeb/9385477)
-> Get the group of the queue (GetQueueGroupID, see http://otrs.perl-services.de/docs/otrs/ ... queue.html)
-> Get all members of that group (GroupMemberList, see http://otrs.perl-services.de/docs/otrs/ ... group.html)
-> Find out what agent is online (see https://github.com/OTRS/otrs/blob/rel-3 ... rOnline.pm)
-> assign the ticket to one of those agents
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Assign new ticket to one of the online agent with same q

Post by crythias »

viewtopic.php?f=53&t=16009#p82253

You don't really need or want to do this, probably. It incurs more problems than you think it fixes.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
malikKhan91
Znuny newbie
Posts: 15
Joined: 25 Jul 2014, 08:52
Znuny Version: 3.3.8
Real Name: malik
Company: M & GS

Re: Assign new ticket to one of the online agent with same q

Post by malikKhan91 »

@reneeb:
What does a ticket event module does?? Kindly explain a bit please....
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Assign new ticket to one of the online agent with same q

Post by reneeb »

When a ticket is created or changed a so called "event" is fired (see https://github.com/OTRS/otrs/blob/rel-3 ... et.pm#L577). You can register modules for those events that are called when the event occurs.

You should have a look at the "Noticiations (Event)" or the event based GenericAgent. That works with the same mechanism.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
masoodfarooq91
Znuny newbie
Posts: 60
Joined: 03 Jul 2014, 11:20
Znuny Version: version3.3
Real Name: masood farooq malik
Company: expertflow

Re: Assign new ticket to one of the online agent with same q

Post by masoodfarooq91 »

@reneeb:
Hello there sir! I also have to to the exact same task, I have seen your reply:
* Create a ticket event module (example: https://gist.github.com/reneeb/9385477)
-> Get the group of the queue (GetQueueGroupID, see http://otrs.perl-services.de/docs/otrs/ ... queue.html)
-> Get all members of that group (GroupMemberList, see http://otrs.perl-services.de/docs/otrs/ ... group.html)
-> Find out what agent is online (see https://github.com/OTRS/otrs/blob/rel-3 ... rOnline.pm)
-> assign the ticket to one of those agents
I also couldn't understand the first task, creating a ticket module, what does it do and how to create it, you have given the example but it is too generic. can you give me some more specific example please, what should be in this module, path where i ave to put it etc,, like you had help me once in my previous task at this topic :

viewtopic.php?f=62&t=25860,

This reply:
Create a config file that adds the dashboard -> see https://github.com/OTRS/otrs/blob/rel-3 ... .xml#L5567
it helped me alot , i clearly understood how to create a new xml configuration file and the path where i have to put this new file,

Please elaborate a litte in this cse as well. Thanks.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Assign new ticket to one of the online agent with same q

Post by jojo »

Guys, you sound as newbies in OTRS and PERL development. This task is a complex one. GO and hire expoerienced OTRS developer or buy a already existing module.

You got more than enough hints.
"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
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Assign new ticket to one of the online agent with same q

Post by reneeb »

A sample ticket event module can be found at https://gist.github.com/reneeb/9385477

The path of the Perl module is mentioned in the code...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

Re: Assign new ticket to one of the online agent with same q

Post by williamrobert1983 »

Try to read developer manual and create your own module under the GenericAgent .
nedmaj
Znuny expert
Posts: 167
Joined: 26 Nov 2014, 20:34
Znuny Version: 6.3.4
Real Name: Samuel Casimiro
Company: Câmara dos Deputados
Contact:

Re: Assign new ticket to one of the online agent with same queue

Post by nedmaj »

Hi guys,

My apologies to post in such a old topic.

I've just realize that it's possible to achieve something similar using a data base trigger. Notifications and other events, unfortunately, would be bypassed.

I'm working on a trigger to do just that. I'll post here asap.

[]s
Samuel

Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
Post Reply