Tag
Represents a named label that can be applied to Salesforce metadata records to
categorize, describe, or classify them. Tags are organized within a TagSet, which defines
the category they belong to. For example, a TagSet named DataDomain might contain Tags such
as Financial, Operational, or Legal. Use Tag to define the individual classification values
available in a category.
Parent Type
This type extends the Metadata metadata type and inherits its
fullName field.
File Suffix and Directory Location
Tag components are stored in .tagset files as children of TagSet.
Version
Tag components are available in API version 67.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| description | string | A description of the tag. |
| label | string | Required. Label that identifies the tag in the Salesforce user interface. |
| name | string | Required. The unique name of the tag. Can contain only underscores and alphanumeric characters and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. |
| options | TagOption[] | A list of options associated with the tag. |
| properties | TagProperty[] | A list of properties associated with the tag. |
TagOption
Represents an option associated with a tag.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Required. The name of the option. |
| value | boolean | Required. The value of the option. |
TagProperty
Represents a property associated with a tag.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Required. The name of the property. |
| value | string | Required. The value of the property. |
Wildcard Support in the Manifest File
This metadata type doesn’t support 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.
Use the listMetadata() call to discover custom Tags and TagSets in your org.