ModerationRule

Represents a rule used in your Experience Cloud site to moderate member-generated content.

Moderation rules help protect your site from spammers, bots, and offensive or inappropriate content. Create and modify rules for your Experience Cloud site to moderate member-generated content. Each rule specifies the member-generated content the rule applies to, the criteria to enforce the rule on, and the moderation action to take.

Version 

Introduced in API version 36.0.

Supported SOAP API Calls 

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

Supported REST API Methods 

DELETE, GET, HEAD, PATCH, POST, Query

Fields 

Action 

  • Type: picklist

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

  • Possible values:

    • Block — Block (default)

    • FreezeAndNotify — Freeze Member And Notify Moderator

    • Review — Review

    • Replace — Replace

    • Flag — Flag

  • Default value: Block

ActionLimit 

  • Type: int
  • Required: No
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 39.0

Active 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Default value: false

Description 

  • Type: textarea
  • Required: No
  • Properties: Filter, Nillable, Sort

DeveloperName 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: The unique name for the Moderation Rule object.

FullName 

  • Type: string

  • Required: No

  • Properties: Create, Group, Nillable

  • Introduced: API version 36.0

  • Description: The internal name of the object. White spaces and special characters are escaped for validity. The name must:

  • Contain characters, letters, or the underscore (_) character

  • Must start with a letter

  • Can’t end with an underscore

  • Can’t contain two consecutive underscore characters.

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

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

  • Description: The language of the Moderation Rule.

  • Possible values:

    • en_US — English

    • de — German

    • es — Spanish

    • fr — French

    • it — Italian

    • ja — Japanese

    • sv — Swedish

    • ko — Korean

    • zh_TW — Chinese (Traditional)

    • zh_CN — Chinese (Simplified)

    • pt_BR — Portuguese (Brazil)

    • nl_NL — Dutch

    • da — Danish

    • th — Thai

    • fi — Finnish

    • ru — Russian

    • es_MX — Spanish (Mexico)

    • no — Norwegian

MasterLabel 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: Label for the Moderation Rule. In the UI, this field is MasterLabel.

Metadata 

  • Type: complexvalue

  • Required: No

  • Properties: Create, Nillable, Update

  • Introduced: API version 36.0

  • 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.

NotifyLimit 

  • Type: int
  • Required: No
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 39.0

SobjectTypeId 

  • Type: ID
  • Required: No
  • Properties: Filter, Group, Nillable, Sort

TimePeriod 

  • Type: picklist

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

  • Introduced: API version 39.0

  • Possible values:

    • Short — 3 minutes

    • Medium — 15 minutes (default)

  • Default value: Medium

Type 

  • Type: picklist

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

  • Introduced: API version 39.0

  • Possible values:

    • Content — Content Rule (default)

    • Rate — Rate Rule

  • Default value: Content

UserMessage 

  • Type: textarea
  • Required: No
  • Properties: Filter, Nillable, Sort

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!