Help with webservice (New Ticket for Customer)

Moderator: crythias

Post Reply
salbanese
Znuny newbie
Posts: 7
Joined: 07 Jul 2017, 15:57
Znuny Version: 6.0.29
Real Name: Santiago

Help with webservice (New Ticket for Customer)

Post by salbanese »

Hello, I successfully use the GenericTicketConnectorREST to let customers create ticket on the system (OTRS 5.x). I'm trying to use the web service but for an agent to create the ticket for the customer, exactly as if done with the UI create new email ticket on the agent screen. I don't see an option of changing the from(customer) to the agent and the to(agent) on the webservice.

Is there a way to do that via the GenericTicketConnectorREST or is there another way to accomplish this via a webinterface?

Thanks in advance
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Help with webservice (New Ticket for Customer)

Post by RStraub »

Do you mean on creation or as an update?
Do these documentations help you?
http://doc.otrs.com/doc/api/otrs/5.0/Pe ... te.pm.html
and
http://doc.otrs.com/doc/api/otrs/5.0/Pe ... te.pm.html
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
salbanese
Znuny newbie
Posts: 7
Joined: 07 Jul 2017, 15:57
Znuny Version: 6.0.29
Real Name: Santiago

Re: Help with webservice (New Ticket for Customer)

Post by salbanese »

The documentation did help. Its create not update. Reading the documentation you can use agent id or customer id, so I guess I can switch the ids and see if it works.
The idea is so that the ticket is to create a new ticket from the agent to the customer, now the genericticket webservice works from the customer to the agent/queue.

Regarding the perl API, can it be directly access via a webinterface? or do I need to create a perlo module to take web requests and then "connect" to the API?
Thanks for your help
salbanese
Znuny newbie
Posts: 7
Joined: 07 Jul 2017, 15:57
Znuny Version: 6.0.29
Real Name: Santiago

Re: Help with webservice (New Ticket for Customer)

Post by salbanese »

From reading the links sent, is the road to follow -> Create web service using generic interface to the Ticket::TicketCreate module and send the appropriate parameters. If I look at the create email ticket UI form the values I would use are queue and Customer user (along with subject and ticket text).

My question would be, what parameters should I send via the web service in order for the system to create the ticket in a format that would be from the Agent to the client. I currently user agent to login the session and customeruser as the client and the tickets creates from the customer to the agent queue. I'm looking for the way to do it the other way around.

Thanks
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Help with webservice (New Ticket for Customer)

Post by RStraub »

There's a couple of parameters. I'd guess these two should suffice:
1) In the article hash:

Code: Select all

SenderType       => 'agent',                                # agent|system|customer
2) also in the article hash:

Code: Select all

ArticleType      => 'email-external',                        # email-external|email-internal|phone|fax|...
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
salbanese
Znuny newbie
Posts: 7
Joined: 07 Jul 2017, 15:57
Znuny Version: 6.0.29
Real Name: Santiago

Re: Help with webservice (New Ticket for Customer)

Post by salbanese »

That worked perfectly. Thanks!!!
Post Reply