Easy ticket creation via Generic Interface

Jens Bothe03. Oct 2012 | ConsultingUse cases

Disclaimer:

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

 

#8
Jens Bothe at 13.12.2018, 15:45

Username & Password is wrong

#7
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#

#6
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' };

#5
Jens at 27.08.2014, 13:32

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

#4
Luciani at 27.08.2014, 13:16

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

#3
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

#2
reply at 15.05.2013, 15:10

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

#1
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 *