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, 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:
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”