NAME

otrs.CreateTicket.pl - create tickets in OTRS via web services.

SYNOPSIS

Example 1: all arguments on the command line, add attachment

otrs.CreateTicket.pl --Server otrs.example.com --Ssl --UserLogin myname \ --Password secretpass --Title 'The ticket title' \ --CustomerUser customerlogin --Body 'The ticket body' \ --DynamicField Branch="Sales UK" --DynamicField Source=Monitoring \ --Attachment demo.xls --Attachment screenshot.png

Example 2: read body in from a file

otrs.CreateTicket.pl --Server otrs.example.com --Ssl --UserLogin myname \ --Password secretpass --Title 'The ticket title' \ --CustomerUser customerlogin --BodyFile description.txt

Example 3: read body in from STDIN, pending at some date

otrs.CreateTicket.pl --Server otrs.example.com --Ssl --UserLogin myname \ --State 'pending reminder' --PendingTime 2014-10-03T15:00 \ --Password secretpass --Title 'The ticket title' \ --CustomerUser customerlogin < description.txt

Example 4: read body in from STDIN, pending in two hours

otrs.CreateTicket.pl --Server otrs.example.com --Ssl --UserLogin myname \ --State 'pending reminder' --PendingTime 120 \ --Password secretpass --Title 'The ticket title' \ --CustomerUser customerlogin < description.txt

Please note that if you do not specify a --BodyFile or pipe in a file, the command will expect your input as the ticket body; this is typically not what you want.

SYNTAX

otrs.CreateTicket.pl command syntax:

otrs.CreateTicket.pl [arguments]

Arguments:

SERVER CONNECTION
--Server        Name of OTRS server.
--Ssl (boolean) If SSL (https) should be used.

Alternatively:
--Url           Full URL to GenericTicket web service.

USER AUTHENTICATION
--UserLogin     Login name of valid Agent account.
--Password      Password for user.

TICKET DATA
--Title         Title of ticket.
--CustomerUser  Customer of ticket (mandatory!).
--Priority      Defaults to '3 normal' if not specified.
--Queue         Defaults to 'Postmaster' if not specified.
--Owner         Optional.
--Responsible   Optional, and only if activated on the server.
--Service       Optional, and only if activated on the server.
--SLA           Optional, and only if activated on the server.
--Type          Optional, and only if activated on the server.
                 PLEASE NOTE: on version 3.3 or later you might need to
                  use the value 'Unclassified' as the default changed.

--PendingTime   If a number, # of minutes after current time. Otherwise,
                should be a string in 'YYYY-MM-DDTHH:MM' format.

ARTICLE DATA
--Subject       Optional, defaults to title if not defined.
--BodyFile      Name of file that contains body text of the message
--Body          Body text of the message.
--SenderType    Optional, defaults to 'Customer'.
--ArticleType   Optional, defaults to 'web-request'.
--TimeUnit      Can be optional or required depending on the server.

DYNAMIC FIELDS
--DynamicField  Optional. Can be passed multiple times.
                Takes Name=Value pairs.

ATTACHMENTS
--Attachment    Optional. Can be passed multiple times.
                Takes filenames as values.