Marking a Desk ticket as Unread after merge

Marking a Desk ticket as Unread after merge

We have a custom script that runs against every new ticket and auto-merges it with any existing ticket that matches our criteria.  That works fine but there is no functionality that reverts the newly-updated ticket back to an "unread" state.

I found the Deluge API repository and discovered the "markAsUnRead" call, which I have incorporated into our script and seems to work - but only for me.  I stripped out the function and have tested in different departments with different users (ticket-owner, dept-agent, light-agent) with different level of access (agents, admins), yet I am the only user who ever sees the ticket revert to the "unread" state.

The only thing I can point to is, when the auto-merge script runs (in its original version or with this new function added) and it does find and merge two tickets, the History on the ticket specifically mentions me as the person who performed that task:

When the script runs against a new ticket, but there are no matching existing tickets, so there is no merge and the new ticket survives intact (so this appears on every ticket and that makes sense):


Later, if the script runs against another new ticket, but a match is found and the new ticket is merged under the existing ticket, this is the History entry on the existing ticket:


And all of that makes sense as well - except why it references my name.  I assumed it was because I entered the script into Zoho and that didn't matter to me.  But now I suspect that, because the platform thinks that it's ME running the script to "markAsUnRead" then that result only applies to ME.

I'm just delving into Deluge and by no means have more than a superficial understanding, but this is something we really need resolved - and honestly seems like it should be an easy fix -  so any help is much appreciated.