When I started working with ServiceNow ITSM I immediately lost an overview of my various tickets and their updates from customers. Usually, I had multiple tickets open and for some of them, I was waiting on a response from the caller/customer. But I have never found an out-of-the-box solution to track unread comments in ServiceNow.
Therefor I tried to find a solution to this. Just imagine you would see at one glance in a list view that there was a new comment by the caller or a colleague of yours. You would be immediately aware to take action on that ticket. And you do not have to open each of your tickets to see the latest comments or work notes.
If you do not want to read the details of the solution and jump right into using it, go to the download section directly.
Create a counter for Unread comments
I just had a couple of requirements to get visibility to unread comments in ServiceNow:
- Each comment or work note should increment the counter by 1.
- The counter is set to 0, if the assignee adds a comment or work note.
- Comments or work notes from the system user do not increase the counter.
- The counter is set to 0, ff the task changes to inactive.
- The counter can be reset via a button on the form.
I used two flows to cover requirements 1-4. For requirement 5 I created a UI action.
Increase or reset the counter
The first flow counts new comments or work notes and increases the counter. It will reset the counter as well if the assigned person is creating the comment and it will ignore the comments of ‘system’.
The second flow resets the unread comments counter if the task switches to inactive or if the status of an incident is set to “resolved”. The last option is helpful because resolved incidents might be considered closed or close automatically after a couple of days. You can adjust that criteria to your needs and processes.
Reset counter with an UI action
The last requirement is fairly simple to realize. I created a simple UI action button that will show on the form if the unread comments counter is greater than zero.
final adjustments to the unread comments solution
I tested that solution fairly well and found an issue where the counter of unread comments increased if a check list item is created. I did not want this to happen so I just deactivated these two business rules:
- Add worknote for checklist CRUD
- Add worknote for checklist item CRUD
Finally I wanted the counter to be more visible in the list view. Therefore I added three field styles which show green, yellow, read. With this the agents will see immediately on which task they have to react.
You can download the solution from the download section if you don’t want to rebuild on your own.