Fetch conversation data when click on add note button in ticket detail page

fetch conversation data when click on add note button in ticket detail page
Found the code.
client.events.on("ticket.addNote", function(event) {
console.log(event.type + " event occurred"+ event); });
Requirements.
i want to get the data of conversation and attachments when i’ll click on the add note button.

Hi @nishi_jha

You can obtain the ticket details via the Data method inside the event callback. Once you have the ticket information, with the help of Request Method, you can call this endpoint :freshdesk: List all conversations of a ticket and obtain the complete set of conversations. It will also contain the attachments.

You can also leverage the Serverless capabilities. For instance, every time a note is added, a product event is fired (onConversationCreate). You can obtain the ticket ID and use it to fetch all conversations as well. You can either make use of :freshdesk: REST APIs or API SDK

Let me know if it works :slight_smile:

1 Like