Skip to main content
Answered

showTicket sometimes gets ticket by id instead of public_ticket_id?


Hello,

I’ve been getting inconsistent behavior when using showTicket. It would sometimes open a ticket by it’s public id, and sometimes it would open a wrong ticket - by id instead. I am seeing this in my network requests:
When I call showTicket(999), I see this request

https://api-iam.intercom.io/messenger/web/tickets/999

Normally (and I believe this is the expected behavior) the response contains a ticket with public_ticket_id: 999, and this ticket is opened in the chat. However, sometimes I get a ticket with id: 999, and some older public_ticket_id. So while the newer ticket is created and can be seen there in the messenger home space and in tickets if I click back, another older ticket gets opened.

Best answer by bernice

Hi @random_giraffe 👋🦒 You open tickets by their ID using the Intercom('showTicket', ticketId) JavaScript function - you’ll find a ticket’s ID on the ticket, highlighted below:

 

 

 

 

 

 

 

You can also retrieve Ticket IDs via the REST API with the Retrieve a Ticket endpoint 📌

View original
Did this topic help you find an answer to your question?

2 replies

bernice
Intercom Team
Forum|alt.badge.img+5
  • Intercom Team
  • 230 replies
  • Answer
  • April 23, 2024

Hi @random_giraffe 👋🦒 You open tickets by their ID using the Intercom('showTicket', ticketId) JavaScript function - you’ll find a ticket’s ID on the ticket, highlighted below:

 

 

 

 

 

 

 

You can also retrieve Ticket IDs via the REST API with the Retrieve a Ticket endpoint 📌


  • Author
  • New Participant
  • 1 reply
  • April 23, 2024

Hi, thanks for your reply. I was using the method you linked. The problem seemed to be that when the ticket was created on backend (using your createTicket API), we should have been using id field of the ticket instead of ticket_id (this is sent to frontend which then uses the id to show the ticket)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings