Pesquisas recentes


Sem pesquisas recentes

Getting ticket ID from conversations API for ongoing chat

Respondido


Publicado 17 de nov. de 2021

When a chat comes through the conversations API I would like to update the corresponding ticket with some information while the conversation is going on.

To do this, I would like to extract the Ticket ID via an API so I can use the tickets API to update it.

I know that I can get the chat id with the `raw_id` field in the VisitorChannel object and I can then use that ID to query the /api/v2/chats/<chat_id> endpoint to get `zendesk_ticket_id`. However, it seems that this API only works once the chat has actually ended.

Is there any way to either get the ticket ID directly from the conversations API or another chat API that I can use to fetch data for ongoing chats? I can see the ticket ID in the GUI as an agent, so surely the data is available.


2

8

8 comentários

Oficial

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hi Søren,
 
Thanks for reaching out!
 
The ticket ID is not available to the Chat Conversions API, however, there are a few different methods you could use to pull the ticket ID - for example, using the Search API with timestamps to pull the most recent ticket via chat, or the Incremental Exports API. If these aren’t suitable for your use-case, let me know and we can take a look in a bit more detail.
 
I hope this helps! Feel free to reach out with any questions.
 
Tipene

0


Hi Tipene,

Thanks for the reply. I think the solutions you suggest would run into a lot of trouble with the volume we are seeing, so if there is a way that you could expose the ID to us either via the /api/v2/chats/<chat_id> endpoint or as a field in the VisitorChannel like you included the raw_id at some point (https://zendesk.github.io/conversations-api/visitorchannel.doc.html#L31) it would be amazing.

1


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hi Søren Dahlgaard,

I'll pass this feedback on to the team that take care of this product - I can definitely see the advantage of having this data immediately available via API. I'd also encourage you to create a post in the product feedback section of community for further visibility and input from other community members.

Thanks!

Tipene

1


Tipene Hughes: Thanks for following up. I've added a post on the feedback forum here https://support.zendesk.com/hc/en-us/community/posts/4417217789082-Getting-ticket-ID-from-conversations-API-for-ongoing-chat

Looking forward to a potential solution.

Best,
Søren

1


Tipene Hughes Is there a solution for this available? I have the exact same use case where I want to update a ticket while the conversation is going on and there is a high volume of tickets in our use case as well.

0


Also interested in this - is there any way to retrieve the messaging thread from the latest convo with a user, or the conversation reply-to email address, so we can post to it by email?

0


Exactly what we are seeking to send an automated email to the ticket thread - how can we retrieve the email id for the latest conversation, using the user id or email address, please?

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hey all,
 
I’m not aware of any updates to the APIs that would have provided a solution for this use case, and as noted in the feedback post Søren created, the Chat Conversations API is in maintenance mode with no new features to be released past security updates.
 
That said, I’ve been looking at different ways we might be able to approach this and creating a lightweight Zendesk Apps Framework (ZAF) app could be an option. Creating an app in the Ticket sidebar location gives you access to the ticket object which has many different properties that will be useful, including ticket.id and ticket.requester. You can then manipulate the data as required, and send the data in API requests or using ZAF setter methods for certain properties.
 
Here’s a link to the getting started guide for building apps using the Zendesk Apps Framework, as well as the API reference documentation:
 
https://developer.zendesk.com/documentation/apps/app-developer-guide/getting_started/
https://developer.zendesk.com/api-reference/apps/introduction/
 
Feel free to reach out if you have any questions!
 
Tipene

0


Por favor, entrar para comentar.

Não encontrou o que estava procurando?

Nova publicação