Events API - ticket.submitClick

  • 16 February 2018
  • 4 replies
  • 42 views


Hi, am trying to get notes data of a ticket whenever a new note is added to it, for that am using ticket.submitClick Event, but am ended up with "Invalid Event" error.




This is my code.




var eventCallback = function (event)


{


    console.log(event)


 };


client.events.on("ticket.onSubmitClick", eventCallback);


invalidevent_30987.jpg

This topic has been closed for comments

4 replies

Badge

It's not ticket.onSubmitClick it is ticket.submitClick




Look here - https://developers.freshdesk.com/v2/docs/events-api/#ticketsubmit



Even ticket.submitClick also didn't work.




var eventCallback = function (event) {


    console.log(event.type + " event occurred");


};


client.events.on("ticket.submitClick", eventCallback);


invalid_30995.png

Hi Anish,

Can you use the following APIs ticket.sendReply, ticket.addNote, ticket.forward instead of ticket.submitClick. These events are for submitting a response from the editor.

We have corrected the documentation by removing the submitclick API. As Monisha mentioned, please use the following APIs:


ticket.sendReply - https://developers.freshdesk.com/v2/docs/events-api/#ticketsendreply

ticket.addNote - https://developers.freshdesk.com/v2/docs/events-api/#ticketaddnote

ticket.forward - https://developers.freshdesk.com/v2/docs/events-api/#ticketsendforward