Newer Version Available
UserCriteria
Represents the member criteria to use in community
moderation rules. This type extends the Metadata metadata type and inherits its fullName
field..
File Suffix and Directory Location
UserCriteria components have the suffix community_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 Communities or Create and Set Up Communities permission. As of Spring ’20 and later, only users with permission to edit moderation rules can access this object.
Fields
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>