Skip to main content
Comparing managed package metadata with Gearset

How to compare and deploy changes to your managed packages

Mateusz Kochanowicz avatar
Written by Mateusz Kochanowicz
Updated over a week ago

Gearset fully supports comparing and deploying of changes to managed package metadata in your Salesforce orgs and version control environments.

Including managed package metadata in your comparisons

There are some pre-defined metadata filters in our app that by default do not include managed packages are, these are (numbers in brackets indicate number of metadata types used by each filter):
- Basic comparison (6)
- Default comparison (63)
- Default CI comparison (8)
- Default Experience Cloud Comparison (16)

To retrieve managed package metadata in your comparison results when using our pre-defined filters, select one of these two filters:
- Default profiles and permission sets comparison (16), or
- Compare all (207)

Alternatively, you can always create your own custom filter which includes either all or only specific managed packages.

Or you can add managed packages to any of the pre-defined filters that don't include managed packages by default.

Option 1: Using the 'Compare all' filter

When you select COMPARISON FILTERS > Manage custom filters on your Compare and deploy page:


The Compare all filter will include all namespaces and all metadata types (which includes the Installed package metadata type, as discussed later in this article).

How does it work in the new version of 'Compare now'?

In the new version of our 'Compare now' feature - to use this filter, on the Compare and deploy page click on COMPARISON FILTERS menu, then select Compare all filter.

Next, you can select Compare now - this button will be highlighted in blue if you've already selected the source and target environments that you want to compare.

Tip: If you have large orgs or many installed packages, then using the Compare all filter can make the comparison process slower, as Gearset needs to retrieve a larger volume of metadata. For a faster comparison, follow option 2 below.

Managed package metadata in version control

If you’re comparing metadata in source control (i.e. GitHub, Bitbucket etc), Gearset may not be able to identify when metadata is part of a managed package.

Therefore, sometimes it can happen that a given metadata may appear in the comparison results, even if the None option is selected for Include managed packages in your metadata filter.

Prerequisites for managed package metadata to appear in your comparison results

Whether the Installed package metadata type is included in the metadata comparison filter can affect if managed package metadata is shown in the comparison results.

Option 1

If you have the Installed package metadata type selected in the comparison filter, you will need to make sure that your managed package is:

  1. Installed in both source and target

  2. The same package version is present in both source and target.

The metadata may be hidden from the comparison results if these conditions are not met, because a detected difference might be due to a version difference rather than a user customization.

Note: The installed package file itself will show, even if the above conditions are not met.

Tip: If you need to change the Managed Package Version for an Apex Class, this page has some useful hints and tips:
Manage Version Settings for Apex

Option 2

If the Installed package metadata type is not included in the metadata filter, Gearset cannot tell the version of the managed package, and will show the metadata even if the versions are different or the managed package is not present in both source and target. This is therefore a workaround for the two requirements above.

For more information on differences in behavior that may be observed in the comparison results when either Installed package metadata is added to the filter, or Installed managed packages is set to All, or when both of these options are selected at the same time - check below article for guidance:
Why are my managed package metadata components not showing up?

Viewing managed package components in comparison results

Now that you've included the packages you want to compare in the metadata filter, click Compare now. In the comparison results, you'll now see any associated changes for those packages.

These can be selected and deployed just like any other metadata component type. You can search for them by entering the namespace prefix into the filter box in the top right of the table. Sometimes you may need to add the entire prefix to find your package's components.

For example, on below image we're searching for Chat Box installed package components with "chatbx__" namespace prefix. It's a new package in the source org, and we're intending to deploy it to the target.

The Installed package file itself will also appear as an item in the comparison results. Selecting and deploying the package files will trigger the package to be installed in the target environment (if the package is new in the source), or it will update the package to the later version if there is a version difference between the source and target environments.

Below image shows how you can effectively use the "Search" option on the left hand side to look up specifically Installed package metadata type - and once clicked on, the comparison results shows only the installed packages that are new in the source environment (it's because here we're viewing only the New items window).

If you can't find a customization you've made to a piece of metadata in a managed package, then you should filter the results for Installed package, and check if the package is installed in both orgs and is the same version.

View managed package versions in your metadata filter

After you've run your comparison in our app using Compare now option, you can select the cog icon:

This will allow you to preview the list of detected managed packages (namespaces) in your comparison results - as long as you select either Choose or All under Include managed packages:

Selecting Choose allows you to customise your filter further and, for example, specify managed packages that you want to preview in your updated comparison results before you select Update comparison.

Managed package versions

You will notice that Gearset displays the manage package's name and its namespace (e.g. Salesforce Connected Apps and sf_com_apps).

In addition to that, we also show package versions along with information whether the package is installed only in the source, or only in the target (like DashboardPal highlighted in red).

When a package version is different both environments you're comparing, Gearset will show that as well.

See below example of a package highlighted in blue:

If it happens that Gearset is unable to detect package version, it will simply show "unknown version" under the package's namespace (as highlighted in red).

'Additional namespaces' setting explained

Additional namespaces - this option allows you to add to your filter namespaces of managed packages that you'd like to include in your comparison after you hit Update comparison button.

For example, on the above screenshot we've included a managed package named jz_managed. This package will be retrieved in the comparison results as long as a package with such namespace exists in either source or target environments that are being compared.

Note: You'd need to know the exact namespace of a package you want to add to the filter in order for the package to be retrieved.

Did this answer your question?