Unable to Create Ticket when passing Service as a part of Ticket Create

English! place to talk about development, programming and coding
Post Reply
akshattandon
Znuny newbie
Posts: 20
Joined: 15 May 2018, 08:03
Znuny Version: 6.0.5
Real Name: Akshat
Company: None

Unable to Create Ticket when passing Service as a part of Ticket Create

Post by akshattandon »

Hi,

I am integrating our portal with OTRS server, When I create a ticket from OTRS UI it is successful, But unfortunately, when I send the same request from any REST Client for the same user it fails to create the ticket giving following error and if I remove the service from the request I pass.

Code: Select all

{
    "Error": {
        "ErrorMessage": "TicketCreate: Ticket->ServiceID or Ticket->Service parameter is invalid!",
        "ErrorCode": "TicketCreate.InvalidParameter"
    }
}
Sample Request

Code: Select all

{
               "Ticket":{
                               "Title":"REST Create Test",
                               "Type": "Test Type",
                               "Queue":"Unclassified",
                               "State":"open",
                               "PriorityID":"3",
                               "CustomerUser":"abc@test.com",
                               "CustomerID":"abc",
                               "Service": "TestService",
                               "ServiceID": "1"
                            
               },
                "Article":{
                               "Subject":"Rest Create Test",
                               "Body":"This is only a test",
                               "ContentType":"text/plain; charset=utf8"
                }
}
I tried with all the combinations like passing only Service, ServiceID, Both or CustomerUserID as a part of Ticket in the HTTP Request but it failed.

Is there anyone who can help that what I am exactly missing the request ?
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Unable to Create Ticket when passing Service as a part of Ticket Create

Post by zzz »

Hello,

a valid ServiceID is enough. Get sure that the given CustomerUser has a CustomerUser <-> Service relationship (Action=AdminCustomerUserService).

Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
Post Reply