Closed thejonanshow closed 8 years ago
Using an Apex trigger instead.
trigger ChatterFeedItem on FeedItem (before insert) {
List<Track__c> tracks = new List<Track__c>();
for(FeedItem item : Trigger.new){
system.debug(item);
Track__c newTrack = new Track__c();
newTrack.Name = item.Body;
tracks.add(newTrack);
}
try {
insert tracks;
} catch (system.DmlException e) {
system.debug(e);
}
}
Add the trigger under Setup, search for 'apex'. Technically triggers for any Chatter feed item, but could easily be restricted to a specific user. Should be fine for the demo.
https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003HizvEAC
When a Salesforce user sends a message to the Dreamhouse Disco user with Chatter, the ChatterBot Autoresponse App should create a "track" in the Salesforce DB.