---
schema_version: "1"
id: 5f0f41cf19bff65e0a23b59b3626d0a3f358e1ce95951fece1777651bb038105
title: SearchCustomization
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_searchcustomization.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_searchcustomization.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: a3ed7593bba8f0d64c067c8b830674ca457351a084e036018771b05a64440b82
description: Represents the configuration of search settings created in Search Manager. The configuration includes the search channel, searchable objects and fields, and rules to filter search results.
---
# SearchCustomization

Represents the configuration of search settings created in Search Manager. The configuration includes the search channel, searchable objects and fields, and rules to filter search results.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## Parent Type

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

SearchCustomization components have the suffix .searchCustomization and are stored in the searchCustomizations folder.

## Version

SearchCustomization components are available in API version 61.0 and later.

## Special Access Rules

Only users with the View Setup and Configuration permission can access this object, and only users with the Customize Application permission can edit it.

## Fields

| Field Name | Description |
| --- | --- |
| channel | 
Field Type

string

Description

Required.

The search channel that the configuration applies to.





 |
| masterLabel | 

Field Type

string

Description

Required.

The name of the configuration.





 |
| objectOverride | 

Field Type

[SearchCustomizationObjectOverride\[\]](#SearchCustomizationObjectOverride)

Description

A list of object configurations.



 |
| objectToAlwaysSearch | 

Field Type

string\[\]

Description

A list of the objects that are always searched for the user profile if the search channel is Einstein Global Search Bar. 



 |
| profile | 

Field Type

string

Description

Specifies user profile if the search channel is Einstein Global Search Bar. Removed in API version 62.0 and later.



 |
| selectedObject | 

Field Type

string\[\]

Description

A list of the objects that are selected in the configuration if the search channel is LWR Experience Sites.



 |
| selectedProfile | 

Field Type

string\[\]

Description

Specifies all user profiles that are associated with a Search configuration if the search channel is Einstein Global Search Bar. This field is available in API version 62.0 and later.



 |

## SearchCustomizationObjectOverride

Represents the configuration for a specific object.

| Field Name | Description |
| --- | --- |
| fieldOverride | 
Field Type

[SearchCustomizationFieldOverride\[\]](#SearchCustomizationFieldOverride)

Description

A list of field configurations.



 |
| objectApiName | 

Field Type

string

Description

Required.

The API name of the object that the configuration is applied to.





 |
| rule | 

Field Type

[SearchCustomizationRule\[\]](#SearchCustomizationRule)

Description

A list of rules applied to filter search results. 



 |
| searchable | 

Field Type

boolean

Description

Indicates whether the object is searchable (true) or not (false).



 |

## SearchCustomizationFieldOverride

Represents the configuration for a specific field within an object.

| Field Name | Description |
| --- | --- |
| fieldApiName | 
Field Type

string

Description

Required.

The API name of the field that the configuration is applied to.





 |
| searchable | 

Field Type

boolean

Description

Required.

Indicates whether the field is searchable (true) or not (false).





 |

## SearchCustomizationRule

Represents the rules defined in an object to filter search results.

| Field Name | Description |
| --- | --- |
| fieldApiName | 
Field Type

string

Description

Required.

The field that the rule applies to. 





 |
| operator | 

Field Type

string

Description

Required.

The operator for the rule.





 |
| ruleValue | 

Field Type

[SearchCustomizationRuleValue\[\]](#SearchCustomizationRuleValue)

Description

A list of rule values. 



 |

## SearchCustomizationRuleValue

Represents the value of a rule used to filter search results.

| Field Name | Description |
| --- | --- |
| targetObjectApiName | 
Field Type

string

Description

The API name of the target object, in case the rule applies to a lookup field.



 |
| value | 

Field Type

string

Description

Required.

The value of the rule.





 |

## Declarative Metadata Sample Definition

The following is an example of a SearchCustomization component.

<?xml version="1.0" encoding="UTF-8"?>
<SearchCustomization xmlns="http://soap.sforce.com/2006/04/metadata">
    <channel\>GlobalSearch</channel\>
    <masterLabel\>My\_Standard\_User\_Configuration</masterLabel\>
    <objectOverride\>
        <fieldOverride\>
            <fieldApiName\>Description</fieldApiName\>
            <searchable\>false</searchable\>
        </fieldOverride\>
        <fieldOverride\>
            <fieldApiName\>Rating</fieldApiName\>
            <searchable\>true</searchable\>
        </fieldOverride\>
        <objectApiName\>Account</objectApiName\>
        <rule\>
            <fieldApiName\>My\_Custom\_Field\_\_c</fieldApiName\>
            <operator\>ne</operator\>
            <ruleValue\>
                <value\>Other</value\>
            </ruleValue\>
        </rule\>
        <rule\>
            <fieldApiName\>Rating</fieldApiName\>
            <operator\>in</operator\>
            <ruleValue\>
                <value\>Hot</value\>
            </ruleValue\>
            <ruleValue\>
                <value\>Warm</value\>
            </ruleValue\>
        </rule\>
    </objectOverride\>
    <objectOverride\>
        <objectApiName\>Asset</objectApiName\>
        <searchable\>false</searchable\>
    </objectOverride\>
    <objectOverride\>
        <objectApiName\>Contact</objectApiName\>
        <rule\>
            <fieldApiName\>AccountId</fieldApiName\>
            <operator\>ne</operator\>
            <ruleValue\>
                <targetObjectApiName\>Account</targetObjectApiName\>
                <value\>A Company</value\>
            </ruleValue\>
        </rule\>
        <rule\>
            <fieldApiName\>DoNotCall</fieldApiName\>
            <operator\>eq</operator\>
            <ruleValue\>
                <value\>false</value\>
            </ruleValue\>
        </rule\>
    </objectOverride\>
    <objectToAlwaysSearch\>Account</objectToAlwaysSearch\>
    <objectToAlwaysSearch\>Contact</objectToAlwaysSearch\>
    <objectToAlwaysSearch\>My\_Custom\_Object\_\_c</objectToAlwaysSearch\>
    <objectToAlwaysSearch\>Product2</objectToAlwaysSearch\>
    <profile\>standard</profile\>
</SearchCustomization\>

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>\*</members\>
        <name\>SearchCustomization</name\>
    </types\>
    <version\>61.0</version\>
</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](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.").