[Analysis] 7 options for deploying Salesforce changes. What’s best for your org?

Published by Richard Clark, December 30, 2020
Salesforce

One thing that I am asked all of the time…

“What are my options for deploying Salesforce changes?”

To help answer this question, I wanted to provide a summary about the wide variety of tools available for deploying changes between Salesforce orgs and some information around their key strengths or suitability. The important thing to keep in mind is that there isn’t a single tool to fit everyone’s unique requirements. Many teams actually use a combination of these tools depending on the risk of the change and the urgency to get a fix into production.

Source-driven vs. org-driven


When choosing release management tools, it’s important to consider if you want to follow a source-driven or an org-driven development approach.

Source-driven development is the normal method outside of the Salesforce ecosystem. It has always been possible with Salesforce but never easy. Prior to Salesforce DX, source-driven development was difficult, brittle, required dedicated team members and was prone to human error when merging XML changes manually. With Salesforce DX, we can use scratch orgs (or sandboxes) to develop atomic changes and then sync them into our source code repository. When we want to deploy changes to another environment, we don’t move the current copy of that item in the original org. Instead, we move the copy of the metadata that we committed to our repo. We can even use the Salesforce DX package to manage every release version and rollback to any earlier version with just a few clicks.

Org-driven development is akin to Microsoft or Apple making changes by first implementing the changes on your colleague’s machine, then copying the files they updated to yours. Who knows what other unintended change will be picked up? In my mind, it’s one of the big causes of the ‘It works on my org’ comment that some developers are often (rightly) accused of making too often. Many Salesforce consultants find source-driven development too complex to set up and manage (until DevOps Center) and their only choice is to use source-driven development and follow strict processes for managing changes and avoiding issues.

For me, using a source-driven approach is the only way to have a reliable and repeatable deployment artifact that you have a copy of and can roll back to at any stage. Using an org-driven approach is easy when you’re getting started, but once tools like DevOps Center are available, I struggle to see reasons to continue to do this.

I’ve listed the tools available below chronologically for when they became available in the Salesforce ecosystem. At Provar, we’ve made it our mission to work with all of these tools, including DevOps Center, which isn’t even available yet.

7 options for deploying Salesforce changes

(1) Salesforce Setup (Free)


The power of Salesforce has always been the speed of change. This blessing has also been a curse for creating production issues.

Suitable for:

  • Sandboxes and scratch org-driven development
  • Changes as a last resort

Key features and challenges

  • Some organizations who don’t use sandboxes make changes directly in production. We highly recommend that you only do this in a sandbox or scratch org and use the other options below to manage deployments.
  • There are some edge cases where admins do need to make direct changes as changes can’t be deployed through the metadata APIs, but these are thankfully becoming more rare.

Provar support 

  • Provar Desktop can be used to test the org and rerun tests for different profile types. Test data is tracked and can be rolled back after completion. When you move to sandboxes, the test cases are fully reusable with no changes or remapping.

(2) ANT Migration Tool (Free)


Command line deployment using ANT and metadata API. 

Suitable for:

  • Org or source-based development
  • Teams with ANT & CI/CD expertise

Key features and challenges

  • The original deployment tool
  • Requires a specialized skill to resolve issues, optimise and understand profile impact on deployments and to create rollback scripts. Can deploy changes across orgs.
  • Can be integrated into generic CI/CD pipeline tools such as Jenkins, CircleCI, Azure DevOps etc. that support ANT tasks
  • Generally only effective with robust source tracking for declarative and code changes. Involves coarse-grained metadata, meaning that changes can include unintentional changes.

Provar support

  • Provar’s ANT CLI can be used to run test cases authored in Provar Desktop to generate a formatted report of results with screenshots
  • Unlike most web test tools, Provar tests are bound to the metadata elements (not the DOM) and are not impacted by changes after deployment to another sandbox or org

(3) First Generation Packaging (Free)


Unmanaged and managed packages created typically in a Developer Edition org and can be shared on the AppExchange.

Suitable for:

  • Org or source-based development
  • AppExchange publishing

Key features and challenges

  • Unmanaged packages allow developers to bundle changes for deployment into any org and then allow those changes to be edited in situ, i.e. unmanaged
  • No ability to upgrade or version unmanaged packages
  • Managed packages primarily for ISVs but used by companies with multi-orgs to roll out versioned changes to core elements
  • Multiple profile images that can be applied to an org on installation. Limits on changes for items in a managed package and no option to downgrade the version.

Provar support

  • Provar’s namespace overrides allow developed packages to create tests on the DE orgs and re-run them on their packaged deployment to validate changes
  • Test projects can be shared with end customers to help them extend tests as part of their deployment and release management processes

(4) Change Sets (Free)


Build change sets to push from one org for deployment to another. 

Suitable for:

  • Org-based development
  • Salesforce admins

Key features and challenges

  • Easy to use for all admin users. Change sets revolutionised deployments c. 2013 and made it possible for admins to move changes fast between environments without having to create an unmanaged package first.
  • Unlike packages and the ANT migration toolkit, change sets are limited to orgs related to a single parent org. You cannot use change sets to move code or config between unrelated orgs.
  • Change sets can be cloned to create different versions. Once they are deployed, these changes are locked to a snapshot of the changes at that time. This is good from a release artifact perspective but painful when your change set gets bigger and bigger.
  • Gave the rise to the infamous Salesforce deployment fish (Google it or check out #deploymentfish on Twitter), where more components are deployed (e.g. 26/20) than you thought. It turned your nice green circle into a weird green fish.
  • No automatic change tracking: some changes were missed in deployment, other changes were included by accident or changes were included that were not required which risk compromising other changes

Provar support

  • Provar Desktop and Provar CLI can be utilized to validate changes before pushing change sets to document the test behaviour in the source org
  • Provar Desktop and Provar CLI can be utilized to rerun the same suite of tests after deployment to confirm all post deployment steps have been completed and produce a smoke test report to stakeholders
  • Post deployment steps, such as activating Salesforce Flows and recompiling Apex, can be triggered from within Provar as test steps

(5) Third-Party release management tools (Paid)


This includes in-org tools like Flosum, hybrid solutions like Copado and AutoRABIT, cloud applications like Gearset and Blue Canvas and desktop tools like Metazoa and AppirioDX. 

Suitable for:

  • Org or source-based development
  • Teams with weak source code management experience
  • History of changes deployed to each environment
  • Org monitoring for changes made to critical environments

Key features and challenges

  • Each of these tools are commercial tools and have their own features and benefits. Most of these include some form of change tracking, org compare, multi-org support, conflict management, source code management and deployment scheduling. 
  • Some notable features of the best tools include the ability to rollback changes to an org after deployment and monitoring production orgs for in org changes
  • It’s worth noting that all these tools currently only manage changes in Salesforce and don’t have support for managing releases to any other platform

Provar support

  • Products can all either run the Provar CLI locally or make webhook callouts to trigger test execution using a cloud-based or private server CI/CD
  • Provar tests used to verify end-to-end behaviour which validates additional integrated business systems are compatible with the changes deployed.

(6) Salesforce DX (Free with limits)


Salesforce DX is a huge program of multiple changes to fix issues with packaging, break down coarse-grained metadata, provide natural source control integration and ultimately make source-driven development the new normal.

Suitable for:

  • Primarily source-based development
  • Teams with weak source code management experience

Key features and challenges

  • Salesforce DX includes features such as a new fine-grain metadata format for better source code management and deployment, automatic change tracking, second generation packaging, a Dev Hub for managing all your orgs, VS Code integration and scratch orgs for creating environments on the fly
  • Salesforce DX is easy to learn the basics but generally perceived as a developer only tool. Difficult to break down the legendary ‘Happy Soup’ though recent changes such as org dependent packages will help.
  • DX commands can be integrated directly into generic CI/CD pipeline tools such as Jenkins, GitLab, Azure DevOps, CircleCI and more
  • To date, the main users who have switched to Salesforce DX tend to be people who used the ANT migration tool and are metadata experts and people who want to leverage the benefits of second-generation packaging which primarily includes ISV partners. This is starting to change. 

Note: Many of the third-party tools also support Salesforce DX metadata and can make use of the Salesforce CLI commands.

Provar support

  • ProvarDXTM is available as both CLI and VS Code extensions to make testing seamless with Salesforce DX
  • ProvarDXTM’s Dev Hub integration allows environments to be overridden dynamically at runtime and unlocks use of scratch orgs for testing early and testing often

(7) DevOps Center (Developer preview)


Think Salesforce DX for admins a.k.a. Salesforce Admin eXperience.

Key features and challenges

  • DevOps Center leverages all Salesforce DX technology, such as source tracking, to identify changes, and makes integration with version control platforms and CI/CD pipelines very easy
  • Appears to be competition for the third-party release management tools but does not have the same feature parity, yet. At the very least it’s a welcome successor to change sets.

Provar support

  • Using Provar CLI And ProvarDXTM test cases can be executed when a change is ready for review and linked back to the Work Item in DevOps Center
  • After changes are deployed to an environment in the pipeline, Provar tests can be executed to carry out smoke testing of the specific change or to complete a full regression test depending on the stage of your pipeline

Summary


The following matrix provides a quick recap/comparison for the above section. (Note: You can click to enlarge the image.)

Useful information


Trailhead: Application Lifecycle Models  

VTDX20: Release Management Patterns (Select track seven.)

Learn more about Salesforce and the Spring ’21 release


Learn more about brand new features coming soon to a Salesforce org near YOU! Join us for our What’s New in Spring ’21 event where our very own Salesforce SME Sarah McCarter will be on hand to answer your questions and break down exactly what you need to know. RSVP today!

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top