UserCriteria

Represents the member criteria to use in Experience Cloud site moderation rules. .

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.

Important

Parent Type 

This type extends Metadata and inherits its fields.

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 

Introduced in API version 39.0.

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 

creationAgeInSeconds 

  • Type: int
  • Required: No
  • Description: If specified, includes only users that were created within a specific time frame.

description 

  • Type: string
  • Required: No
  • Description: The description of the user criteria.

lastChatterActivityAgeInSeconds 

  • Type: int
  • Required: No
  • Description: If specified, includes only members that have posted or commented in the Experience Cloud site within a specific time frame.

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Name of the user criteria.

profiles 

  • Type: string[]
  • Required: No

userTypes 

  • Type: NetworkUserType (enumeration of type string)[]

  • Required: No

  • Description: The member type to use in moderation rules. Valid values are:

    • Internal
    • Customer
    • Partner

Declarative Metadata Sample Definition 

The following is an example of a UserCriteria component.

1<?xml version="1.0" encoding="UTF-8"?>
2<UserCriteria xmlns="http://soap.sforce.com/2006/04/metadata">
3    <masterLabel>Customer and Partner Members</masterLabel>
4    <description>Member criteria matches customer and partner member</description>
5    <userTypes>Partner</userTypes>
6    <userTypes>Customer</userTypes>
7</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.