Client.get() and client.context() returning data for all currently open tickets


  • Eric Nelson
    Zendesk Developer Advocacy

    Hey Chris,

    Each ticket that has an open tab has its own isolated instance of the app running (You can see this by looking at the instanceGuid in your screenshot). When you do a full reload of the browser window it reloads all downstream objects, this includes these different instances of the app. As each instance is isolated any actions that you take will only affect that instance / associated ticket.

    So using your example if you were to wanting to grab the ticket's organization fields and present them in the app. The only ones that would show are the ones for the ticket in focus. 

    Hope this helps clarify things

  • Christoffer Jon Sinnbeck

    Eric Nelson Thanks Eric. Will look into this.

    What confused me was that this also happens if I just refresh the app-pane on one of the open tickets by clicking the "reload apps" icon (no need to do a full browser reload). So, when the apps are reloaded on one ticket, the client.get call is fired for all three app panes (on the three open tickets) - I am pretty sure this is what I am seeing.

    Kind regards,

  • Molly Katolas
    Zendesk Luminary

    Heyya - we're seeing this behavior as well. Was there ever any resolution to identify which ticket is in focus?

  • Tipene Hughes
    Zendesk Developer Advocacy
    Hey there,
    Wrapping the function(s) in a client.on('app.activated', ()=>{}) method should prevent this from happening. Here's a link to the docs which explains the app.activated event in a bit more detail:

    I hope this helps! Feel free to reach out with any questions.

Please sign in to leave a comment.

Powered by Zendesk