+ Start a Discussion
srikanth challasrikanth challa 

Is there any way to send a notification to a rep in chatter when a case is created ?

Hi Guys, 

I would like to send a service notification for the sales reps in chatter when a case is created. I know that the workflow doesn't have this functionality. Is there any way to do it?

 
Best Answer chosen by srikanth challa
Rufus RodenRufus Roden
Don't about workflow but you could try a trigger
 
trigger CaseTrigger on Case (after insert) {
    
    if (Trigger.isAfter) {
        List<FeedItem> items = new List<FeedItem>();

        for (Case c: Trigger.newMap.values()) {
            items.add(new FeedItem(
                parentId = c.ownerId,
                body = 'your message'
            ));
        }
        
        insert items;
    }
     
}