
I would like to suggest the following code addition to the module:
AgentCompose.pm inserted at line 264...
it is a new variable for responses called:

Hi John,
OTRS 2.0 comes with the
I would like to suggest the following code addition to the module:
AgentCompose.pm inserted at line 264...
it is a new variable for responses called:
Background, we found that we wanted to have pre-set responses but to make them sound as nice as possible we want to say:
Hi <firstname>,
The _REALNAME variable unfortunately shows a non-pretty format... This new variable works the following way:
Joe Smith < joe@smith.com mailto:joe@smith.com > converts to " Joe" Smith, Joe < joe@smith.com mailto:joe@smith.com > converts to " Joe" Joe < joe@smith.com > converts to " Joe" Mr. Joe Smith < joe@smith.com mailto:joe@smith.com > converts to " Joe " (I have to actually double check this one) < joe@smith.com mailto:joe@smith.com > converts to ""
Notice that all results except empty string have a " " (space) in front of them -- this is on purpose so that if you say:
Hi<..._REALFIRSTNAME>,
You won't wind up with a space between the "Hi" and "," if the result is nothing... but if there is a result, the space is inserted. This way the result looks exactly like it should in all cases.
It is working great so far and has saved us tons of work cleaning up responses based on what peoples email address is. Might need some tweaks over time as new emails come in but seems to do well right now.
-John
--------------------------------------------- Insert at line 264:
if ($Data{Salutation} =~ /
/) { # get realname my $From = ''; if ($Ticket{CustomerUserID}) { $From = $Self->{CustomerUserObject}->CustomerName(UserLogin => $Ticket{CustomerUserID}); } if (!$From) { $From = $Data{OrigFrom} || ''; $From =~ s/<.*>|\(.*\)|\"|;//g; $From =~ s#^.*?,##; $From =~ s# +$##; $From =~ s#^ +##; $From =~ s# +# #g;
foreach (split (' ',$From)) { if ($_ !~ m#\.#) { $From = $_; last; } }
if ($From =~ m#\@#) { $From = ""; }
if ($From ne "") { $From = " $From"; } } $Data{Salutation} =~ s/
/$From/g; } ------------------------------------------------------------------------

Hi Martin,
Hi John,
OTRS 2.0 comes with the
option. That means every customer map tag can be used. This means you can use . This should solve your problem.
-Martin
It would seem that John's solution, however, pulls the data from the incoming e-mail headers. While it certainly would be useful to be able to store such customer data in the database, will 2.0 make the "intelligent" assumptions about the sender's first name as John's proposed change will? Best, Paul
participants (3)
-
John (Versimedia)
-
Martin Edenhofer
-
Paul