Recent searches
No recent searches
How can I get only the last message in the attached thread conversation from the "ticket conversation"?
Posted Oct 26, 2023
I have to get only the actual message from the thread in an email-type ticket using client SDK.
client.get('ticket.conversation').then((res: any) => resolve(res['ticket.conversation']));
0
3
3 comments
Tipene Hughes
Hey Jigar Patel,
This code snippet should be helpful:
0
Jigar Patel
Tipene Hughes
Tnx for the answer but I want,
From the agent side, I know how to get the last message, but the issue is if the last message contains the whole thread (previous conversation text) body, then I need to remove that part in HTML because I only need the last message text from the HTML content.
0
Tipene Hughes
Here's another code sample that makes a call to the Ticket Comments API and pulls only the plain text body from the most recent message. Let me know if this is closer to what you were hoping to do.
0