---
schema_version: "1"
id: 1309d5fe21a226ca093873a632a1c7c84c2fca78d4bb8ad17e836951299bc304
title: MarketSegmentDefinition
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_marketsegmentdefinition.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_marketsegmentdefinition.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c77eebbd302d6f0c83665c302d14e0aeba4c250b331d2a6fcf44d3f8791c9708
description: Represents the field values for MarketSegmentDefinition. MarketSegmentDefinition is used to store the exportable metadata of a segment, such as segment criteria and other attributes. Developers can create segment definition packages, pass segment definition in the form of data build tool (DBT), and publish it on AppExchange for subscriber organizations to install and instantiate these segments.
---
# MarketSegmentDefinition

Represents the field values for MarketSegmentDefinition. MarketSegmentDefinition is used to store the exportable metadata of a segment, such as segment criteria and other attributes. Developers can create segment definition packages, pass segment definition in the form of data build tool (DBT), and publish it on AppExchange for subscriber organizations to install and instantiate these segments.

![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.") type and inherits its fullName field.

## File Suffix and Directory Location

MarketSegmentDefinition components have the suffix .marketSegmentDefinition and are stored in the marketSegmentDefinitions folder.

## Version

MarketSegmentDefinition components are available in API version 55.0 and later.

## Fields

| Field Name | Description |
| --- | --- |
| additionalMetadata | 
Field Type

string

Description

An XML CLOB to hold name-value pairs for storing additional metadata. Not applicable for DBT type segment.



 |
| excludeCriteria | 

Field Type

string

Description

Holds the JSON exclude criteria for UI based segments. Not applicable for DBT or Lookalike segments.



 |
| includeCriteria | 

Field Type

string

Description

An XML wrapped in a CDATA section that captures DBT definition. Only single model DBT is supported.



 |
| masterLabel | 

Field Type

string

Description

Required. Specifies the display name of the field value.





 |
| segmentOn | 

Field Type

string

Description

Required when segmentType is UI. Points to relevant MktDataModelObject entity instance. A valid developerName for an MktDataModelObject instance of Profile type.



 |
| segmentType | 

Field Type

MarketSegmentType (enumeration of type string)

Description

Required. Specifies the type of the segment to be created. Only DBT is supported via API.

Values are:

- DBT
- Dynamic
- Lookalike
- UI
- EinsteinGPTSegmentsUI





 |

## Declarative Metadata Sample Definition

The following is an example of a MarketSegmentDefinition component.

<?xml version="1.0" encoding="UTF-8"?>
<MarketSegmentDefinition\>
    <segmentType\>DBT</segmentType\>
    <includeCriteria\>
    <!\[CDATA\[
        <DbtPipeline\>
            <models\>
                <model\>
                    <name\>m1</name\>
                    <sql\>select ssot\_\_Individual\_\_dlm.ssot\_\_Id\_\_c from ssot\_\_Individual\_\_dlm</sql\>
                </model\>
            </models\>
        </DbtPipeline\>
        \]\]>
    </includeCriteria\>
    <masterLabel\>msd2\_simple</masterLabel\>
</MarketSegmentDefinition\>

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:Package xmlns:ns2="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>\*</members\>
        <name\>MarketSegmentDefinition</name\>
    </types\>
    <version\>55.0</version\>
</ns2:Package\>

## Wildcard Support in the Manifest File

The wildcard character \* (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see [Settings](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_settings.htm). For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).