Create a ticket in OTRS from any webform without API calls

From OtterHub - OTRS Community Wiki
Jump to: navigation, search

If all you want to do is provide a form for a user to fill out, you can do that without API calls. Just make a form and have it send the information to OTRS via email with the FROM being the sender's submitted email address. If you don't have the ability to change the FROM (especially if you're using a trusted email address), you might use a PostMasterFilter.

(change #customer to your appropriate label/filter criteria):

Filtername:   Get the username from the email address (before @)
Match:
Header 1:   Body   Value:   #customer ([a-zA-Z0-9_\-\.]+)@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})
Set:
Header 1:   X-OTRS-CustomerUser   Value:   [***]

Filtername:   Get the complete email address 
Match:
Header 1:   Body   Value:   #customer (([a-zA-Z0-9_\-\.]+)@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3}))
Set:
Header 1:   X-OTRS-CustomerNo   Value:   [***]

This shows up on log:

Tue May 4 12:25:52 2010 notice OTRS-CGI-10 Filter: 'Customer change email' Set param 'X-OTRS-CustomerNo' to 'user@address.com'

Tue May 4 12:25:52 2010 notice OTRS-CGI-10 Filter: 'Customer change User' Set param 'X-OTRS-CustomerUser' to 'user'


Any other fields that you want to parse can be similarly configured in PostMasterFilter.

If you need help getting started with creating a form, take a look at JotForm. --Crythias 02:31, 29 May 2010 (UTC)