img1

Chatter is a powerful tool. It enables information sharing, collaboration, visibility, general and record-specific conversations, feed tracking for specific records or individuals, and the option to create public or private groups. In today’s article, we dissect the core Chatter objects and the relationship between chatter objects.

Key Identification Fields

A feed item is an entry in the feed, such as a change to a record that’s being followed, an updated post, or a user status change. All feed items have a ParentId, which is either: - a record - a user - a group

CollaborationInvitation

Represents an invitation to join Chatter, either directly or through a group. Invitations are available if “Allow Invitations” is enabled for your organization. Invitations to customers are available if “Allow Customer Invitations” is enabled for your organization. Users must have the “Invite Customers to Chatter” permission to send invitations to people outside their Chatter domain. Usages are listed below: 1. It can be used to create or delete (cancel) invitations to join chatter. 2. To invite someone to join a CollaborationGroup, you must be either the owner or a manager of the group or a Salesforce system administrator. 3. When the person accepts your CollaborationGroup invitation, they join the CollaborationGroup and Chatter as well.

FeedItem

FeedItem represents an entry in the feed, such as changes in a record feed, including text posts, link posts, and content posts. You can delete all feed items you created. To delete feed items you didn’t create, you must have one of these permissions: - Modify All Data - Moderate chatter

CollaborationGroup

Represents a Chatter group. The visibility of information in groups depends on the type of group and the user’s permissions. Use this object to create, edit, or delete groups in an organization or a community. Deleting a group permanently deletes all posts and comments to the group.

Topic

Represents a topic on a Chatter post or record. Use this object to query a specific topic or to get a list of all topics, even those used solely in private groups and on records, and the number of people talking about them, you can also use this object to create, edit and even delete topics.

TopicAssignment

Represents the assignment of a topic to a specific feed item, record, or file.

FeedTrackedChange

Represents an individual field change or set of field changes. A FeedTrackedChange is a child object of a record feed, such as AccountFeed. A user can subscribe to a record or another user. Changes to the record and updates from the users are displayed in the Chatter feed on the user’s home page, which is a useful way to stay up-to-date with other users and with changes made to records in Salesforce.

FeedComment

Represents a comment added to a feed by a user. The following rules must be followed: 1. You must have read access to the feed’s parent type to see a FeedComment record 2. You must have access to the feed to add a comment.

FeedLike

This object indicates that a user has liked a feed item. FeedLike records represent likes on posts and not likes on comments. Likes on comments can’t be queried via the API. A FeedLike is a child object of an associated FeedItem, FeedTrackedChange, or object feed, such as AccountFeed.

FeedAttachment

Represents an attachment to a feed item, such as a file attachment or a link. Use FeedAttachment to add various attachments to one feed item. Please the following considerations: 1. You can only create one link attachment (FeedAttachment of type Link) per feed item 2. If the feed item type is one of the following, you can add content or link feed attachments to a FeedItem. 1. AdvancedTextPost 2. TextPost 3. ContentPost 4. LinkPost 5. QuestionPost 3. FeedAttachment is not a triggerable object. You can access feed attachments in FeedItem update triggers by retrieving them through a SOQL query. For a trigger example, and to learn about trigger considerations for FeedAttachment, see Triggers for Chatter Objects in the Apex Developer Guide.

EntitySubscription

Represents a subscription for a user following a record or another user. A user can subscribe to a record or to another user. Changes to the record and updates from the users are displayed in the Chatter feed on the user’s home page, which is a useful way to stay up-to-date with other users and with changes made to records in Salesforce.

CollaborationGroup

Represents a Chatter group.

CollaborationGroupMember

Represents a member of a Chatter group. Use this object to view, create, and delete Chatter group members. You must be a group owner or manager to create members for private Chatter groups.

CollaborationGroupMemberRequest

Represents a request to join a private Chatter group and can be used to accept or decline requests to join private groups you own or manage. Please note the following 1. Users with the “Modify All Data” or “View All Data” permission can view records for all groups, regardless of membership. 2. A user can be a member of 300 groups. Requests to join groups count against this limit. 3. Status can’t be specified on create. 4. You can only update a request when the Status is Pending 5. You can’t delete or update a request with a Status of Accepted or Declined.