Easy ticket creation via Generic Interface
Jens Bothe03. Oct 2012 | ConsultingUse cases
The practical examples presented in our technical blog (blog.otrs.com) and now in the expert category in our FAQ blog section serve as a source of ideas and documentation to show what is theoretically possible with OTRS in concrete scenarios or sometimes even for more exotic configurations. All configurations presented here were developed under laboratory conditions as a proof of concept.
We can only guarantee testing and implementation of these concepts to be error-free and productive if implemented in a workshop with one of our OTRS consultants. Without this, the responsibility lies with the customer himself. Please note that configurations from older OTRS versions may not work in the newer ones.
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”