Reference of Deployment tags for package.xml on supported Metadata types. While working with Salesforce Deployment tools like ANT Deployment tool and Salesforce DX I continue to search for various metadata tags used by package.xml file. Unfortunately I did not find a single place where all of these tags are documented. Metadata API Developer Guide is a good resource but does not give all tags especially with naming of items differences. There is also existing hallenge to find actual item names or API anmes that sometime use _ separators.
This guide is a work in progress and will be updated with more supported items. It is designed to give easy reference list of tags and examples use cases that can be applied to package.xml to retrieve or deploy different metadata code and declarative items. For complete list of supported metadata items can be found at Metadata Coverage report API v44.0
Below are examples of supported metadata types that can be managed by Metadata API via ANT or DX tools
Prompt example metadata included
<types>
<members>*</members>
<name>Prompt</name>
</types>
<types>
<members>*</members>
<name>AccessControlPolicy</name>
</types>
<types>
<members>*</members>
<name>AccountSettings</name>
</types>
<types>
<members>*</members>
<name>ActionLinkGroupTemplate</name>
</types>
<types>
<members>*</members>
<name>ActivitiesSettings</name>
</types>
<types>
<members>*</members>
<name>AddressSettings</name>
</types>
<types>
<members>*</members>
<name>AnalyticSnapshot</name>
</types>
<types>
<members>*</members>
<name>ApprovalProcess</name>
</types>
<types>
<members>*</members>
<name>CustomApplication</name>
</types>
// named app
<types>
<members>Corporate_Clients_App</members>
<name>CustomApplication</name>
</types>
<types>
<members>CaseSelector</members>
<members>CaseSelectorTest</members>
<name>ApexClass</name>
</types>
<types>
<members>CaseTrigger</members>
<members>OpptyTrigger</members>
<name>ApexTrigger</name>
</types>
<types>
<members>MyTestPage</members>
<name>ApexPage</name>
</types>
<types>
<members>*</members>
<name>ApexComponent</name>
</types>
Test suite is set up in Developer Console to collect relevant unit tests ot execute as groups
<types>
<members>*</members>
<name>ApexTestSuite</name>
</types>
<types>
<members>*</members>
<name>AuthProvider</name>
</types>
<types>
<members>*</members>
<name>AutoResponseRules</name>
</types>
<types>
<members>*</members>
<name>Bot</name>
</types>
<types>
<members>*</members>
<name>BotVersion</name>
</types>
<types>
<members>*</members>
<name>BusinessHoursEntry</name>
</types>
<types>
<members>*</members>
<name>BusinessHoursSettings</name>
</types>
<types>
<members>my_theme_footer</members>
<members>my_theme_header</members>
<name>AuraDefinitionBundle</name>
</types>
<types>
<members>My_Record_Page</members>
<name>FlexiPage</name>
</types>
Note some differences in item definitions, some declarative items use API name with underscroes _
or dashes -
others uses spaces.
<types>
<members>*</members>
<name>AppMenu</name>
</types>
<types>
<members>*</members>
<name>CallCenter</name>
</types>
<types>
<members>*</members>
<name>CampaignInfluenceModel</name>
</types>
<types>
<members>*</members>
<name>CaseSettings</name>
</types>
<types>
<members>*</members>
<name>CaseSubjectParticle</name>
</types>
<types>
<members>*</members>
<name>Certificate</name>
</types>
<types>
<members>*</members>
<name>ChannelLayout</name>
</types>
<types>
<members>MyTestApp</members>
<name>ConnectedApp</name>
</types>
<types>
<members>*</members>
<name>ContentAsset</name>
</types>
<types>
<members>*</members>
<name>ContractSettings</name>
</types>
<types>
<members>*</members>
<name>CorsWhitelistOrigin</name>
</types>
Sobjects can be standard and custom or custom metadata type. Custom object has __c
and metadata type __mdt
postfix.
For standard object such as Case
below tag will pull all customizations in single file.
For custom objects metadata will have complete object xml definition with all fields included.
<types>
<members>Case</members>
<members>MyCustomObject__c</members>
<members>MyMeta_Settings__mdt</members>
<name>CustomObject</name>
</types>
<types>
<members>MyObject__c.Final_Test__c</members>
<members>MyObject__c.Total__c</members>
<members>Lead.SomeCustomField__c</members>
<name>CustomField</name>
</types>
<types>
<members>*</members>
<name>CustomTab</name>
</types>
<types>
<members>*</members>
<name>CustomObjectTranslation</name>
</types>
Custom Metadata containes object + all of the data. WHile deploying we can copy all the data or sepcific field as example bellow indicate
Copy single field data example:
<types>
<members>MY_Settings.My_Community</members>
<name>CustomMetadata</name>
</types>
Copy all data and object definition for c=ustiom metadata type LiveAgent_Custom__mdt
example:
<types>
<members>*</members>
<name>CustomMetadata</name>
</types>
<types>
<members>LiveAgent_Custom__mdt</members>
<name>CustomObject</name>
</types>
<types>
<members>EventName__e</members>
<name>CustomObject</name>
</types>
<types>
<members>Images/Logo.png</members>
<name>Document</name>
</types>
<types>
<members>Case.All_Access_User</members>
<members>Case.DOC_Only_User</members>
<members>Case.Market_Mgr</members>
.
.
. 100s of rules
<members>Case.VAT_Mgr</members>
<name>SharingCriteriaRule</name>
</types>
Static resources are typically zip files containing images or JavaScript & CSS code or frameworks, data fiels, any file type. Static resources have org wide limit size: 250MB as of Winter '19 release.
<types>
<members>SLDS203</members>
<members>jquery_min_1_12_4</members>
<members>w3css</members>
<name>StaticResource</name>
</types>
<types>
<members>Opportunity.Open_My_Page</members>
<name>QuickAction</name>
</types>
<types>
<members>Opportunity.My_Button</members>
<name>WebLink</name>
</types>
The example below describe layout for Cutom metadata
<types>
<members>MyMeta_Settings__mdt-My Settings Layout</members>
<name>Layout</name>
</types>
<types>
<members>Lead.Corp_B2B</members>
<members>Opportunity.Corp_B2B</members>
<members>Account.Corp_B2B</members>
<name>CompactLayout</name>
</types>
This item can represent Lightning App definition that is different from actual app we build with AppBuilder or with code.
<types>
<members>Opp_Corp_Record_Page</members>
<members>Corp_Lead_Record_Page</members>
<members>Corporate_Account_Record_Page</members>
<name>FlexiPage</name>
</types>
Automation items such as Flows or Process Builders are represented by Flow
tag. Note a version number on flow tag after name indicates what version of PB or FLOW is used Create_Lead_Activities-2
, format is <API Name of Process Builder/Flow>-. Make sure the correct version is also Active process you are trying ot deploy.
<types>
<members>Create_Lead_Activities-2</members>
<name>Flow</name>
</types>
Export all custom Labels defined in the org. Current Metadata can sdefine individual labels, however export or dseploy only full set on labels.
<types>
<members>CustomLabels</members>
<name>CustomLabels</name>
</types>
<types>
<members>Case.My Validation Name</members>
<name>ValidationRule</name>
</types>
<types>
<members>MyFolder/My_Test_Changed_Password</members>
<members>MyFolder/My_Test_Forgot_Password</members>
<members>NewFolder/My_Welcome_Email</members>
<name>EmailTemplate</name>
</types>
<types>
<members>*</members>
<name>Letterhead</name>
</types>
<types>
<members>Account.recordTypeName</members>
<name>RecordType</name>
</types>
Assignment rules can be for Case or Lead or other objects.
<types>
<members>Case.Case Assignment Rule</members>
<name>AssignmentRule</name>
</types>
<types>
<members>Case.Course Update Request</members>
<name>BusinessProcess</name>
</types>
<types>
<members>Case.Course_Update_Cases</members>
<name>ListView</name>
</types>
<types>
<members>ExtraReports</members><!--Report Folder-->
<members>ExtraReports/AnyOccupation</members><!--Report-->
<members>unfiled$public/Test</members><!--Report from Unfiled Public Reports-->
<name>Report</name>
</types>
<types>
<members>*</members>
<name>ReportType</name>
</types>
<types>
<members>MyDashboards</members><!--Dashboard Folder-->
<members>MyDashboards/AnyCourseType</members><!--Dashboard-->
<name>Dashboard</name>
</types>
<types>
<members>My_Process_Update_Request</members>
<name>PermissionSet</name>
</types>
<types>
<members>TestProfile</members>
<name>Profile</name>
</types>
<types>
<members>*</members>
<name>Role</name>
</types>
<types>
<members>*</members>
<name>Queue</name>
</types>
// named queue
<types>
<members>B2B_Lead_Q</members>
<members>Corporate_Q</members>
<name>Queue</name>
</types>
<types>
<members>*</members>
<name>Group</name>
</types>
// Groups names
<types>
<members>HR_Mgr</members>
<members>Sales_Mgr</members>
<members>Market_West_Mgr</members>
<members>Market_East_Mgr</members>
<name>Group</name>
</types>
<types>
<members>*</members>
<name>HomePageComponent</name>
</types>
<types>
<members>*</members>
<name>HomePageLayout</name>
</types>
<!-- Home Page Custom Link -->
<types>
<members>*</members>
<name>CustomPageWebLink</name>
</types>
<types>
<members>ObjectName.WorkFlowName</members>
<name>Workflow</name>
</types>
<types>
<members>Account.Email_Invalid</members>
<members>Lead.Invalid_Email</members>
<name>WorkflowFieldUpdate</name>
</types>
<types>
<members>ObjectName.FieldUpdateName</members>
<name>WorkflowAlert</name>
</types>
<types>
<members>ObjectName.FieldUpdateName</members>
<name>WorkflowOutboundMessage</members>
</types>
<types>
<members>Account.Invalid Email Changed or Blank - Account</members>
<members>Lead.Invalid Email Changed or Blank - Lead</members>
<name>WorkflowRule</name>
</types>
<types>
<members>ObjectName.FieldUpdateName</members>
<name>WorkflowTask</name>
</types>
Deploying Community changes with metadata can be challenging, need ot deploy 3 different items described here bellow.
<types>
<members>*</members>
<name>BrandingSet</name>
</types>
<types>
<members>*</members>
<name>Community</name>
</types>
<types>
<members>*</members>
<name>CommunityTemplateDefinition</name>
</types>
<types>
<members>*</members>
<name>CommunityThemeDefinition</name>
</types>
<types>
<members>ECommerce</members>
<name>CustomSite</name>
</types>
<types>
<members>*</members>
<name>CustomObjectTranslation</name>
</types>
<types>
<members>Lead.Prospect_Matching_Rule</members>
<members>PersonAccount.Person_Account_Matching_Rule</members>
<name>MatchingRule</name>
</types>
<types>
<members>ECommerce</members>
<name>Network</name>
</types>
<types>
<members>*</members>
<name>NetworkBranding</name>
</types>
In the prior versions of metadata before 43.0 it was this:
<types>
<members>ECommerce_C</members>
<name>SiteDotCom</name>
</types>
No with metadata API V44.0 SiteDocCom changed to this:
<types>
<members>ECommerce1</members>
<name>SiteDotCom</name>
</types>
<types>
<members>*</members>
<name>Audience</name>
</types>