---
schema_version: "1"
id: 017f252890e8462650ed1ba26597de0a24153337f5db0fe0823913fde5974c6c
title: UserCriteria
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_usercriteria.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_usercriteria.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 92606d45f55b31b57558286773e2c6837863cbaf60be9530311dd51b46aa6105
description: Represents the member criteria to use in Experience Cloud site moderation rules. This type extends the Metadata metadata type and inherits its fullName field..
---
# UserCriteria

Represents the member criteria to use in Experience Cloud site moderation rules. This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field..

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## File Suffix and Directory Location

UserCriteria components have the suffix site\_name.user\_criteria\_developer\_name.userCriteria and are stored in the UserCriteria folder.

## Version

UserCriteria components are available in API version 39.0 and later.

## Special Access Rules

To view, create, edit, and delete moderation rules, you need the Manage Experiences or Create and Set Up Experiences permission. As of Spring ’20 and later, only users with permission to edit moderation rules can access this object.

## Fields

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



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

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

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

            </tr>

          </thead>

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

              <td class="entry" headers="d940496e113" data-title="Field Type">int</td>

              <td class="entry" headers="d940496e116" data-title="Description">
                <span class="ph" id="creationageinseconds_desc"><a name="creationageinseconds_desc"><!-- --></a> If specified, includes only users that were
                  created within a specific time frame.</span>
              </td>

            </tr>

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

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

              <td class="entry" headers="d940496e116" data-title="Description"><span class="ph" id="description_desc"><a name="description_desc"><!-- --></a>The description of the user criteria.</span></td>

            </tr>

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

              <td class="entry" headers="d940496e113" data-title="Field Type">int</td>

              <td class="entry" headers="d940496e116" data-title="Description"><span class="ph" id="lastchatteractivityageinseconds_desc"><a name="lastchatteractivityageinseconds_desc"><!-- --></a>If specified, includes only
                  members that have posted or commented in the Experience Cloud site within a
                  specific time frame.</span></td>

            </tr>

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

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

              <td class="entry" headers="d940496e116" data-title="Description"><span class="ph" id="masterlabel_desc"><a name="masterlabel_desc"><!-- --></a>Name of the user criteria.</span></td>

            </tr>

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

              <td class="entry" headers="d940496e113" data-title="Field Type">NetworkUserType enumeration ( of type string)</td>

              <td class="entry" headers="d940496e116" data-title="Description">
                <span class="ph" id="userTypes_desc"><a name="userTypes_desc"><!-- --></a>The member type to use in moderation rules. </span> Valid
                values are:<ul class="ul bulletList">
                  <li class="li">Internal</li>

                  <li class="li">Customer</li>

                  <li class="li">Partner</li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a UserCriteria component.

<?xml version="1.0" encoding="UTF-8"?>
<UserCriteria xmlns="http://soap.sforce.com/2006/04/metadata">
    <masterLabel\>Customer and Partner Members</masterLabel\>
    <description\>Member criteria matches customer and partner member</description\>
    <userTypes\>Partner</userTypes\>
    <userTypes\>Customer</userTypes\>
</UserCriteria\>

## 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).