Easy ticket creation via Generic Interface

Jens Bothe03. Oct 2012 | ConsultingUse cases

In OTRS 3.1 the Generic Interface was introduced to ease the way of ticket creation via webservices. The interface has a wide variety of possibilities for developers like acting as a invoker, a scheduler, and a very modular setup which allows easy development of new connectors to OTRS backend functionality.

There are two ready to run connectors available for free, a generic ticket connector and a FAQ connector. This post describes how to install the generic ticket connector and use it with a remote scripts.

First you need to download the description file for the connector which can be found here. Now open the admin tab and navigate to the menu item “Web Services”. You can now upload the definition via the “Add Web Service” Button

Now Import the webservice via the offered button

Now you should have a new Webservice in your list

Now, lets try to generate a ticket via webservice. I created a script on the disk of the server (you can download the skeleton here)

The basic lines are:

Please note that you will need a valid OTRS user with permissions on the queue, a valid customer and valid states, priorities and ticket types (if switched on).

Running the script should give you a result like

As this script needs to be adjusted everytime you need to create a different text or different customer Mike wrote a standalone script which connects to the generic interface of an OTRS installation.

To install you need to download the tar.gz file on the machine which should create tickets, install the PERL libraries Getopt::Long, Pod::Usage and SOAP::Lite and unpack the directory. You can now build the script with the following commands:

Running the script via command line now will open a ticket

This script can also be used with the wrapper of reoccuring task described in the post “Proof of concept: Creating reoccuring tickets for task”


Jens Bothe at 13.12.2018, 15:45

Username & Password is wrong

Arun at 13.12.2018, 06:27

Hi, I am using generic interface in community otrs. I have configured rest services to manage tickets. While accessing services from Rest client it is giving following error { "Error": { "ErrorCode": "TicketGet.AuthFail", "ErrorMessage": "TicketGet: Authorization failing!" } } URL : http://localhost/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnector/Ticket/2018082130000017?UserLogin=htcuser&Password=123Welcome#

Sizwe at 02.11.2016, 14:30

Hi Guys i need some help i wrote a C# program which remotely create ticket I'm using SOAP API My Question is : How do i get a returned ticket or created ticker send back to my C# Program for example this is a created ticket: $VAR1 = { 'ArticleID' => '771', 'TicketID' => '242', 'TicketNumber' => '2016110222000039' };

Jens at 27.08.2014, 13:32

Have a look here: https://github.com/OTRS/otrs/tree/rel-3_3/development/webservices

Luciani at 27.08.2014, 13:16

Hello. The link on github is "404" (broken). What is the new link?

Leo at 24.07.2013, 09:51

Hello! I use the OTRS GenericInterface to create a Ticket and the corresponding Articles. Now I'm trying not only to create a Ticket, but also to send an anrticle eMail to the customer as in the otrs/rpc.pl API ArticleSend() method. Is this possible applying to the GenericInterface TicketCreate controller? Thanks in advance. Best regars Leo

reply at 15.05.2013, 15:10

Hi, how to do "make all" in windows 7 ? :)

Shreya Rangari at 14.05.2013, 12:35

Hi Jens, I need your help regarding this. i imported the web service in the otrs system. now tell where shud i keep my .pl file. while running the script i get error at line my $SOAPObject = SOAP::Lite ->uri($NameSpace). tell me if i need u enter here...

Your email address will not be published. Required fields are marked *

This site uses cookies. By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.