Sorting queues by last customer contact (2.4.x/3.0.x)

Locked
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Sorting queues by last customer contact (2.4.x/3.0.x)

Post by Daniel Obee »

edit 9/21/2011: 3.0.x Version to be found here: http://forums.otrs.org/viewtopic.php?f=21&t=4619#p45355

(English translation of http://forums.otrs.org/viewtopic.php?f=21&t=4583, please check there for downloading the 2.4.x files.)

Hi all.

Since a couple of years OTRS does a good job serving as the main customer care tool at MyHammer. One thing that bugged us though was the ticket sorting by age, ignoring the in-between communication with the customer.

The xxx (http://www.otrs.com) was kind enough to help us with a customized module that solves that problem. Though customized to our needs, I'm sure it might be of use in other scenarios too.

How it works:
Depending on the status of the ticket and the last sender (customer or agent), a customer contact updates a FreetimeField with the timestamp of the last contact and a FreetextField with the last sender. FreeText and FreeTime fields are configurable in SysCofig. For a matrix which tells you when an update is made, please refer to the documentation.

The queues are now sorted by the Freetime fields containing the last customer contact instead of ticket age (priority still be the first sorting attribute).

The module is easy to install and de-install again. (If you decide to de-install again you might have to manually clean the ticket table from set Freetext and Freetime fields though.) Please keep in mind that already existing tickets will have no information about sender and last customer contact, so correct sorting might take a while.

Feel free to use the module if you like it. Would be nice to drop me a line though, if you like it (or not).

Greets,
Daniel
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sorting queues by last customer contact (module for 2.4.

Post by Daniel Obee »

Question arose how to transfer the sorting into the dashboard tickets. It's quite simple: Alter the corresponding Attritbutes in Ticket -> Frontend::Agent::Dashboard and enter

Code: Select all

SortBy=TicketFreeTime1;
respectivly to another TicketFreeTime1 if you changed the default settings for the module.

Greets
Daniel
maigner
Znuny newbie
Posts: 12
Joined: 24 Sep 2007, 09:28

Re: Sorting queues by last customer contact (module for 2.4.

Post by maigner »

Hi Daniel,

now it works in Dashboard too :-))

Thanks a lot !


Best regards
Martin
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sorting queues by last customer contact (module for 2.4.

Post by Daniel Obee »

If you've gone that far you might wanna take a look at the Dashboard Mod in http://forums.otrs.org/viewtopic.php?f=64&t=7203

You might also try to show new and open tickets in one by adding two status in that line (Attributes):

Code: Select all

StateType=new;StateType=open;SortBy=TicketFreeTime1;OrderBy=Up;
Doing that you can reduce the ticket displaya "new" and "open" to one and have a broad overview on what's next to do. Worked best for us.

Greets
Daniel
nold
Znuny newbie
Posts: 2
Joined: 26 Nov 2009, 22:13
Znuny Version: OTRS2.4.7 ITSM2.0.3

Re: Sorting queues by last customer contact (module for 2.4.

Post by nold »

Hi Daniel,

thanks for this module!
I tried it today on our test machine (OTRS 2.4.7) and it looks quite interesting. I will discuss with my teammates if it might be helpful for them.
BTW: have you ever tried this module with OTRS 3? Do you have any plans to migrate your 2.4.x system to 3.0? (We plan to migrate in april)
Regards
Florian
-----------------------------------------------------
OTRS 2.4.7, ITSM 2.0.3, SLES 10 SP2
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sorting queues by last customer contact (module for 2.4.

Post by Daniel Obee »

Hi.

Actually I already installed the module on a 3.0.x. The module works without further changes - you just have to change the version control in the opm file.

I didn't do any extended testing but there's no reason it shouldn't work in 3.0 since the module doesn't touch any system files.

Greets
Daniel
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by Daniel Obee »

Hey all,

I put some time in porting the module to 3.0.x a while ago. Now there's an updated package which fixes some minor bugs.

Greets
Dan
You do not have the required permissions to view the files attached to this post.
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by HervE »

Hi Dan,

The sorting works fine, but besides I'd like to display the last customer contact time (or better: duration since it) in the dashboard instead of the age of the ticket.

So from SysConfig I edited Ticket -> Frontend::Agent::Dashboard and modified DashboardBackend###0120-TicketNew (and DashboardBackend###0130-TicketOpen) Time=TicketFreeTime1 instead of Time=Age.
Unfortunately it doesn't work. It only displays the constant value of 33m - for those which have a FreeTime1 value - and 0 - for those which don't.

An idea?

Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
bloombox
Znuny newbie
Posts: 1
Joined: 07 Sep 2012, 10:58
Znuny Version: Version 3.1
Real Name: Jens Hauser
Company: Bloombox GmbH

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by bloombox »

Hi,

is/ will there be an update for 3.1.x version?

Best regards,
JEns
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by Daniel Obee »

bloombox wrote:Hi,

is/ will there be an update for 3.1.x version?

Best regards,
JEns
There's a 3.0 version downloadable at znuny.com, a version for 3.1 is not yet available. I talked to Martin Edenhofer of znuny - 3.1's architecture makes it much more difficult o archive the same result. If interested you may ask him directly if there's a solution.

Greets
Daniel
FragArena
Znuny newbie
Posts: 3
Joined: 10 Sep 2012, 17:33
Znuny Version: 3.0.11

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by FragArena »

Hello,

isn´t it poosible to use dynamic fields to get the same result as using the myhammer AddOn?

Greets

Frank
--
Frank Schumacher
attachmentsfucker
Znuny newbie
Posts: 1
Joined: 29 Nov 2012, 13:29
Znuny Version: 3.1.11

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by attachmentsfucker »

If I am not mistaken this feature seems to be included in 3.1.x now. This URL is working for me without any modifications: /otrs/index.pl?Action=AgentTicketQueue;SortBy=Changed

I added this in my Config.pm so it was default:
$Self->{'Ticket::Frontend::AgentTicketQueue'}->{'SortBy::Default'} = 'Changed';
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by Daniel Obee »

attachmentsfucker wrote:If I am not mistaken this feature seems to be included in 3.1.x now. This URL is working for me without any modifications: /otrs/index.pl?Action=AgentTicketQueue;SortBy=Changed

I added this in my Config.pm so it was default:
$Self->{'Ticket::Frontend::AgentTicketQueue'}->{'SortBy::Default'} = 'Changed';
The change date not necessarily represents the date of the last customer contact. Changes to the ticket for example include priority changes, queue changes, agent notes and other events that the customer won't notice.

E. g. you got a ticket containing a complex customer request. It often travels between different departments. Sorting by change date will have the ticket buried at the bottom of the queue each time it changes queues. The result: The customer waits a lifetime for the answer.

Or take a simple priority change: The ticket will drop to the end of the lane _because_ you changed priority.

Another good one: a customer sends another email to ask why he didn't get an answer by now. Guess what happens to his ticket...

The module though only recognizes true customer contacts as event. Thus none of the fore-mentioned events would unwillingly change the position of the ticket in the queue. Even consecutive mails are ignored as long as the ticket was untouched (read: no additional, agent-driven customer contact has been logged and the ticket hasn't been closed meanwhile).

Dealing with > 50 tickets the day you'll quickly realize the difference. At least you're customers will :)

Greets
Daniel
Rene_1981
Znuny newbie
Posts: 7
Joined: 26 Apr 2011, 16:39
Znuny Version: 2.4.9
Real Name: Rene

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by Rene_1981 »

I got this installed in OTRS 2.4.12. Our company needs to stay on this version.

The Ticket in the dashboard is changing the position to the top when a new reply is received, but the time next to it doesn't change.

Any Idea why?

Also Is there any possibility to mark in the dashboard these tickets which are on top because of a new answer as it is in otrs 3.xx? Maybe Star or just change the textcolor?


best regards
René
shridhar
Znuny newbie
Posts: 13
Joined: 13 Nov 2013, 12:57
Znuny Version: OTRS 3.0.10
Real Name: Shridhar
Company: e.Soft Technologies

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by shridhar »

I got this installed in OTRS 2.4.12. Our company needs to stay on this version.
The Ticket in the dashboard is changing the position to the top when a new reply is received, but the time next to it doesn't change.
Any Idea why?
Also Is there any possibility to mark in the dashboard these tickets which are on top because of a new answer as it is in otrs 3.xx? Maybe Star or just change the textcolor?


Can any one suggest the solution to above question? even i am awaiting for the same answer :)
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by jojo »

2.4 is outdated, not supported and also there are no security fixes.

3.3. has the Stars and also the possibility to sort on last change in dashboard
"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
voiprodrigo
Znuny newbie
Posts: 62
Joined: 03 Dec 2014, 18:49
Znuny Version: OTRS 4
Location: Portugal
Contact:

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by voiprodrigo »

Hello,

I'm taking a look at this add-on. There's one thing I'm not getting about it: if the purpose is sort by last customer contact, so those can be more easily identifiable, why would we want to update the contact timestamp when it's the agent updating the customer? Isn't the whole point to better track customer replies?

rgds
Linux (Ubuntu 14.04.1 LTS) | MySQL 5.5.40 | OTRS 4.0.7
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by Daniel Obee »

voiprodrigo wrote:Hello,

I'm taking a look at this add-on. There's one thing I'm not getting about it: if the purpose is sort by last customer contact, so those can be more easily identifiable, why would we want to update the contact timestamp when it's the agent updating the customer? Isn't the whole point to better track customer replies?

rgds
As a mail to the customer is a "contact" it's helpful (and necesssary for the module) to log them too.

To get this straight it might be good to remind how it should work: If a customer sends an email, the new ticket is queued last in the queue. Answering gets the ticket closed. Now the customer writes again.

By standard, the ticket would pop up first in the queue because it's the oldest. The module alters this behavior as it sets the "last customer contact" to the new timestamp. Thus the ticket gets queued last again (as other customers already wait longer for an answer). It does so too if it's just re-opened as the timestamp is the one of the agent's reply.

So the basic function is: updating the timestamp sends the ticket _down_ in the queue.

What happens if the customer sends additional information or a "what about my ticket?" message _before_ the agent answers? The module checks for an answer and does not re-new the timestamp to prevent the ticket from being sent down the queue again. Doing so the customer cannot "prevent" you from answering the ticket by constantly sending it down the queue again.

Hope that helps...

Daniel
voiprodrigo
Znuny newbie
Posts: 62
Joined: 03 Dec 2014, 18:49
Znuny Version: OTRS 4
Location: Portugal
Contact:

Re: Sorting queues by last customer contact (2.4.x/3.0.x)

Post by voiprodrigo »

Hello Daniel,

Thanks for your explanation, clearly I was thinking about this differently in terms of use case.

Best regards
Linux (Ubuntu 14.04.1 LTS) | MySQL 5.5.40 | OTRS 4.0.7
Locked