We are using the GraphQL chat APIs to connect to a 3rd party bot vendor and have conversations with users that way. We are using Agent Workspace, so all of the chats can be viewed as a ticket on the agent side.
What I am trying to do is post a hidden comment on the chat ticket from the bot application. I am able to do this using the ticket APIs, but I am unable to guarantee that I am selecting the right ticket. The solution that I am using is to get the most recent ticket opened by the user's email, but this isn't a direct association. Is there a better way to get the specific ticket for a chat using the data I would have in a GraphQL conversation?
The Conversations API data doesn't have a direct relationship to a ticket. The channel ID is included within the chat history for a chat (the chat does have a direct relationship to a ticket). But because there is no way to query based on that property, it wouldn't provide a cleaner way of locating the ticket.