Easy ticket creation via Generic Interface

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”


This entry was posted in OTRS Consulting, Perl, Use cases and tagged , , , by Jens. Bookmark the permalink.

About Jens

As a manager of technical support for many years, Jens is very experienced in project management and system support Structural planning and implementation of data processing centres, as well as planning and controlling of networks, administration of UNIX/ LINUX – systems, and development of Unix – Shell scripts for system maintenance complete the skill profile of Jens. As a technical oriented senior consultant he knows how to integrate technological know how in his consulting approach and at the same time being transparent and understandable. He’s been working as a trainer for long years, this knowledge about group dynamics and learning processes make his trainings successful, vivid and goal-oriented.

5 thoughts on “Easy ticket creation via Generic Interface

  1. 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
    tell me if i need u enter here…

  2. 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

Leave a Reply