Hi there,
I am trying to get the last customer comment using Zenpy and by calling the comments API
https://subdomain.zendesk.com/api/v2/tickets/ticket_id/comments
But if the customer send two consecutive messages
( meaning that the agent did not send or reply to the Customer first message )
the last comment body in the API response will be something like below :
{
"id": 15781536622482,
"type": "Comment",
"author_id": 15475246653586,
"body": "Hi \n\n\nOn Fri, Dec 15, 2023 at 10:51 AM Souzan Hussien <souzanhussien742@gmail.com> wrote:\n\n> Hello",
.............
where the first message was "Hello" and the next one was "Hi"
noting that i am using email and web channels
Is there another API or different way to get just the main text content of the message
Regards.
If this is a conversation over the Messaging channel, then this is expected behavior. Messaging conversations are to the ticket as transcript blocks. So the plain-text version of the ticket comment body will still be a "transcript" that contains the author and timestamp of the message.