
Hi Ralph, On Fri, Sep 20, 2002 at 01:51:52PM +0200, Ralph M?ller wrote:
since a while I am playing around with otrs, and I have to say it is really hot stuff!
Nice! :)) Thanks!
Now I have a question concerning the customer ID. Is it possible to assign the customer ID automaticaly, for instance according the domain-part of the sender address (when a new mail arrives and opens a new ticket)? And is it possible to assing a customer-name to a customer ID? This would make it easier to search cases from a particular customer.
Yes, you can do. At first, the design of OTRS is to use an external customer
db. Normally there is (in the most cases) an existing customer db.
How can you assign a customer ID automaticaly with domain:
==========================================================
You can do this with procmail. Add the follwing after "Remove all X-OTRS".
[~otrs/.procmailrc]
# --
# Remove all X-OTRS Header (allow this only for trusted email)
# e. g. from *@example.com
# --
:0 fhw :
* !^X-OTRS-Ident: ahfiw2Fw32r230dddl2foeo3r
| grep -vi '^X-OTRS-'
## START OF OUR EXAMPLE
# --
# find FROM and add domain to X-OTRS-CustomerNo
# --
:0hc
FROM=| formail -X "From:"|perl -e '$i=<STDIN>; $i=~s/^From: //;$i=~s/\(.*?\)//;$i=~s/<(.*?)>/$1/;$i=~s/ //g;$i=~s/.*@(.*)/$1/;print $i'
:0 fhw :
| formail -I "X-OTRS-CustomerNo: $FROM"
## END OF OUR EXAMPLE
[...]
Note: If the shell of the otrs user is /bin/false (default) you have to add on the
top of the procmailrc "SHELL=/bin/bash":
[...]
SYS_HOME=$HOME
SHELL=/bin/bash
PATH=/bin:/usr/bin:/usr/local/bin
MONTHFOLDER=`date +%Y-%m`
[...]
This is just an example. You also can call an CMD program (not this perl -e stuff)
which do lookups in your own customer db.
You also can do queue filtering with procmail (http://otrs.org/pages/index.pl?Action=Ext&Site=Docu/xheader_otrs_queue.html).
How can you link your customer db with otrs:
============================================
If your customer db has a web frontend. So add an html link in the dtl templates
e. g. Kernel/Output/HTML/Standard/TicketView.dtl ->
"http://yourdb/customer.php?CustomerID=$Data{"CustomerID"}">$Data{"CustomerID"}</a>"
Click on this link and the customer data will be shown.
If you don't have a web frontend. Write a little CMD program like "show_customer.sh"
or "show_customer.pl" with an argument as customer id. Add to the dtl where
the customer data should be the following:
[...]
<table>
<tr>
<td>
Customer Info:
</td>
<td>
An other wish is a reminder time/date. It would be nice, if I could give a ticket the status 'waiting_for_reminder' together with a response deadline, after which the ticket would come up again. This would be helpful if one have sent an answer to a customer, but the customer does not response. After the reminder has expired, one can contact the customer again or close the case.
This is planed for 0.5 Beta9. :)
Thanks again for your great work! By Ralph
Martin -- Martin Edenhofer - <martin at edenhofer.de> - http://martin.edenhofer.de/ -- Perfection is our goal, excellence will be tolerated. -- J. Yahl