Postmaster filter for customer

Moderator: crythias

Post Reply
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Postmaster filter for customer

Post by spiderpig »

I would like to add a filter that if I have the custmerID or user in subject line of an email that I send to OTRS, then the ticket will update the customer of the ticket, not the sender of the email.

I'm not quite sure what value I should use when I'm creating the filter.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Postmaster filter for customer

Post by crythias »

Like this perhaps? viewtopic.php?t=16121#p62033
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
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Re: Postmaster filter for customer

Post by spiderpig »

Hi,

I tried this without a luck

created a postfilter with

email header: Body - Look for value: #customer:([\w%-\.]+@[\w\.-]+\.[\w\.]{2,9})
Set email header: Set X-OTRS-CustomerUser - set value: [***] (I can only choose CustomerUser or CustomerNO, not Customer like in your other post)
and then I forwarded email to OTRS with this in the Body #customer:realcustomer@realdomain.com

the only changes was that now there are no customer linked, not the agent like before.
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Re: Postmaster filter for customer

Post by spiderpig »

did I missed something, or did I do it wrong?
:)
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Postmaster filter for customer

Post by crythias »

Try CustomerNO.
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
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Re: Postmaster filter for customer

Post by spiderpig »

now when I open the ticket the customerID is right, but in the "Customer Information" dialog below is my infomation?
how could I change that also?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Postmaster filter for customer

Post by crythias »

I guess you might change it to also use

#customerlogon
CustomerUser

Or maybe even add From via SysConfig and pass

#from
as the customer's email address
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
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Re: Postmaster filter for customer

Post by spiderpig »

do you mean something like this?


email header: Body - Look for value: #customer:([\w%-\.]+@[\w\.-]+\.[\w\.]{2,9})
---
Set email header: Set X-OTRS-CustomerNO - set value: [***]

Body in email:
#customer:realcustomer@realdomain.com
#customerlogon:realcustomer@realdomain.com
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Re: Postmaster filter for customer

Post by spiderpig »

Hi,

I tried to use

in the body #customerlogon:([a-zA-Z0-9-_.]+@[a-zA-Z0-9-_.]
and CustomerUser [***]

it catch some of the users and assign the right customer, but just some of them. I am confused why.
in the message log the filter is successful on these tickets that customer is not assigned.
Kernel::System::PostMaster::Filter::MatchDBSource successful Filter
any ideas how to fix this?
You do not have the required permissions to view the files attached to this post.
Post Reply