Newer Version Available

This content describes an older version of this product. View Latest

ModerationRule

Represents a rule used in your community to moderate user-generated content. Available in Tooling API version 36.0 and later.

Each rule specifies the user-generated content the rule applies to, the criteria to enforce the rule on, and the moderation action to take. You can create rules that block, flag, or replace user-generated content that contains offensive language or inappropriate content.

Supported SOAP Calls

create(), delete(), query(), retrieve(), update()

Supported REST HTTP Methods

DELETE, GET, PATCH, POST

Fields

Field Details
Action
Type
picklist
Properties
Defaulted on create, Filter, Group, Nillable, Restricted picklist.
Description
Required. Indicates the moderation action to take when your criteria is matched. The valid values are:
  • Block
  • Replace
  • Flag
Active
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort.
Description
Required. Indicates whether the moderation rule is active (true) or inactive (false).
Description
Type
textarea
Properties
Filter, Nillable, Sort.
Description
A description of the moderation rule.
DeveloperName
Type
string
Properties
Filter, Group, Namefield, Sort
Description
The developer’s internal name for the moderation rule used in the API.
FullName
Type
string
Properties
Create, Group, Nillable.
Description
The full name of the associated metadata object in Metadata API.
Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.
Language
Type
picklist
Properties
Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort.
Description
The language of the moderation rule. Valid values are:
  • Chinese (Simplified): zh_CN
  • Chinese (Traditional): zh_TW
  • Danish: da
  • Dutch: nl_NL
  • English: en_US
  • Finnish: fi
  • French: fr
  • German: de
  • Italian: it
  • Japanese: ja
  • Korean: ko
  • Norwegian: no
  • Portuguese (Brazil): pt_BR
  • Russian: ru
  • Spanish: es
  • Spanish (Mexico): es_MX
  • Swedish: sv
  • Thai: th
MasterLabel
Type
string
Properties
Filter, Group, Sort.
Description
Label for the moderation rule.
Metadata
Type
mns:ModerationRule
Properties
Create, Nillable, Update.
Description
Moderation rule metadata. Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.
UserMessage
Type
textarea
Properties
Filter, Nillable, Sort.
Description
The message you want your community members to see when their content is blocked. Use the %BLOCKED_KEYWORD% variable to display up to five blocked words in the user message. If you don’t specify a message, the user sees the standard message: “You can't use %BLOCKED_KEYWORD% or other inappropriate words in this community. Review your content and try again.”