Salesforce deployments that just work

Salesforce deployments that just work

Amy Johnston on

Share with

LinkedIn
Twitter

All good Salesforce DevOps adoption starts with consistent and reliable deployments — that just work. Without the right tooling, these deployments can absorb an enormous amount of your Salesforce team’s time. How do you make sure your deployments are successful almost every single time?

With its deep understanding of Salesforce metadata, Gearset is the most powerful comparison and deployment engine in the ecosystem — boasting a deployment success rate of 98%. In this post we look at how Gearset can take the pain and risk out of your Salesforce deployments — not only to save time across your development team, but to help the whole company see a considerable return on investment too.

Deploying on Salesforce is hard

Migrating new metadata changes from one Salesforce environment to another is hard because deployments can fail for any number of reasons. Admins and developers who regularly use Salesforce’s native change sets or the Salesforce CLI for their deployments will be all too familiar with these common stumbling blocks and the error messages they generate:

  • Missing dependencies
    E.g. Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail relationship field
  • Features in source orgs that aren’t enabled in target orgs
    E.g. Not available for deploy for this organization
  • Items that reference users or need certain permissions
    E.g. In field: siteAdmin - no User named [email protected] found.
  • Issues around deploying managed packages and their added components
    E.g. Cannot modify managed object: entity=CustomPermissionSet, component=<ID>, field=Description, state=installed
  • Differences between Metadata API versions of the source and target
    E.g. Insufficient access rights on cross-reference id:<ID>
  • Metadata types not fully supported by the Metadata API
    E.g. INVALID_TYPE: sObject type <ObjectName> is not supported.

To resolve these deployment issues, Salesforce teams need extensive and detailed knowledge of the metadata in their orgs. And even if they do have this expertise, teams shouldn’t have to dedicate significant resources to tricky deployment processes. Fiddly tools that frequently fail to do the job are an expensive waste of these professionals’ valuable time, which could otherwise be spent on more productive development and customization work.

As well as consuming the resources of your Salesforce team, unsuccessful deployments pose a serious risk to your company if new work can’t get released to production on time or — worse still — results in unforeseen issues on release that break your existing Salesforce functionality. From a business continuity point of view, issues with releases are a growing concern because more companies now rely entirely on the smooth running of their Salesforce instances to manage many of their essential operations.

Getting your Salesforce team to release late on a Friday evening (in case the new release throws up any problems to be fixed over the weekend) isn’t an ideal solution. We firmly believe that deployments on Salesforce should be as easy as everything else on the platform. Unfortunately, if your team is using native Salesforce tools to run deployments, that’s simply not the case. In fact, you’re typically looking at a deployment success rate of around 50% — a metric we’ve used as a benchmark comparison since the birth of Gearset.

Live eventConvene, Chicago

DevOps Dreamin' Chicago 2024

Find out more

Building the most successful deployment tool for Salesforce

Gearset was born when our company’s founding engineers implemented Salesforce and realized that Salesforce professionals deserve better than change sets. Deploying with the platform-native deployment tools is just too fragile a process to move new customizations and features along a pipeline to production.

Our developers were used to reliable and automated releases that result from modern DevOps practices, having worked on other software stacks for many years. They were frustrated because the same wasn’t the case for their releases on Salesforce — deployments often failed, and UI-based tools like change sets lacked any options for automation. Traditional automation tools used on other platforms weren’t the answer either because they weren’t built to deal intelligently with Salesforce metadata or the many quirks of Salesforce’s Metadata API.

Failing to find an adequate solution, our team set out to build what has since become the most powerful deployment tool for Salesforce. From the very beginning, our focus was on making sure deployments actually succeeded. As well as being a dramatic quality-of-life improvement for Salesforce teams, successful Salesforce deployments are essential if you want automated DevOps workflows.

Gearset now offers a complete DevOps solution for Salesforce teams of all sizes and complexity, but making sure your deployments succeed remains at the core of what we do. To date, Gearset users have run over 18 million deployments and have deployed more than 105 million items of metadata. Deployments form the basis on which our suite of cutting-edge DevOps tools is built, which is also why we continue to measure our performance by tracking the success rate of our users’ deployments. It’s a metric we’ve tracked closely since we first started out building Gearset.

Tracking the success of our users’ deployments since 2014

In recent years, our deployment success rate has consistently been over 90% and is currently sitting at 98%. In other words, Gearset users’ deployments succeed more than 9 out of 10 times. We’re extremely proud of this unmatched statistic and we’re continually adding even more improvements!

Deployments that work every time

Gearset makes deploying to Salesforce easy for a number of reasons:

Compare metadata changes with ease

Knowing what to deploy and the impact the changes will have on your target environment is the first step to making sure a deployment succeeds. Deployments in Gearset start with a comparison of the metadata in the source and target environments — any Salesforce org or a Git branch. Gearset retrieves the metadata from the source and target using Salesforce’s Metadata API, then compares the two environments. The results of the comparison are then shown to the user in full detail.

In Gearset’s comparison view, users can see all the differences between their two selected environments. The differences — metadata items in the source environment that have been changed, deleted or added compared to the target — are displayed side-by-side in table formats with a detailed XML, object or layout view.

Gearset’s unique metadata comparison view

The line-by-line differences show you the items you need to select from your source, giving you a clear idea of the impact the changes will have on your target. You can then quickly select multiple items to build a deployment package. Gearset’s unique metadata comparisons and the granular control they give you over what to deploy are a feature that’s frequently commented on and invariably impresses our new users.

“With Gearset, I tell new people it’s like turning on a black light: you can just see everything that’s different. And from there you can decide ‘that’s relevant, that’s not relevant’. You can spot things you’d forgotten about that you need.”

Matt Norn | Cloud Technologist | Traction on Demand

Comparisons are just the start. Gearset doesn’t just retrieve your metadata from the Metadata API; it also analyzes it semantically to identify the dependencies and relationships between items. Within the comparison view, Gearset shows you each item’s dependency tree right within the comparison table:

Gearset shows you metadata items and their dependencies

Identify common deployment issues

After you’ve selected the metadata items to include in your deployment package, Gearset’s algorithms check for common deployment issues. These problem analyzers warn you of any number of potential issues that are likely to cause your deployment to fail.

Gearset’s problem analyzers dramatically boost deployment success

The problem analyzers explain each issue and suggest fixes, such as dependent components that need to be included in the deployment package. You can then accept and implement these suggestions by checking the relevant boxes in the UI. Gearset then makes sure your deployment succeeds by automatically adding, excluding or editing items in the package. Examples of our problem analyzers include:

In total, Gearset has well over 70 problem analyzers, which run every time before any manual or automated deployment. The problem analyzers are both a real time-saver and a safety net for teams, as many of our customers have commented.

“Gearset has made it easy for beginners to deploy due to the problem analyzers, which help anticipate potential deployment errors and provide suggestions on metadata that should be included in the deployment package to help the deployment succeed.”

Independent customer review on G2

Cherry-pick specific metadata items to deploy

Selecting specific fields for deployment, especially when dealing with extensive metadata items like Layouts, can pose a challenge for developers — many tools only support an all-or-nothing approach. Gearset’s Precision Deployments simplifies this by showing a detailed breakdown in your metadata comparison results that allows you to choose precisely what to deploy. This makes deployments faster, easier, and less error-prone.

Roll back unwanted changes

Both native Salesforce deployment tools (change sets and DevOps Center the ability to roll back changes, and most alternatives require manual snapshots for rolling back deployments. Gearset’s unique comparison engine automatically takes and stores snapshots before each deployment. This means you can roll back unwanted changes with just a few clicks by comparing the snapshot to the current state and selectively reverting changes. Gearset uses problem analyzers to make sure the rollback deployment succeeds — you can even roll back changes that have been committed to version control.

Make destructive changes

Redundant metadata, like fields, objects and customizations, can bog down your Salesforce org and cause issues for end users. With Gearset, decluttering your orgs by deploying destructive changes is simple. Just switch to the Deleted items tab after running an org comparison, then select and delete objects not present in your source org. Once you deploy, these objects will be gone — but as with any deployment in Gearset, you’ll be able to roll back afterwards if you want to undo any changes.

Automatic unit testing

For all Salesforce DevOps teams, testing your deployments is crucial to meet the 75% code coverage requirement during deployment. Not only is testing a vital Salesforce deployment best practice, but you also won’t be able to successfully deploy code without also writing tests. As well as testing before the deployment, you should also test the code when it reaches production as changes to your org may cause bugs or regression, causing your existing unit tests to fail.

Gearset lets you automate unit testing, running all unit tests every 24 hours to reach reliable deployment success. Gearset will also notify you of test results by email, SMS, Slack or Chatter, saving a full test history, so you can easily dive in to find exactly which tests failed and why. Automated unit testing is a great way to boost deployment success rates and make sure you always understand the state of your orgs.

There are plenty of ways you can introduce automation to your deployment process — testing is just one good example. However, DevOps teams looking to continue their DevOps journey by adopting automation and CI/CD should have implemented a version control system first.

Migrate changes to managed packages

When installing managed packages, new or modified metadata, like custom objects or custom fields, can be introduced into your Salesforce orgs. This can cause deployment issues when dealing with traditional tools like Ant, as all of this extra metadata will now be mixed in with your existing configuration.

Ignoring this can be problematic, as you may want to customize this metadata at a later stage, for example by adding fields for your quoting process. Without proper tracking, distinguishing between package-installed and custom modifications can become challenging.

When migrating customizations to Salesforce Managed Packages with Gearset, the customizations will become clearly visible as differences, making them easy to deploy — even if they weren’t tracked when they were originally added.

Want to boost your team’s deployment success?

With a deployment success rate of 98%, it’s hard to think of a reason why you wouldn’t want to add Gearset to your current processes. But it’s come a long way since it was created as a clever compare and deploy tool.

Gearset is a full Salesforce DevOps platform, offering everything from CI/CD to backup, that can help you wherever you are in your DevOps journey. You can get unlimited access to Gearset’s features with a free 30-day trial today!

Try all of Gearset for free