Detecting user field changes in Ticket Sidebar app

7 Comments

  • Sebastiaan Wijchers
    Comment actions Permalink

    Hello Ken,

    I assume you're talking about the user sidebar here?

    Those events are documented here:
    https://developer.zendesk.com/apps/docs/support-api/user_sidebar#events

    With kind regards,

    Sebastiaan
    Sparkly ⭐

    0
  • Ken Haberman
    Comment actions Permalink

    In my Ticket Sidebar app, I want to listen for changes in user fields. I am not working with a User Sidebar app. Is this possible, i.e., are user change events detectable by a Ticket Sidebar app?

    0
  • Sebastiaan Wijchers
    Comment actions Permalink

    Hello Ken,

    Can you give an example of such a field and where the agent would change it? I'm not sure if I understand your question correctly.

    With kind regards,

    Sebastiaan
    Sparkly ⭐

    0
  • Ken Haberman
    Comment actions Permalink

     

    Below is a screenshot of the user fields we have. The UserID is the one we change most often and the one our ticket sidebar app uses.

    Here is a screenshot of our Ticket Sidebar app. Remember that this is in the Ticket Sidebar, not the User Sidebar.

    When an agent updates the UserID, we want the app to update that in the Ticket Sidebar without having to reload all apps. The roadblock I have is trying to detect the change to the user field.

    Hope that clarifies things. Thanks!

    0
  • Sebastiaan Wijchers
    Comment actions Permalink

    Hello Ken,

    Thanks, now it's perfectly clear what you're after!

    This is a little bit more advanced, but you're probably best of defining a `user_sidebar` location in your app with `authHide` set to `true`.
    https://developer.zendesk.com/apps/docs/developer-guide/manifest#location
    This will make your app present there, but without UI.

    Then you can detect the change in the `user_sidebar` from that location:
    https://developer.zendesk.com/apps/docs/support-api/user_sidebar#events

    And then the tricky part; communication between the `user_sidebar` and `ticket_sidebar`. Especially tricky when you have multiple tickets/users opened up in your interface (which will all be instances of your app). There is some documentation here:
    https://developer.zendesk.com/apps/docs/developer-guide/using_sdk#messaging-between-locations

    You could decide to notify all `ticket_sidebar` instances of your app when a user has been changed, and let the `ticket_sidebar` instance figure out if the change is relevant to him or not.

    Hope it makes sense, if not; let me know!

    With kind regards,

    Sebastiaan
    Sparkly ⭐

     

    0
  • Ken Haberman
    Comment actions Permalink

    Thank you very much for the information. I had a sneaking suspicion that we needed to create some type of User Sidebar app to capture the changes and then pass them to the Ticket Sidebar. If you have any tips on how to direct the data to the correct instance or how to tell if the change is relevant for an instance, please point me in the right direction.

    0
  • Devan
    Comment actions Permalink


    Hello everyone,

    On Tuesday, November 5th, from 10:00am-12:00pm CST, we'll have a special guest team of experts on hand to answer your questions about Zendesk Apps Framework (ZAF) in your Zendesk Developer instance for an AMA-style conversation!

    Just click the "new post" button and write up your question. Be sure to be as detailed as possible. The best questions include: 

    • What it is you're trying to do
    • What you've tried so far 
    • Any other context or relevant information
    • Screenshots, if you have them

    Questions posted to this topic in advance of the start time will be answered first thing on the 5th, so if you've got something you want our experts to look at.

    0

Please sign in to leave a comment.

Powered by Zendesk