This articles discusses how each metadata type that is available to be deployed using Snapshot is applied in Salesforce. For example, Apex Classes cannot be merged with existing code and only replaced. However, Profiles: Field Permissions can be merged with existing Field Permissions.
The Metadata API matches metadata using the API Name of the metadata component. So, if there is no match with a given API Name, a new component is typically introduced. However, if there is a match, the matched metadata is replaced with newer information being deployed. For example, if there is a Profile A with Field Permissions for Account.Active__c in destination. The deployed metadata has Profile A with Field Permissions for Account.Active__c and Account.Value__c. Then, Profile A is merged, Field Permission for Account.Active__c is replaced and Field Permission for Account.Value__c is created. So, there is a combination of merging and replacing depending on metadata component and granularity in question.
Here are the types and their merge/ replace values:
Metadata Type | Merged/ Replaced |
Notes |
Action Link Group Templates | Inserted/ Replaced | |
Analytic Snapshots | Inserted/ Replaced | |
Apex Classes | Inserted/ Replaced | |
Apex Components | Inserted/ Replaced | |
Apex Pages | Inserted/ Replaced | |
Apex Test Suites | Inserted/ Replaced | |
Apex Triggers | Inserted/ Replaced | |
App Menus | Inserted/ Replaced | |
App Menus: App Menu Item | Inserted/ Replaced | |
Approval Processes | Inserted/ Replaced | |
Assignment Rules | Inserted/ Merged | |
Assignment Rules: Assignment Rule | Inserted/ Replaced | |
Auth Providers | Inserted/ Replaced | |
Auto Response Rules | Inserted/ Merged | |
Auto Response Rules: Auto Response Rule | Inserted/ Replaced | |
Branding Set | Inserted/ Replaced | |
Call Centers | Inserted/ Replaced | |
Campaign Influence Models | Inserted/ Replaced | |
Case Subject Particle | Inserted/ Replaced | |
Certificates | Inserted/ Replaced | |
Channel Layouts | Inserted/ Replaced | |
Chatter Extensions | Inserted/ Replaced | |
Clean Data Services | Inserted/ Replaced | |
Communities | Inserted/ Replaced | |
Community Template Definitions | Inserted/ Replaced | |
Community Theme Definitions | Inserted/ Replaced | |
Connected Apps | Inserted/ Replaced | |
Content Assets | Inserted/ Replaced | |
CORS Whitelist Origin | Inserted/ Replaced | |
CSP Trusted Site | Inserted/ Replaced | |
Custom Applications | Inserted/ Replaced | |
Custom Application Components | Inserted/ Replaced | |
Custom Feed Filters | Inserted/ Replaced | |
Custom Labels | Inserted/ Merged | |
Custom Labels: Custom Label | Inserted/ Replaced | |
Custom Metadata | Inserted/ Replaced | |
Custom Objects | Inserted/ Merged | |
Custom Objects: Business Processes | Inserted/ Replaced | |
Custom Objects: Compact Layouts | Inserted/ Replaced | |
Custom Objects: Fields | Inserted/ Replaced | |
Custom Objects: Field Sets | Inserted/ Replaced | |
Custom Objects: List Views | Inserted/ Replaced | |
Custom Objects: Record Types | Inserted/ Replaced | |
Custom Objects: Sharing Reasons | Inserted/ Replaced | |
Custom Objects: Validation Rules | Inserted/ Replaced | |
Custom Objects: Web Links | Inserted/ Replaced | |
Custom Object Translations | Inserted/ Merged | |
Custom Object Translations: Fields | Inserted/ Replaced | |
Custom Object Translations: Page Layouts | Inserted/ Replaced | |
Custom Object Translations: Quick Actions | Inserted/ Replaced | |
Custom Object Translations: Record Types | Inserted/ Replaced | |
Custom Object Translations: Sharing Reasons | Inserted/ Replaced | |
Custom Object Translations: Standard Fields | Inserted/ Replaced | |
Custom Object Translations: Validation Rules | Inserted/ Replaced | |
Custom Object Translations: Web Links | Inserted/ Replaced | |
Custom Object Translations: Workflow Tasks | Inserted/ Replaced | |
Custom Page Web Links | Inserted/ Merged | |
Custom Permissions | Inserted/ Merged | |
Custom Sites | Inserted/ Merged | |
Custom Tabs | Inserted/ Merged | |
Dashboards | Inserted/ Merged | |
Data Category Groups | Inserted/ Replaced | Metadata API recommends that we do not deploy Category Groups using the API |
Delegate Groups | Inserted/ Merged | |
Documents | Inserted/ Merged | |
Duplicate Rules | Inserted/ Merged | |
Duplicate Rules: Duplicate Rule | Inserted/ Replaced | |
Eclair Geo Data | Inserted/ Merged | |
Email Services Functions | Inserted/ Replaced | |
Email Templates | Inserted/ Merged | |
Embedded Service Branding | Inserted/ Replaced | |
Embedded Service Config | Inserted/ Replaced | |
Embedded Service Live Chat | Inserted/ Replaced | |
Entitlement Processes | Inserted/ Merged | |
Entitlement Templates | Inserted/ Merged | |
Escalation Rules | Inserted/ Merged | |
Escalation Rules: Escalation Rule | Inserted/ Replaced | |
Event Deliveries | Inserted/ Merged | |
Event Subscriptions | Inserted/ Merged | |
External Data Sources | Inserted/ Merged | |
External Service Registrations | Inserted/ Merged | |
Feature Parameter Booleans | Inserted/ Replaced | |
Feature Parameter Dates | Inserted/ Replaced | |
Feature Parameter Integers | Inserted/ Replaced | |
FlexiPages | Inserted/ Replaced | |
Flows | Inserted/ Merged | |
Flow Definitions | Inserted/ Merged | |
Global Value Sets | Inserted/ Merged | |
Global Value Sets: Custom Value | Inserted/ Replaced | |
Global Value Sets Translation | Inserted/ Replaced | |
Global Value Sets Translation: Value Translation | Inserted/ Replaced | |
Groups | Inserted/ Merged | |
Home Page Components | Inserted/ Merged | |
Home Page Layouts | Inserted/ Replaced | |
Installed Packages | Inserted/ Replaced | |
Keyword Lists | Inserted/ Replaced | |
Letterheads | Inserted/ Merged | |
Lightning Bundles | Inserted/ Replaced | |
LiveAgent Chat Configurations | Inserted/ Replaced | |
LiveAgent Buttons | Inserted/ Replaced | |
LiveChat Deployments | Inserted/ Replaced | |
LiveChat Sensitive Data Rules | Inserted/ Replaced | |
Managed Topics | Inserted/ Merged | |
Managed Topics: Managed Topic | Inserted/ Replaced | |
Matching Rules | Inserted/ Merged | |
Matching Rules: Matching Rule | Inserted/ Replaced | |
Milestone Types | Inserted/ Replaced | |
Moderation Rules | Inserted/ Merged | |
Named Credentials | Inserted/ Replaced | |
Network Branding | Inserted/ Replaced | |
Networks | Inserted/ Replaced | |
Page Layouts | Inserted/ Replaced | |
Path Assistant | Inserted/ Replaced | |
Permission Sets | Inserted/ Merged | |
Permission Sets: Apex Class Accesses | Inserted/ Replaced | |
Permission Sets: Apex Page Accesses | Inserted/ Replaced | |
Permission Sets: Application Visibility | Inserted/ Replaced | |
Permission Sets: Field Permissions | Inserted/ Replaced | |
Permission Sets: Object Permissions | Inserted/ Replaced | |
Permission Sets: Record Type Visibility | Inserted/ Replaced | |
Permission Sets: Tab Visibility | Inserted/ Replaced | |
Permission Sets: User Permissions | Inserted/ Replaced | |
Permission Sets: Custom Permissions | Inserted/ Replaced | |
Platform Cache Partitions | Inserted/ Replaced | |
Portals | Inserted/ Merged | |
Post Templates | Inserted/ Merged | |
Profiles | Inserted/ Merged | |
Profiles: Apex Class Accesses | Inserted/ Replaced | |
Profiles: Apex Page Accesses | Inserted/ Replaced | |
Profiles: Application Visibility | Inserted/ Replaced | |
Profiles: Field Permissions | Inserted/ Replaced | |
Profiles: Layout Assignments | Inserted/ Replaced | |
Profiles: Object Permissions | Inserted/ Replaced | |
Profiles: Record Type Visibility | Inserted/ Replaced | |
Profiles: Tab Visibility | Inserted/ Replaced | |
Profiles: User Permissions | Inserted/ Merged | |
Profiles: Custom Permissions | Inserted/ Merged | |
Profile Password Policies | Inserted/ Replaced | |
Profile Session Settings | Inserted/ Replaced | |
Queues | Inserted/ Merged | |
Quick Actions | Inserted/ Merged | |
Remote Site Settings | Inserted/ Merged | |
Reports | Inserted/ Merged | |
Report Types | Inserted/ Merged | |
Roles | Inserted/ Merged | |
SAML SSO Configurations | Inserted/ Replaced | |
Scontrols | N/A | Cannot be deployed using Metadata API anymore |
Settings | Inserted/ Replaced | |
Sharing Rules | Inserted/ Merged | |
Sharing Rules: Criteria Based | Inserted/ Replaced | |
Sharing Rules: Owner Based | Inserted/ Replaced | |
Sharing Rules: Territory Based | Inserted/ Replaced | |
Sharing Sets | Inserted/ Merged | |
Site Dot Com | Inserted/ Replaced | |
Skills | Inserted/ Merged | |
Standard Value Sets | Inserted/ Replaced | |
Standard Value Sets: Standard Value | Inserted/ Replaced | |
Standard Value Sets Translation | Inserted/ Replaced | |
Standard Value Sets Translation: Value Translation | Inserted/ Replaced | |
Static Resources | Inserted/ Replaced | |
Synonym Dictionaries | Inserted/ Merged | |
Territories | Inserted/ Replaced | |
Territory Models | Inserted/ Replaced | |
Territory Types | Inserted/ Replaced | |
Topics for Objects | Inserted/ Merged | |
Transaction Security Policies | Inserted/ Replaced | |
Translations | Inserted/ Merged | |
Translations: Custom Applications | Inserted/ Replaced | |
Translations: Custom Labels | Inserted/ Replaced | |
Translations: Custom Page Web Links | Inserted/ Replaced | |
Translations: Custom Tabs | Inserted/ Replaced | |
Translations: Quick Actions | Inserted/ Replaced | |
Translations: Report Types | Inserted/ Replaced | |
Translations: Scontrols | Inserted/ Replaced | |
User Criteria | Inserted/ Replaced | |
Wave Application | Inserted/ Replaced | |
Wave Dataflows | Inserted/ Replaced | |
Wave Dashboards | Inserted/ Replaced | |
Wave Datasets | Inserted/ Replaced | |
Wave Lenses | Inserted/ Replaced | |
Wave Bundles | Inserted/ Replaced | |
Wave XMDs | Inserted/ Replaced | |
Workflows | Inserted/ Merged | |
Workflows: Alerts | Inserted/ Replaced | |
Workflows: Field Updates | Inserted/ Replaced | |
Workflows: Flow Actions | Inserted/ Replaced | |
Workflows: Knowledge Publishes | Inserted/ Replaced | |
Workflows: Outbound Messages | Inserted/ Replaced | |
Workflows: Rules | Inserted/ Replaced | |
Workflows: Tasks | Inserted/ Replaced |