Newer Version Available
SynonymDictionary
Synonyms are available in Service Cloud features such as Salesforce Knowledge. This type extends the Metadata metadata type and inherits its fullName field.
File Suffix and Directory Location
SynonymDictionary components have the suffix .synonymDictionary and are stored in the synonymDictionaries folder.
Version
SynonymDictionary components are available in API version 29.0 and later.
Special Access Rules
Synonyms must be enabled in your organization. Only users with the “Manage Synonyms” permission can access this object.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| groups | SynonymGroup | The synonym groups defined in this dictionary. |
| isProtected | boolean | Indicates whether this component is protected (true) or not (false). Protected components cannot be linked to or referenced by components created in the installing organization. |
| label | string | Required. Specifies the display name of the synonym dictionary. |
SynonymGroup
Represents a group of synonymous words or phrases.
| Field Name | Field Type | Description |
|---|---|---|
| languages | Language | Required. Specifies the languages the synonym group applies to. If synonyms are specific to a single language, specify only that language. If the synonyms apply to multiple languages, specify multiple languages for one synonym group. |
| terms | string | Required. A word or phrase synonymous with other terms in the
group. Maximum of 50 characters. Minimum of two
terms per group. Synonym groups are symmetric, which means that if oranges and apples are defined in a synonym group, a search for oranges will return a match for apples, and vice versa for a search for apples. |
Declarative Metadata Sample Definition
The following is an example of a SynonymDictionary component:
1<?xml version="1.0" encoding="UTF-8"?>
2<SynonymDictionary xmlns="http://soap.sforce.com/2006/04/metadata">
3 <groups>
4 <languages>en_US</languages>
5 <terms>Salesforce</terms>
6 <terms>salesforce.com</terms>
7 <terms>The Customer Company</terms>
8 <terms>SFDC</terms>
9 </groups>
10 <groups>
11 <languages>fr</languages>
12 <terms>renault</terms>
13 <terms>clio</terms>
14 </groups>
15 <label>Sample Dictionary</label>
16</SynonymDictionary>The following is an example package.xml that references the SynonymDictionary component.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>Sample Dictionary</members>
5 <name>SynonymDictionary</name>
6 </types>
7 <version>64.0</version>
8</Package>Usage
If you have existing synonym groups defined before API version 29.0, your existing groups are associated with a default dictionary called _Default.
If you have a set of synonyms that require frequent updates, we recommend assigning the synonym group or groups to a dedicated dictionary with a small number of groups. Each time you deploy an existing dictionary, all of its synonym groups are overwritten. We don’t support deploying updates to only a single synonym group within a dictionary.
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.