---
schema_version: "1"
id: b933addbcbc54a64e51b38146196e7fa9c8d4fded8bf090e4c99265af22362a9
title: Metadata Components and Types
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_objects_intro.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7436d875f0a5962b9e07c349a981668929ecc5e718673692b14f769aa8ea973f
description: Metadata components are not based on sObjects, like objects in the API. Instead, they are based on metadata types, such as ApexClass and CustomObject, which extend Metadata, the base class for all metadata types. A component is an instance of a metadata type.
---
# Metadata Components and Types

Metadata components are not based on sObjects, like objects in the API. Instead, they are based on metadata types, such as ApexClass and CustomObject, which extend Metadata, the base class for all metadata types. A component is an instance of a metadata type.

For example, CustomObject is a metadata type for custom objects, and the MyCustomObject\_\_c component is an instance of a custom object.

A metadata type can be identified in the metadata WSDL as any complexType that extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/metadata.htm) complexType. A complexType that is a metadata type includes the following element in its WSDL definition:

<xsd:extension base="tns:Metadata">

CustomObject and BusinessProcess extend Metadata so they are metadata types; ActionOverride doesn't extend Metadata so it's not a metadata type.

You can individually deploy or retrieve a component for a metadata type. For example, you can retrieve an individual BusinessProcess component, but you can't retrieve an individual ActionOverride component. You can only retrieve an ActionOverride component by retrieving its encompassing CustomObject component.

Metadata components can be manipulated by [asynchronous Metadata API calls](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_calls_intro.htm "Use the CRUD-based metadata calls to create, update, or delete setup and configuration components for your organization or application. These configuration components include custom objects, custom fields, and other configuration metadata. The metadata calls mimic the behavior in the Salesforce user interface for creating, updating, or deleting components. Whatever rules apply there also apply to these calls.") or [declarative (or file-based) Metadata API calls](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based.htm).

Most of the components can be accessed using Salesforce Extensions for Visual Studio Code. Exceptions are noted in the description of the object.

## Field Data Types

Each component field has a specific field type. These field types can correspond to other components defined in the WSDL, or primitive data types, like string, that are commonly used in strongly typed programming languages.

These field data types are used in the messages that are exchanged between your client application and the API. When writing your client application, follow the data typing rules defined for your programming language and development environment. Your development tool handles the mapping of typed data in your programming language with these data types.

For more information, see [Primitive Data Types in the Salesforce Object Reference](https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/primitive_data_types.htm "html (New Window)").

## Enumeration Fields

Some component fields have a data type that is an enumeration. An enumeration is the API equivalent of a picklist. The valid values of the field are restricted to a strict set of possible values, all having the same data type. These values are listed in the field description column for each enumeration field. See [Dashboard: sortBy](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_dashboard.htm) for an example of an enumeration field of type string. The XML below shows a sample definition of an enumeration of type string in the WSDL.

<xsd:simpleType name="DashboardComponentFilter">
    <xsd:restriction base="xsd:string">
        <xsd:enumeration value="RowLabelAscending"/>
        <xsd:enumeration value="RowLabelDescending"/>
        <xsd:enumeration value="RowValueAscending"/>
        <xsd:enumeration value="RowValueDescending"/>
    </xsd:restriction\>
</xsd:simpleType\>

## Supported Calls

All of the metadata types are supported by the main calls, unless it is stated otherwise in the individual component sections. The main Metadata API calls are:

- [CRUD calls](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_crud_based_calls_intro.htm "Use CRUD-based calls to work with metadata components in a manner similar to how synchronous API calls in the enterprise WSDL act upon objects."), such as [createMetadata()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_createMetadata.htm "Adds one or more new metadata components to your organization synchronously.") and [deleteMetadata()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deleteMetadata.htm "Deletes one or more metadata components from your organization synchronously.")
- [File-based calls](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_file_based_calls_intro.htm "Use file-based calls to deploy or retrieve XML components."), such as [deploy()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy.htm "Uses file representations of components to create, update, or delete those components in a Salesforce org.") and [retrieve()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_retrieve.htm "The retrieve() call retrieves XML file representations of components in an organization.")
- [Utility calls](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_utility_calls_intro.htm "Use utility calls to gather information that is useful for working with the file-based or CRUD-based calls."), such as [listMetadata()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_listmetadata.htm "This call retrieves property information about metadata components in your organization. Data is returned for the components that match the criteria specified in the queries parameter. The queries array can contain up to three ListMetadataQuery queries for each call. This call supports every metadata type: both top-level, such as CustomObject and ApexClass, and child types, such as CustomField and RecordType.") and [describeMetadata()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_describe.htm "This call retrieves the metadata that describes your organization. This information includes Apex classes and triggers, custom objects, custom fields on standard objects, tab sets that define an app, and many other metadata types.")