How to Create a Snapshot Difference

Updated 1 week ago by Copado Solutions

Creating a Snapshot Difference

To create a snapshot difference follow the steps below:

  1. Navigate to the Snapshot Differences tab and click on New.
  2. Give your difference a name.
  3. Select the format in which you want the differences to be displayed. The available options are XML, YAML or JSON.
Using JSON or YAML reduces the calculation time by about 50% and the attachment file size in comparison to the standard XML comparison option.
  1. Select a source and a destination option. It can be a Git commit or a Salesforce org.
  2. Based on the option selected in the previous step, select a source and a destination commit or Salesforce org.
  3. Click on Save:

  1. Once you click on Save and then on Calculate Differences, Copado will perform a full metadata retrieve/checkout of your source and destination org/commit (*1). Once completed, the differences will appear in the grid (example shown below):

If you choose a Salesforce org, all metadata types will be retrieved. Bear in mind that since this is a file-based functionality, nested components such as CustomField, ValidationRule, etc, are already contained within the CustomObject type.
If you choose a Git commit, whatever files are committed to the repository will be used for the comparison.

Creating a Partial Snapshot Difference

If you choose a Salesforce org as source, a Partial Selection checkbox becomes available. Choosing individual files will allow you to quickly compare only the selected files.

  1. Make sure that you select Salesforce org as source and destination and select the option Partial Selection:

  1. Select some files from the grid and click on Save:
  1. Click on Calculate Differences. Differences, if any, will be displayed in the same way as a regular snapshot difference.
Please note that in order to run a partial snapshot difference on a nested component, you need to select the parent metadata type. E.g. To retrieve the differences in a custom field you need to select the object it belongs to.

After creating a snapshot difference, you can click on Create Deployment to create a standalone metadata deployment or on Commit Changes to commit the differences on a user story.

How did we do?