Customer has unread messages

lock
push_pin
done
Answered
3

Hi

I'm trying to figure out an efficient way to make a method that through the api return true/false if the customer has any new tickets or any unread messages to existing tickets. I see that there is a ReadByCustomer field on the Ticket entity, so I might be able to use this in some way. 

Any suggestions as to how I should approach this?

 

3 Apr 2024 | 06:14 AM

All Replies (3)

Is there a way to set the ReadByCustomer field through the API? setting the value on the TicketEntity and calling SaveTicketEntity() doesn't seem to do anything.

 

3 Apr 2024 | 11:48 AM

Did you find a way?

I gave up and created a database table to keep track of when users last read a message.

15 Apr 2024 | 12:00 PM
I found a couple of ways, but none are very satisfying. There is a way to set the ReadByCustomer field through crm script, but then I would have to create a custom Rest api endpoint and connect the script to that. I am currently trying to set a boolean extra field on ticketentity in a crm script trigger to True whenever a message is added to a ticket. Then I can set the extra field to false when the ticket is displayed in my customer portal. I'm anxious to see how this performs when I create a request to check if the customer has any new messages or not.
22 Apr 2024 | 05:51 AM

Add reply