---
schema_version: "1"
id: 4fea5b43f401210aea812cd9f0bf9782c2f04bf9669eed90bfde9ad6c95ae9c8
title: SynonymDictionary
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_synonymdictionary.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_synonymdictionary.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3c1479d25259c3867b2c3c0006a15da9aac614365aa168f042b9b14020ac0be0
description: Represents a set of synonym groups, which are groups of words or phrases that are treated as equivalent in users’ searches. You can define synonym groups to optimize search results for acronyms, variations of product names, and other terminology unique to your organization.
---
# SynonymDictionary

Represents a set of synonym groups, which are groups of words or phrases that are treated as equivalent in users’ searches. You can define synonym groups to optimize search results for acronyms, variations of product names, and other terminology unique to your organization.

Synonyms are available in Service Cloud features such as Salesforce Knowledge. This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") 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](#SubTypeID) | 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.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d889990e194">Field Name</th>

              <th class="featureTableHeader  " id="d889990e197">Field Type</th>

              <th class="featureTableHeader  " id="d889990e200">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d889990e194" data-title="Field Name"><span class="keyword parmname">languages</span></td>

              <td class="entry" headers="d889990e197" data-title="Field Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_translations.htm#translation_languages">Language</a></td>

              <td class="entry" headers="d889990e200" data-title="Description">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.</td>

            </tr>

            <tr>
              <td class="entry" headers="d889990e194" data-title="Field Name"><span class="keyword parmname">terms</span></td>

              <td class="entry" headers="d889990e197" data-title="Field Type">string</td>

              <td class="entry" headers="d889990e200" data-title="Description">Required. A word or phrase synonymous with other terms in the
                group. Maximum of 50 characters. Minimum of two
                <span class="keyword parmname">terms</span> per group.<p class="p">Synonym groups are
                  symmetric, which means that if oranges and apples are defined in
                  a synonym group, a search for <kbd class="ph userinput">oranges</kbd>
                  will return a match for <kbd class="ph userinput">apples</kbd>, and vice
                  versa for a search for
                  <kbd class="ph userinput">apples</kbd>.
                </p>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a SynonymDictionary component:

<?xml version="1.0" encoding="UTF-8"?>
<SynonymDictionary xmlns="http://soap.sforce.com/2006/04/metadata">
    <groups\>
        <languages\>en\_US</languages\>
        <terms\>Salesforce</terms\>
        <terms\>salesforce.com</terms\>
        <terms\>The Customer Company</terms\>
        <terms\>SFDC</terms\>
    </groups\>
    <groups\>
        <languages\>fr</languages\>
        <terms\>renault</terms\>
        <terms\>clio</terms\>
    </groups\>
    <label\>Sample Dictionary</label\>
</SynonymDictionary\>

The following is an example package.xml that references the SynonymDictionary component.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>Sample Dictionary</members\>
        <name\>SynonymDictionary</name\>
    </types\>
    <version\>68.0</version\>
</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](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").