Metadata

 

Overview

 

Metadata is often referred to as “Data about Data”. In Salesforce specifically, metadata refers to the definition of the underlying configuration. Metadata helps define how the system is structured, how automation is processed, how security is configured and many other details regarding the “setup” of a Salesforce Instance.

 

Types of Metadata

 

With regard to Salesforce, there are different types that developers and admins may interact with.

 

Objects and Fields

From an Object perspective, metadata will tell you the Name of an object, whether feed tracking is enabled, if chatter is allowed, global search and other valuable setup items.

From a field perspective, metadata allows you to know the field type, description, help text, values (if picklist), required status and other variables depending on the type of field being retrieved.

 

Validation Rules

Validation Rule data focuses on the Name, Error Condition, Description, Error Message and Active status. When working in an IDE or moving data an  Admin/Developer gets insight into what the Validation Rule does and where it may conflict with existing configuration in an Org or Package.

 

Flow

Flow information gives version detail, active status, decision criteria, element data and encapsulates the overall process of the flow. When working in an IDE this allows Developers and Admins to make updates without having to go into the flow builder UI, making it easier to update API names for field references, decision criteria etc. It also allows you to compare versions and see specific changes that were made.

 

Security and Sharing

From a Profile/Permission set perspective, metadata will tell you everything you need to know about what permissions your configuration allows. Object visibility, field and record type access, user permissions and permission set information (similar to Profiles). This is helpful when developing in an IDE as you are able to expand/remove access directly in your tooling application without having to go into Salesforce. This allows you to see version differences in real time and track/compare changes as you go. From a sharing perspective, you can see what Objects are Private, Public, Granted by Parent, etc.

 

How to Interact

 

Salesforce offers two different API’s that help Developers and Admins do their jobs successfully.

 

Metadata API

This API allows developers and admins to retrieve, deploy, update and delete information seamlessly. The API increases version control quality, makes deployments easier and allows you to automate certain aspects of metadata management through pipelines and tools like Git, Bitbucket, Jenkins etc.

 

Tooling API

The Tooling API also allows developers and admins to retrieve, deploy, update and delete metadata, but it goes a step beyond the Metadata API by integrating with IDE’s to allow customization to the metadata in real time.

A developer can pull an apex class down and locally make changes to the code, tracking the version difference between the org they pulled from. They can then deploy those updates directly back to Salesforce.

It allows for net new configuration of web components, integrations and more.

From an Admin perspective, Objects can be retrieved and modified, along with fields, page layouts, record types etc.

These changes can be committed through Git/Bitbucket to allow for review in a package before deployment to a destination org.

 

Related Terms