Newer Version Available
KeywordList
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 Experience Cloud site.
- 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 site_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 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
| Field Name | Field Type | Description |
|---|---|---|
| Description | string | A description of the keyword list. |
| keywords | Keyword[] | The keywords you want moderate in your Experience Cloud site. |
| 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>site1.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.