The Ultimate 2023 Guide to Salesforce DevOps

The Ultimate 2023 Guide to Salesforce DevOps

Streamlining Your Salesforce Deployment with DevOps Best Practices

DevOps has emerged as an exhilarating trend within the Salesforce ecosystem, bringing about a shift in mindset and the introduction of diverse tools. This evolution is transforming the way Salesforce professionals approach the deployment of changes across various environments.

With the continuous growth of the Salesforce ecosystem and increasing reliance on the platform, there arises a need for a more structured and rigorous approach to deploying changes, surpassing the limitations of traditional change sets. This is where Salesforce DevOps comes into play!

What Is Salesforce DevOps?

The concept of DevOps originated in 2009 when the term was first introduced. DevOps is commonly defined as follows:

“DevOps is a combination of cultural philosophies, practices, and tools that aims to shorten the development life cycle and provide continuous delivery with high software quality.”

Below is a simplified illustration of the software development life cycle (SDLC). In the broader software industry, numerous tools are available to aid and automate processes at each stage of the cycle.

Salesforce DevOps aligns with the broader definition of DevOps, but it specifically caters to the needs of admins and developers, enabling them to deploy changes and navigate the software development lifecycle most efficiently while minimizing bugs and disruptions for users.

However, the adoption of DevOps best practices within the Salesforce ecosystem has been relatively slower compared to other domains. Many pioneering companies in the Salesforce AppExchange space, founded between 2014 and 2016, have spearheaded this movement. The delayed adoption can be attributed to the fact that the original DevOps movement primarily focused on conventional coding practices, whereas Salesforce operates within a platform-based ecosystem that heavily relies on declarative (clicks, not code) tools.

Why Do You Need Salesforce DevOps Tools?

Salesforce DevOps tools come in various forms and sizes, offering valuable support throughout the development lifecycle. These tools assist with deployment processes, data and metadata backup, test automation, and code scanning to uncover security vulnerabilities and bugs.

At a higher level, these tools provide significant time savings by ensuring more reliable deployments, minimizing the occurrence of bugs in production, and promoting better collaboration among admin and development teams.

For smaller Salesforce organizations, the pain points that DevOps tools aim to address might not be as apparent. However, for organizations with multiple internal Salesforce developers or those heavily relying on custom development, the story is different. These organizations have likely encountered challenges such as changes being overwritten by others and difficulties in deploying changes from developer sandboxes to production, only to discover that features no longer function as intended.

Traditionally, admins and developers have relied on change sets to move changes declaratively between environments. While change sets are relatively straightforward to use, they have notable drawbacks. Creating change sets can be time-consuming as components need to be added manually, and fixing deployment errors can be a tedious process. Moreover, change sets do not support the deployment of all components, such as standard picklist values or sales processes. Additionally, change sets need to be recreated or cloned when moving between different environments, and they lack integration with version control systems for monitoring changes between environments.

Change sets serve as just one example of how native Salesforce tools can fall short as complexity increases. If you encounter issues or bottlenecks at any stage of the Salesforce development lifecycle, it may be worthwhile to explore tools that can provide assistance.

DevOps Benefits

By incorporating DevOps tools into your deployment team, you can anticipate the following advantages:

  1. Time savings: Achieve faster and more reliable deployments, reducing the time required for manual processes.

  2. Increased release frequency: Automation through Continuous Integration/Continuous Deployment (CI/CD) enables a faster release cadence, establishing a tighter feedback loop.

  3. Reduced bugs and errors: Testing capabilities provided by DevOps tools help identify and address issues, resulting in fewer bugs and errors being released into the production environment.

  4. Enhanced collaboration: DevOps tools offer an audit trail that tracks changes made by developers and admins, facilitating better collaboration by providing visibility into who made specific changes, when, and why.

  5. Improved security: DevOps tools enable monitoring and backup capabilities, enhancing overall security measures for your Salesforce ecosystem.

Integrating DevOps tools into your deployment processes can bring about these benefits, optimizing efficiency, quality, collaboration, and security within your team.

Salesforce DevOps Center

In recent years, there has been significant excitement surrounding the introduction of the Salesforce DevOps Center. This deployment tool, developed by Salesforce itself, has now become widely accessible after a period of anticipation.

Previously, organizations had to rely on third-party tools available on the AppExchange, often incurring additional costs, to achieve similar comprehensive functionality.

At its core, the DevOps Center is designed to accelerate the release process for teams. It offers features like visual development pipelines, integration with GitHub for source control, and automated change tracking across Salesforce development environments.

The introduction of the DevOps Center by Salesforce marks a long-awaited replacement for Salesforce Change Sets, which have served as the standard method for moving changes between Salesforce environments using a declarative approach.

While Change Sets can fulfill the task at hand, they do not align with modern DevOps best practices that involve utilizing tools and implementing Continuous Integration/Continuous Development (CI/CD) methodologies.

The DevOps Center offers the following key features out of the box:

Work Items: A new object designed to track the changes being made, including the associated metadata items moving through environments.

Automated Change Tracking: With the DevOps Center, changes made by development teams in their sandboxes are automatically tracked, providing complete transparency on which items need to be promoted across environments.

Pipelines: Previously, Salesforce lacked a native solution for defining development environment pipelines. Now, teams can create customized pipelines that align with their preferred approach for promoting changes.

Source Control: DevOps Center enables seamless integration with GitHub source control, offering comprehensive visibility into who made specific changes and when.

Deploy Changes: Once changes are ready, the DevOps Center provides an intuitive interface to view the entire development pipeline, bundle changes, and migrate them between stages—all achieved through a user-friendly, clicks-based process.

To access the Salesforce DevOps Center, simply navigate to your Setup menu in Salesforce and enter "DevOps Center" into the search bar.

Salesforce DevOps Tools

While the Salesforce DevOps Center is an excellent free tool to begin your DevOps journey, it's important to note that the initial release became available only in December 2022. Consequently, third-party tools that have been established for nearly a decade offer more advanced features.

Moreover, the DevOps Center can be considered primarily as a "deployment" tool, but there are various other categories of apps that can support your software development life cycle.

Let's explore some of these categories:

Deployment Tools: The most common type of tools in this category are deployment-focused. By implementing a deployment tool, you can revolutionize your Salesforce deployments and significantly improve their speed. Instead of relying on change sets or command-line utilities like the Ant Migration tool, deployment apps provide specialized user interfaces with a range of features to simplify the deployment and change management process. These features may include:

  • Version Control: Integration with popular hosting providers such as GitHub, offering complete visibility into changes made, the reasons behind them, when they occurred, and who made them.

  • CI/CD: Take full advantage of Continuous Integration and Delivery processes by creating automated delivery pipelines for all your sandboxes.

  • Rollback: If a deployment doesn't work as expected, easily roll back the changes to minimize disruption to users.

  • Testing: Automated execution of unit tests and ensuring code coverage is vital for smooth deployments. Deployment tools can automate this process.

  • Reporting: The ability to monitor and adjust based on team performance is crucial for the success of any process. Most Salesforce DevOps tools provide reporting capabilities for deployments.

Some noteworthy tools in this space include Gearset, Copado, Prodly, Flosum, Autorabit, and Blue Canvas.

Backup Tools

Incorporating data backup into your Salesforce DevOps process is crucial. This not only involves backing up your CRM data but also ensuring the preservation of your metadata. The significance of data backup has increased since Salesforce's announcement last year that they will no longer provide data recovery services. Let's delve into how these tools operate.

Data Backup: While there are multiple methods to back up data in Salesforce, utilizing specialized apps simplifies the process. Instead of managing various downloaded CSV files, Salesforce backup tools offer user-friendly interfaces that enable you to restore data from any desired point in time. This feature is particularly important in the Salesforce DevOps world, providing confidence that data can always be recovered in the event of a problematic deployment.

Metadata Backup: Just as data backup is essential in the DevOps lifecycle, preserving your metadata is equally crucial. Imagine accidentally overwriting a complex flow or Apex trigger, only to discover that there is no backup available. Metadata backup mitigates risks in the DevOps cycle, as rollbacks become feasible and potential losses are minimized.

Recommended tools in this area include Spanning Backup, Gearset, and OwnBackup.

Test Automation Tools

While unit tests and achieving 75% code coverage are crucial for safe deployments, it's equally important to conduct tests that ensure a seamless user experience and efficient business processes. This is where Test Automation becomes valuable.

Test automation tools in the Salesforce ecosystem enable the execution of scheduled tests, ensuring the functionality of various Salesforce processes. Whether it's lead qualification, opportunity progression, case closure, or any other customized processes, these tools verify that they continue to work reliably despite system changes. Additionally, they can also run all unit tests within the organization to ensure the stability of Apex classes.

Provar and Copado Robotic Testing are recommended tools to explore how test automation can be implemented effectively in Salesforce.

Code Scanning Tools

In the world of Salesforce DevOps, we have covered three key areas that contribute to smoother releases. However, writing Apex code can be complex, and it is essential to follow best practices and standards to create clean, scalable code with minimal technical debt.

Code scanning tools play a crucial role in automating the manual process of reviewing Salesforce code and configuration. These tools ensure that all team members adhere to a consistent set of code standards and best practices, resulting in a well-maintained and healthy Salesforce org.

To assist in code scanning, you can explore tools such as CodeScan, Clayton, Quality Clouds, and DigitSec. These tools provide valuable support in maintaining code quality and ensuring the overall health of your Salesforce org.

Salesforce DX

While the previously mentioned apps are paid applications within the Salesforce ecosystem, it's important to highlight the free tools available from Salesforce as part of the Developer Experience. Salesforce DX is a key component to explore in this regard, and you can dive into its extensive learning resources through a dedicated Trailhead trail.

Salesforce DX offers various features in the DevOps space, although these features alone do not constitute a complete DevOps solution. Many of the tools mentioned earlier incorporate and leverage these Salesforce DX features to enhance their capabilities.

Let's take a closer look at some of the notable features within Salesforce DX:

  1. DevOps Center: This highly anticipated feature from Salesforce enables proper tracking of changes between orgs, providing the ability to utilize Version Control when deploying changes across environments. It addresses a long-standing need for admins and developers.

  2. Salesforce Extensions for VS Code: Salesforce recently introduced a robust extension for Visual Studio Code, allowing developers to connect their development orgs to an intuitive code editor. This integration enhances the development experience and streamlines workflows.

  3. Salesforce DX CLI: The Salesforce CLI is a vital part of the Salesforce Developer Experience. It offers a powerful command-line interface with commands for moving metadata between orgs and creating scratch orgs. It provides developers with efficient tools to manage and deploy changes.

  4. Scratch Orgs: Scratch orgs are temporary development and testing environments that contain your source code. They can be quickly created and used to test or work on changes without the need to maintain a dedicated development environment. Scratch orgs are highly configurable, allowing developers to emulate different Salesforce editions with various features and preferences.

Leveraging scratch orgs can significantly boost developer productivity and facilitate collaboration throughout the development process. They also play a crucial role in enabling automated testing and continuous integration.

These Salesforce DX features are valuable resources that empower developers and administrators in their DevOps journey, enhancing productivity and enabling more efficient development practices.

Summary

I trust that this article has offered you a comprehensive glimpse into the evolving landscape of Salesforce DevOps, shedding light on the leading tools and companies driving this movement.

Salesforce DevOps has been a growing trend for some time, but it is now gaining momentum and entering the mainstream. It won't be surprising if your Salesforce deployment eventually incorporates one of the tools mentioned in this article. Therefore, it's beneficial to expand your knowledge in this field by exploring and educating yourself as much as possible.