I want to notify users through chatter Stream when a new record is created on an object
So when a new account record is created , a post at chatter will be notified to all or select users.
User should be notified of a new record creation only, without following objects and records hence being inundated with chatter noise. I am aware of chatter feed, however clearly this isn't sufficient.
Is this possible, or would an apex trigger be required.
Much thanks to all, would be grateful for anyone to elaborate if this is possible with workarounds.
Best Answer
Here's a link to the Help page for Customizing Chatter Feed Tracking:
http://help.salesforce.com/apex/HTViewHelpDoc?id=collab_feed_tracking.htm
Like you said, the out-of-the-box Chatter might not have sufficient capabilities to do what you're asking, and their are more complex alternatives. First, I believe you can create a
Trigger
on the appropriateChatter Objects
. That would give you the greatest control overChatter Feed records
generation. In theTrigger
, you could evaluate who the User is and do different actions based on theUser
and the record itself (like create new appropiateChatter Feed Records
).However, if that doesn't work, there is another alternative of using
Streaming API
. It's kind of nifty: first you set up Queries (PushTopic
). The code then performs thePushTopic
query at regular intervals (near-continuous or in atrigger
-fashion) and it detects when a new record is created (or edited depending on your settings). TheStreaming API
then sends a message to theclient
when it detects a change. The client can then do whatever they want with it (like create a Chatter Feed Record).I believe
Streaming API
is more for the use-case of a 3rd-party application or like you would useSalesforce SOAP API
with Javascript on a page.Streaming API docs: http://www.salesforce.com/us/developer/docs/api_streaming/