How to set FreeText fields for new cases through email

Moderator: crythias

Locked
cyril
Znuny newbie
Posts: 4
Joined: 07 Jun 2011, 00:44
Znuny Version: 3.0
Real Name: Cyril Bouteille
Company: Koinz Media, Inc.

How to set FreeText fields for new cases through email

Post by cyril »

Hello, we set up a couple of FreeText fields in our OTRS installation, which behave fine when we create tickets manually, but we were not able to find a way to set those FreeText fields automatically when creating new cases through email.

I could not find any documentation on how to do that. Is it possible?
We tried setting the following email headers in vain, and none seem to be processed by OTRS to set the value in any of the FreeText columns in the db.
X-OTRS-TicketValue1
X-OTRS-TicketKey1
X-OTRS-Ticketpin
X-OTRS-TicketFreeText1

Does anyone know if/how FreeText fields can be set through an email message?
Thank you!
Cyril
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to set FreeText fields for new cases through email

Post by crythias »

PostmasterFilter. Match something, set something.
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
cyril
Znuny newbie
Posts: 4
Joined: 07 Jun 2011, 00:44
Znuny Version: 3.0
Real Name: Cyril Bouteille
Company: Koinz Media, Inc.

Re: How to set FreeText fields for new cases through email

Post by cyril »

Hi, I did check this out already, but the set only allows email headers, so I'm not clear how to set the FreeText field directly.
Is resetting the same incoming header supposed to do the trick?
Could you please elaborate with an example of how you'd create a filter to get TicketKey1 processed?
How would I match any in the filter part?
How would I refer to the matched value in the set part?
And how would such a mapping doing anything since it's just resetting a header already incoming??
I'm missing something here... :?
Thanks!
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to set FreeText fields for new cases through email

Post by crythias »

The body, subject, sender, recipient, etc... of the message would include something that would trigger ...

So, if your human eyes would know what the trigger is, then you can aim for that in the filter.

Match the body

Code: Select all

TicketText1: ([Ss][Oo][Mm][Ee][Tt][Hh][Ii][Nn][Gg])
Set
x-otrs-ticketkey1: a label for the data
x-otrs-ticketvalue1: [***] (but I'd not necessarily do this, unless I'm prepared for the randomness that could fill it. YMMV

don't forget to search the forums.
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
cyril
Znuny newbie
Posts: 4
Joined: 07 Jun 2011, 00:44
Znuny Version: 3.0
Real Name: Cyril Bouteille
Company: Koinz Media, Inc.

Re: How to set FreeText fields for new cases through email

Post by cyril »

The email sent to OTRS is generated by our web app, which already set those x-otrs headers in the email, so I don't need to parse out anything from the body. I just need OTRS to process those X-OTRS headers and I can't seem to be able to get it to...
Is a PostmasterFilter necessary if the email already contains the appropriate X-OTRS headers?
If not, what am I missing? Is there some mapping I need to do somewhere between the X-OTRS header and the DB column??
I have been searching the forums, but have not found any example relevant to my use case. I'd definitely appreciate a link if you know of any.
Thanks!
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to set FreeText fields for new cases through email

Post by crythias »

You must "trust" the Postmaster Mail Account
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
cyril
Znuny newbie
Posts: 4
Joined: 07 Jun 2011, 00:44
Znuny Version: 3.0
Real Name: Cyril Bouteille
Company: Koinz Media, Inc.

Re: How to set FreeText fields for new cases through email

Post by cyril »

I just verified the Email Account is Trusted=Yes indeed. Anything else?
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: How to set FreeText fields for new cases through email

Post by kruegerM »

I'm in the same quandry. In my email headers, I set values for X-OTRS-Type and X-OTRS-Service - they both are picked up fine. However, if I set X-OTRS-TicketValue1, the value doesn't get to the ticket. Same is true with filters. If I set X-OTRS-Type or X-OTRS-Service in the filter, they affect the ticket. If I set X-OTRS-TicketValue1, still doesn't show up in the ticket.
I'm lost...
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to set FreeText fields for new cases through email

Post by crythias »

value and key must be set.
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
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: How to set FreeText fields for new cases through email

Post by kruegerM »

Ok - I have set both the key and the value - still no luck, whether set in the email header or the postmaster filter. Also have verified email is trusted.
Question: If I have pre-defined freetext fields, does this let me populate them, or only freetext fields not already in use. (I hope that makes sense).
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: How to set FreeText fields for new cases through email

Post by kruegerM »

Sem-Success Update: X-Headers set in the PostMaster Filter are working! I had selected freevalue twice instead of freekey and freevalue. Did the same in my email setup. Fixed them both and now the setting in the PostMaster Filter is working (YES!).
Still haven't gotten the one in the email to work ... have this feeling it's something I'm overlooking......................
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: How to set FreeText fields for new cases through email

Post by kruegerM »

SUCCESS!
There is joy in Mudville! Email had a typo - I had 'ticketfreekey2' and 'ticketfreevalue2' instead of 'ticketkey2' and 'ticketvalue2'.
Thanx all - it does work when the t's and i's are properly dispatched 8)


...though no world is perfect ... I can't get X-OTRS-TicketTime1 to work....................
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to set FreeText fields for new cases through email

Post by crythias »

See if System Log throws some sort of error for the time.
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
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: How to set FreeText fields for new cases through email

Post by kruegerM »

Good catch - error states:Invalid Date '2011/12/31'

I've tried: 2011/12/31 00:00:00
2011/12/31 12:00:00
12/31/2011 12:00:00

What is the format for freetime fields? I can't find it in any docs.
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: How to set FreeText fields for new cases through email

Post by kruegerM »

Maybe I should send myself emails...

The minute I looked at my last posting it dawned on me. Use dashes instead of slashes.

so 2011-12-31 00:00:00 works.

(hey - at least slashes rhymes with dashes ... right?)
Locked