Agent workspace ticketing system view | Community
Skip to main content

Agent workspace ticketing system view

  • September 29, 2023
  • 2 replies
  • 0 views

Issue

Greetngs!

I have on issue in my support ticketing app. Which takes last message from the ticket excluding internal note. It do not reads internal note for the messges. But whenever I am coming in new agent workspace UI. It takes internal notes as last message, I don't know why it is not working in new UI. Attached a video please review and let me know, If someone helps with this.

https://www.loom.com/share/7fe8f4bf986d451b98bcbaa168458584 

 

I am using this method to get last message on ticket:

var conversation = data['ticket.conversation'].reverse();
$.each(conversation, function(index, item){
      if(item.channel.name != 'internal'){
         last_ticket_msg = $('<div>').html(item.message.content).text();
          return false;
       }  
 })

 

Thanks

2 replies

Greg29
  • October 2, 2023
Hi there and thanks for the video...that definitely helped clarify the issue for me!
 
So it turns out that the UI that it's not working in is actually the old UI, not the new one (agent workspace). The reason for this is that in the old UI, internal notes were not a channel as they are in agent workspace. Further to the issue here is that...to my surprise...there isn't a method available to determine if a comment is an internal comment for the old UI. 
 
The good news though is that you can use our Ticketing API to get this information and it will work the same in both UIs. You'll just make a client.request call to the List Comments API (with async/await or a Promise) to get the comments.public value and if it's false, then this should all work fine.
 
Apologies that this was so confusing, I'm actually a bit surprised that there are these types of discrepancies in the APIs. On the positive side, we are in the process of moving all accounts to agent workspace, so this won't be an issue for too much longer and once it's complete, you could go back to the cleaner code above. Let us know if you have any questions!

Issue
  • Author
  • October 10, 2023

Thanks Greg for the quick response!!

I have an issue that in my complete application I am using "Zendesk Apps Framework" instead of Zendesk API's. So can you please let me know how can I acheive this.

As mentioned above I am using this method to get last message from the ticket:

var conversation = data['ticket.conversation'].reverse();
$.each(conversation, function(index, item){
      if(item.channel.name != 'internal'){
         last_ticket_msg = $('<div>').html(item.message.content).text();
          return false;
       }  
 })
 
It is capable only to get last message from the ticket excluding internal note. But it takes internal notes as last message, in Zendesk New UI(agent workspace).
 
Please let me know if we have any method in Zendesk Apps Framework.
 
Thanks