I want to monitor private message and want to check and store at admin side. so admin can see who doing message to whom and make the policy for to sending the message.

  • are you expecting more replies ? – Samuel De Rycke Sep 11 '12 at 9:47
  • no i went through all stuff. – Kishan Trambadiya Sep 11 '12 at 11:56
  • 5
    Accepting an answer will show people reading your question that the answer solves your question. There's a button under the upvotes next to an answer. – Samuel De Rycke Sep 11 '12 at 12:11

You need to enable the Manage Chatter Messages system permission on a cloned System Administrator profile before you have access to these sObjects.

The ChatterMessage and ChatterConversation objects is what you are looking for.

for instance:

SELECT Body,ConversationId,Id,SenderId,SentDate FROM ChatterMessage

To be honest, if you do this you should make all your users aware of this, and I'm not sure if this might be affected by local regulations. Here, system admins are for instance not allowed by law to check employee mails on the mailserver for instance. (As far as I'm informed).

Sometimes, to get your users at their top efficiency, the best way is to give them the freedom and let go of some control/monitoring.

  • For that i will have to make a trigger on chatter message but for that i need the trigger. so tell me how can i get that trigger?? I think this trigger is not available... for that setup-customize-chatter-trigger- in that only 2 trigger which is for feed item and comment. so what is next?? – Kishan Trambadiya Aug 31 '12 at 13:05
  • 2
    You could try collecting and saving them to a custom object in scheduled apex. I was considering that to be the easy part – Samuel De Rycke Aug 31 '12 at 13:29
  • ya i know that but how can private message store in that standard object. i think some trigger should be there so it will proceed ahead. when user send private msg at that time send button is there so when user clicks save button some trigger is fired. so i am finding that trigger.. – Kishan Trambadiya Sep 1 '12 at 5:21
  • 6
    You're asking a bunch of different questions and are over complexifying this if you ask me. The messages are already stored in the system and with the right permissions you can see them all. If you want to store them you can get data from those 2 objects and put it in a custom object. This isn't something you would likely monitor continuesly, I would consider it more resource efficient to but it in schedullable batch apex to run every night or every weekend. Why is that a bad solution if you aren't able to put a trigger on those objects at this time ? – Samuel De Rycke Sep 1 '12 at 15:21
  • 2
    Why not just a javascript popup on the homepage when they login to notify them of the monitoring. But honestly, if you have nothing better to do than monitor chatter messages as a System Administrator than you need to find more projects that will better the company. – Randy E Oct 8 '12 at 5:08

With Salesforce Spring'15, we have the ability to write trigger on 'ChatterMessage' Object.

So, you can easily monitor the ChatterMessage Activity(Provided the user have the "Manage Chatter Message" on the profile; as mentioned by Samuel)

  • Enabled this permission and able to query the ChatterMessage object. However, chats through the chat box imgur.com/RAX31tf are not logged into this object. – dmachop Apr 11 '17 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.