"X-OTRS-CustomerUser" header when replying to notifications

Moderator: crythias

Locked
amdc
Znuny newbie
Posts: 15
Joined: 28 Jun 2012, 03:53
Znuny Version: 3.1.5
Real Name: Alvin

"X-OTRS-CustomerUser" header when replying to notifications

Post by amdc »

Hello All /Crythias/Jojo,

I have been working on trying to filter different "customers" on each "customer-email external" articles created on a certain ticket,

-- been searching around OTRS forums about postmaster filters and im really happy that I did learn a lot from them which led me to create these filter rules though im not yet sure if its even possible :) at this point in time im trying to get it done for the first 2 customers in the list.

My Goal is to be able to send notifications to the filtered "customer", one at a time(per article type ->customer-email external)


Here are the following Post mail Filters being used ( btw- im just starting in Regex, credit goes to Crythias i used some samples from him in this forum :) )

1. Filter to capture Customer1
Filter condition
Header 1 - Body Value 1 - Customer1:\s([a-zA-Z0-9_\-\.]+)@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})
Header 2 - Delivered-To Value 2 - otrs@domain.com
Header 3 - Subject Value 3 - ^Team1*

Set email headers
Header 1 - X-OTRS-CustomerUser Value 1 - [***]
Header 2 - X-OTRS-Queue Value 2 - Queue1

2. Filter to capture Customer2
Filter condition
Header 1 - Body Value 1 - >\sCustomer2:\s([a-zA-Z0-9_\-\.]+)@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})
Header 2 - Reply-To(the following headers has also been tested-->Replyto/in-reply-to/To/delivered-to) Value 2 - otrs@domain.com
Header 3 - Subject Value 3 - Choose\sa\scolor$

Set email headers
Header 1 - X-OTRS-CustomerUser Value 1 - [***]

Here are the Notifications being used

1. Notification1
Recipient Group: Customer
Event: TicketCreate
State: New
Queue: Queue1


<Template>
Subject: Choose a color
Text:
HI <OTRS_CUSTOMER_DATA_UserFirstname>,

Please choose a color

Here are your District Members:

<OTRS_CUSTOMER_EMAIL[16]>

Regards,

2. Notification2
Recipient Group: Customer
Event: ArticleCreate
Queue: Queue1
Article type: email-external
Subject: Choose a color

<Template>
Subject: Choose a weapon
Text:
HI <OTRS_CUSTOMER_DATA_UserFirstname>,

Please choose a weapon

May the odds be ever in your Favor

Regards,


Now here is the actual workflow that has been tested with their corresponding outcome
--------------------------------------------------------------
Step 1. created mail delivered to OTRS ==filter to capture Customer1 as X-OTRS-CustomerUser ------->>>Success

Subject: Team1

Body:

Customer1: user1@domain.com

Customer2: user2@domain.com

----------------------------------------------------------------
Step 2. notification1 sent to Customer1 -------->>>Success
----------------------------------------------------------------
Step 3. Customer1 replied to notification1 ==filter to capture Customer2 as X-OTRS-CustomerUser--------->>>Failed
----------------------------------------------------------------
Step 4. notification2 sent to Customer2 --------->>>Failed, it was sent to the current customer (Customer1) when article(2nd customer-email external) was created
----------------------------------------------------------------



I successfully filtered "Customer1" to reflect the X-OTRSCustomerUser the first time that the email was delivered to OTRS but not when Customer1 replied to notification1

I have tried changing my regex filters to reflect the characters ">" and "white space" that seemed to have appeared in the notification header "<OTRS_CUSTOMER_EMAIL[16]>"

below is the mail body when Customer1 is replying to notification1(Step 3)
======================================================
I want blue!!!!!
----- Original Message -----
From: "OTRS" <otrs@domain.com>
To: <user1@domain.com>
Sent: Monday, December 10, 2012 1:10 PM
Subject: [Ticket#1001186] Choose a color


HI Customer1,

Please choose a color

Here are your District Members:

> Customer1: user1@domain.com
>
> Customer2: user2@domain.com
>

Regards,
======================================================


I also tried to include the said changes on Customer1's reply to notification1 - but still failed
=======================================================
I want blue!!!!!
> Customer2: user2@domain.com
----- Original Message -----
From: "OTRS" <otrs@domain.com>
To: <user1@domain.com>
Sent: Monday, December 10, 2012 1:10 PM
Subject: [Ticket#1001186] Choose a color


HI Customer1,

Please choose a color

Here are your District Members:

> Customer1: user1@domain.com
>
> Customer2: user2@domain.com
>

Regards,
=======================================================




Thanks!!! - any help is appreciated
Amdc

Btw guys for this concern im using otrs 3.0.11 only, no ITSM package sad to say I wont be able to simulate this issue on my listed OTRS ver at my sig.. yeah :c
OTRS 3.1.5
FAQ, ITSM 3.1.3
Centos 5.8/6.2
amdc
Znuny newbie
Posts: 15
Joined: 28 Jun 2012, 03:53
Znuny Version: 3.1.5
Real Name: Alvin

Re: "X-OTRS-CustomerUser" header when replying to notificati

Post by amdc »

original post edited - thanks!
OTRS 3.1.5
FAQ, ITSM 3.1.3
Centos 5.8/6.2
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: "X-OTRS-CustomerUser" header when replying to notificati

Post by crythias »

A synopsis of what you're attempting to accomplish would be helpful, as well as something that ends in a question mark.
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
amdc
Znuny newbie
Posts: 15
Joined: 28 Jun 2012, 03:53
Znuny Version: 3.1.5
Real Name: Alvin

Re: "X-OTRS-CustomerUser" header when replying to notificati

Post by amdc »

Hello Crythias,

I was thinking of trying to make otrs work without the need of logging to the otrs web page for some special cases*,. lets say when it comes to "Approvals" i was thinking that it wouldn't need much agent involvement that it just needs to be routed from one customer to another (using OTRS notifications and post mail filters) until then, an agent of the queue monitoring ticket followup notifications will see that everything has been approved then thats the only time he/she would need to get to the web interface to make the necessary actions (eg. reply, close, or create a change if with ITSM). Would this be even possible?


Thank you,
Amdc
OTRS 3.1.5
FAQ, ITSM 3.1.3
Centos 5.8/6.2
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: "X-OTRS-CustomerUser" header when replying to notificati

Post by crythias »

You don't want to have to log into the system to change customers for a ticket.
You want approvals by managers to happen before you can answer the ticket.
You want to only have a ticket handled by an agent upon approval.

Set up a web form outside OTRS that handles the approval process ... that's what you give to the customers who require approval.
Upon submission, it goes to the manager via email with md5 encoded yes/no links that will go to a mini webform to deny if "no" (with a reason that responds to the submitter) or simply approve if "yes", which then releases the stored original webform data as email to OTRS, with an embedded additional header as X-OTRS-DynamicField_Approved=Yes.
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
amdc
Znuny newbie
Posts: 15
Joined: 28 Jun 2012, 03:53
Znuny Version: 3.1.5
Real Name: Alvin

Re: "X-OTRS-CustomerUser" header when replying to notificati

Post by amdc »

Hello Crythias,

You are quite correct, - Apologies for a slightly misleading synopsis..Nevertheless thank you for a great insight!, I want you to know that I will gladly explore that approach as you have laid out here, but just for the record is just that I'm trying to accomplish this without an external web form,..

Here is a more accurate explanation

The customer is requesting for approval but would need to undergo 2 Approvers

> Customer sends a mail containing details of the request which I plan to capture using Postmail filters
> But since there's a hierarchy between the 2 approvers, I was planning to capture the 2nd approver after the 1st approver has replied to the OTRS notification

At first I just thought of this idea that would seem to be doable by OTRS alone though unfortunate that I have encountered this hiccup early on as it didn't capture my value for X-OTRS-CustomerUser filter when replying to the notification.

Thank you
Amdc
OTRS 3.1.5
FAQ, ITSM 3.1.3
Centos 5.8/6.2
amdc
Znuny newbie
Posts: 15
Joined: 28 Jun 2012, 03:53
Znuny Version: 3.1.5
Real Name: Alvin

Re: "X-OTRS-CustomerUser" header when replying to notificati

Post by amdc »

Hello All,

Happy new Year :)

I would just like to know if there is still hope to this current setup that I got,

so the question would be, how would you or can you capture/filter a text (to be updated as a customer user) when replying to an OTRS Notification?

Thank you,
Amdc
OTRS 3.1.5
FAQ, ITSM 3.1.3
Centos 5.8/6.2
Locked