File Suffix and Directory Location
CustomFeedFilter components have the suffix .feedFilter and are stored in the feedFilters folder.
Version
CustomFeedFilter components are available in API version 35.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| criteria | FeedFilterCriterion [] | The criterion that defines which feed items are shown when the filter is applied. The feed filter displays all feed items that satisfy the criteria. |
| description | string | The description of the custom feed filter. For example, specify what feed items that filter shows. |
| label | string | Required. The API label of the custom feed filter. |
| isProtected | boolean | An auto-generated value. It currently has no impact. |
FeedFilterCriterion
Represents the conditions that a feed item must satisfy to be displayed when a feed filter is applied.
| Field Name | Field Type | Description |
|---|---|---|
| feedItemType | FeedItemType (enumeration of type string) |
Required. The type of feed items that the filter shows. The feed item type can be one of the following values:
|
| feedItemVisibility | FeedItemVisibility (enumeration of type string) |
The visibility of feed items that the filter shows. For example, you can show only poll posts that are visible internally. Valid values are:
|
| relatedSObjectType | string |
The API name of the object that the feed item refers to. This field is typically used with the CreateRecordEvent feed item type. For example, a feed filter can show CreateRecordEvent feed items for the Cases object. |
Declarative Metadata Sample Definition
The following is an example of a CustomFeedFilter component.
<?xml version="1.0" encoding="UTF-8"?> <CustomFeedFilter xmlns="http://soap.sforce.com/2006/04/metadata"> <criteria> <feedItemType>CreateRecordEvent</feedItemType> <relatedSObjectType>MyCO01__c</relatedSObjectType> </criteria> <criteria> <feedItemType>CreateRecordEvent</feedItemType> <relatedSObjectType>Case</relatedSObjectType> </criteria> <criteria> <feedItemType>PollPost</feedItemType> <feedItemVisibility>InternalUsers</feedItemVisibility> </criteria> <label>Sample Custom Feed Filter</label> </CustomFeedFilter>
The following is an example package.xml that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>myCaseFeedFilter</members> <name>CustomFeedFilter</name> </types> <version>68.0</version> </Package>
Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.