Customer has unread messages

lock
push_pin
done
Besvart
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 a.m.

Alle Svar (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 a.m.

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 p.m.
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 a.m.

Legg til svar