---
schema_version: "1"
id: 69d689103518ce8bcdf3a01394d3692cb780b66da6b890077aeab44b34b2e468
title: CustomFeedFilter
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_customfeedfilter.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_customfeedfilter.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1393ba7ca958fe2e8a49cf63e762e360b10ad5b83c5e5c490b830924560ed608
description: Represents a custom feed filter that limits the feed view to feeds from the Cases object. The custom feed filter shows only feed items that satisfy the criteria specified in the CustomFeedFilter definition. This type extends the Metadata metadata type and inherits its fullName field.
---
# CustomFeedFilter

Represents a custom feed filter that limits the feed view to feeds from the Cases object. The custom feed filter shows only feed items that satisfy the criteria specified in the CustomFeedFilter definition. This type extends the Metadata metadata type and inherits its fullName field.

## 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](#FeedFilterCriteria) \[\] | 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.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d310579e178">Field Name</th>

              <th class="featureTableHeader  " id="d310579e181">Field Type</th>

              <th class="featureTableHeader  " id="d310579e184">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d310579e178" data-title="Field Name"><span class="keyword parmname">feedItemType</span></td>

              <td class="entry" headers="d310579e181" data-title="Field Type"><span class="ph" id="FeedItemType"><a name="FeedItemType"><!-- --></a>FeedItemType (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</span></td>

              <td class="entry" headers="d310579e184" data-title="Description">
                <p class="p">Required. The type of feed items that the filter shows.</p>

                <p class="p">The feed item type can be one of the following values:</p>

                <ul class="ul bulletList">
                  <li class="li">AttachArticleEvent</li>

                  <li class="li">CallLogPost</li>

                  <li class="li">CanvasPost</li>

                  <li class="li">CaseCommentPost</li>

                  <li class="li">ChangeStatusPost</li>

                  <li class="li">ChatTranscriptPost</li>

                  <li class="li">ContentPost</li>

                  <li class="li">CreateRecordEvent</li>

                  <li class="li">EmailMessageEvent</li>

                  <li class="li">LinkPost</li>

                  <li class="li">MilestoneEvent</li>

                  <li class="li">QuestionPost</li>

                  <li class="li">PollPost</li>

                  <li class="li">ReplyPost</li>

                  <li class="li">SocialPost</li>

                  <li class="li">TextPost</li>

                </ul>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d310579e178" data-title="Field Name"><span class="keyword parmname">feedItemVisibility</span></td>

              <td class="entry" headers="d310579e181" data-title="Field Type">FeedItemVisibility (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
                string)</td>

              <td class="entry" headers="d310579e184" data-title="Description">
                <p class="p">The visibility of feed items that the filter shows. For example, you can show
                  only poll posts that are visible internally.</p>

                <p class="p">Valid values are:</p>

                <ul class="ul bulletList">
                  <li class="li">AllUsers</li>

                  <li class="li">InternalUsers</li>

                </ul>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d310579e178" data-title="Field Name"><span class="keyword parmname">relatedSObjectType</span></td>

              <td class="entry" headers="d310579e181" data-title="Field Type">string</td>

              <td class="entry" headers="d310579e184" data-title="Description">
                <p class="p">The API name of the object that the feed item refers to. This field is typically
                  used with the CreateRecordEvent feed item type.</p>

                <p class="p">For example, a feed filter can show CreateRecordEvent feed items for the Cases
                  object.</p>

              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a [CustomFeedFilter](#meta_customfeedfilter "Represents a custom feed filter that limits the feed view to feeds from the Cases object. The custom feed filter shows only feed items that satisfy the criteria specified in the CustomFeedFilter definition. This type extends the Metadata metadata type and inherits its fullName field.") 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](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).