Snapshot Differences

Updated 4 days ago by Iván Minaya

This feature performs a comparison between two Salesforce Orgs, between two Git Commits or between a Salesforce Org and a Git Commit. The differences can be filtered by Type of difference (create, update and delete) and File name. When the difference is of type update, a "Show Diff" link is displayed next to the file name, clicking on it will display a side by side comparison.

These Snapshot differences can then be deployed to help maintain consistency between various sandboxes and/or the production environment. The selection of Source and Destination Orgs is not limited to connected Salesforce instances (Production-Sandbox or Sandboxes for the same Organisation).

Creating an Snapshot Difference

Click on the “Snapshot Differences” tab and press the “New” button.

The below screenshot will appear. Fill in the data as required and press, “Save”.

Once the “Save” and then the "Calculate Differences" button are pressed, 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).

Note1: When choosing 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. When choosing Git commit, whatever files are committed to the repository will be used for the comparison.

YAML and JSON Differences

If the Snapshot Difference record name contains @yaml or @jsonthen while calculating the differences all the XML files will be converted to YAML or JSON format. This option reduces about 50% of the calculation time and the attachment file size when compared to the standard XML comparison option.

Example YAML differences:

Example JSON Differences:

Creating a partial Snapshot Difference

When choosing Salesforce Org as source, a checkbox for Partial Difference will be available. Choosing individual files will allow users to quickly compare only selected files.

Step 1: make sure that you select Salesforce Org as source and destination and select the option "Partial Selection".

Step 2: press the button "Edit selections" and select some files.

Step 3: save the selection.

Step 4: press the button "Calculate Differences". Differences, if any, will be displayed in the same as a regular snapshot difference.


How did we do?