Newer Version Available
KeywordList
Represents a list of keywords used in community moderation. This keyword list is a type of moderation criteria that defines offensive language or inappropriate content that you don’t want in your community. This type extends the Metadata metadata type and inherits its fullName field.
- Your org can have up to 30 keyword list criteria. This limit is per org, not per community.
- A keyword list can have up to 2,000 keywords.
- Capitalization and trailing punctuation are ignored when matching your keywords to user-generated content. For example, if your criteria includes BadWord, it’s matched when a user types BADWORD or badword.
File Suffix and Directory Location
KeywordList components have the suffix .keywords and are stored in the moderation directory of the corresponding package directory. The file name format follows community_name.keyword_list_developer_name.keywords.
Version
KeywordList components are available in API version 36.0 and later.
Special Access Rules
To view, create, edit, and delete a keyword list, you need the Manage Communities or Create and Set Up Communities permission.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| Description | string | A description of the keyword list. |
| keywords | Keyword[] | The keywords you want moderate in your community. |
| masterLabel | string | Required. Label for the keyword list. |
Keyword
Keywords in the keyword list.
| Field Name | Field Type | Description |
|---|---|---|
| keyword | string | Required. Keywords you want to moderate.
|
Declarative Metadata Sample Definition
The following is an example of a KeywordList component.
1<?xml version="1.0" encoding="UTF-8"?>
2<KeywordList xmlns="http://soap.sforce.com/2006/04/metadata">
3 <masterLabel>Bad Word List</masterLabel>
4 <description>List of bad words updated by Joe in Nov 2015.</description>
5 <keywords>
6 <keyword>bad-word</keyword>
7 </keywords>
8 <keywords>
9 <keyword>b a d w o r d</keyword>
10 </keywords>
11 <keywords>
12 <keyword>b@dword</keyword>
13 </keywords>
14</KeywordList>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <name>KeywordList</name>
5 <members>community1.badword_list</members>
6 </types>
7 <version>36.0</version>
8</Package>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.