Ticket export - chat transcript | Community
Skip to main content

Ticket export - chat transcript

  • November 18, 2022
  • 6 replies
  • 0 views

Maciej11

What is the way to retrieve chat transcript per ticket through the Zendesk API?

The response to https://<company>.zendesk.com/api/v2/tickets/{id} does not return any reference to chat transcript unfortunately. Additionally I cannot see an API that would return chat transcript per ticket id.

While looking at network tab in the browser I observed that following API is queried:

api/lotus/tickets/{ticketId}/conversations.json?include=users&sort_order=desc

however I am not too sure if api/lotus is an API that should be used.

Many thanks for clarification/recommendation in advance.

6 replies

Tipene
  • November 18, 2022

Hey @maciej11,

The Ticket Comments API should provide the information you're looking for. You can also use the Ticket Audits endpoint if you're looking for each individual chat message.

I hope this helps!

Tipene


Maciej11
  • Author
  • November 21, 2022

Hey @tipene,

maybe it's a bug then cause comments API for the case when channel is: native_messaging returns only 1 comment with ticket name - the conversation/chat transcript is not present there.

The Audit API seems to return all events where I can parse some of them from events->history but looks like the response is not easy to handle. Is that the only option available?

Our target is to extract whole communication between customer and helpdesk / customer service.

Thank you advance for your help,

Maciej 


Tipene
  • November 23, 2022
Hey Maciej,
 
The transcript should be accessible via the Ticket Comments API once the user has left the conversation. This will appear as a new comment event with the channel chat_transcript.

Maciej11
  • Author
  • November 23, 2022

Hi Tipene,

looks like that's not a case as ticket is closed but comments API still does not return it. Anyway I was able to retrieve it via Audit API so all good. 

Thank you for your help and advice.

Maciej


Fatima12
  • October 29, 2023

Hello @maciej11 how did you manage to parse the response that the Audit API returns? I am also trying to extract the communication between help desk and customer.

Thanks in advance!


Maciej11
  • Author
  • October 30, 2023

Yes, it was present in events (type: ChatStartedEvent) then ['value']['history'] (type: ChatMessage)