Version control
April 25, 2024

Salesforce rollback strategy: a primer

What a rollback strategy is and why you need one

A robust rollback strategy in Salesforce safeguards your change management process against bugs and errors in releases. In this blog, we discuss exactly what a rollback plan is, when you should use one, and how to implement it.

What is a rollback strategy in Salesforce?

A high-level definition of a Salesforce roll back strategy is a set of procedures you put in place to revert changes to your production environment. These procedures restore your Salesforce org to the stable state it was in before your previous deployment.

What is the purpose of rollback?

The purpose of rollback is to minimize the impact of any bugs or issues that arise after deploying new changes to production. Because it acts as a kind of safety net, developers often call it the “oops button.”

Why is a rollback strategy important?

When you include a rollback strategy in your deployment process as a matter of course, you ensure you can quickly and easily deal with any issues without your end users being affected.

What should be in a rollback plan?

Your rollback strategy should encompass a carefully constructed, written, and tested plan that outlines all the steps you need to perform to revert production to a stable state. It should also define the part each team member plays in the process. In addition, it should include the checks you have to run and how to respond in the event of a failure situation.

When should rollback be used?

Use a roll back to restore stability to production when serious issues occur during a deployment, such as bugs or errors you can’t resolve in a short amount of time. 

You should also use one when new changes are causing complications that have a negative impact on your Salesforce instance’s performance. By performing a rollback to restore your production org to the state it was in before the changes, you can restore stability for your end users. They can go about their daily business, while you can work on a fix for the issue in an isolated environment.

You might also like: What is version control and what are its benefits?

How do you perform a rollback operation in Salesforce?

Now you know what a rollback plan is and when you need one, you’re probably wondering, “How do I roll back changes in Salesforce?” 

You can roll back changes using Salesforce tools, but this is quite complicated, as you can see from the steps below. You can also use Prodly to quickly and easily rollback a deployment.

How to roll back a deployment in Salesforce

To roll back a deployment in Salesforce, perform the following steps:

  • Stop the deployment: If any issues arise during the deployment of a change, stop it immediately to prevent further damage to your Salesforce instance.
  • Inform stakeholders about the rollback: Communicate to everyone on your team, as well as all users and other stakeholders, that you’ve decided to perform a rollback and why.
  • Define the scope of the rollback: Determine which components have been affected by the deployment and need to be rolled back. Use this analysis to plan the steps you need to take to restore your production org to its previous state.
  • How to roll back a metadata deployment: First, we’re going to look at how to rollback metadata changes. Let’s say you have three versions of a Flow, and the most recent version, version 3, is causing problems. You can deactivate version 3, reactivate the previous version (version 2), and deploy version 3 to a sandbox so you can fix it. You’ll have to perform a similar step for each metadata component that’s affected.
An image of deactivating a Flow in Salesforce to illustrate a rollback of metadata in Salesforce
  • How to roll back a config data deployment: Performing a rollback of config data (for example, if you’ve made changes to Salesforce CPQ) is more complex. First, check that you made a backup before you deployed the record updates. Then use Data Loader to revert the updates with that backup. If you inserted new records, identify them using a query or a Salesforce report, and delete them from production.
  • Check and test: After you’ve restored your production org to the stable version, ensure that it’s fully functional. This might involve reconfiguring settings, reimporting data, or updating configurations. Test thoroughly to make sure all components are working as expected and that there are no unexpected problems.
  • Communicate with stakeholders: Inform your team, as well as all users and other stakeholders, that the rollback has been successful. You should also make them aware of any changes to production that will impact their workflows.

How to roll back a Salesforce deployment in 5 steps with Prodly

Prodly DevOps integrates with various version control systems, including GitHub. Because of this, it lets you easily perform a rollback in five simple steps:

  1. Navigate to the appropriate repository in GitHub and select the branch you deployed the changes from.
  2. Click on “Commit History” and select the pull request you want to roll back in the commits list.
  3. Click “Revert” at the bottom of the pull request and select the revert branch GitHub creates.
  4. Merge the new pull request GitHub creates into the branch you originally deployed the changes from.
  5. Deploy the restored changes from your branch to your Salesforce org.

Then all you have to do is log into Salesforce and confirm that your changes are successfully rolled back.

Conclusion

To ensure the continuity of your Salesforce instance, it’s critical to have a well-defined rollback strategy. By consistently making sure you have one for every significant deployment, you can minimize the impact of issues on your production environment and maintain the trust of your users.

FAQs

What’s the difference between a rollback and a roll forward deployment?

When you perform a rollback, you revert your production environment to a previous state of stability—but then it doesn’t have the new features. With a roll forward deployment, you add additional changes that fix the issue while at the same time keeping the new features live.

How often should I make a rollback strategy?

It’s advisable to have a tested rollback strategy in place for every significant deployment you make.

A robust rollback strategy in Salesforce safeguards your change management process against bugs and errors in releases. In this blog, we discuss exactly what a rollback plan is, when you should use one, and how to implement it.

What is a rollback strategy in Salesforce?

A high-level definition of a Salesforce roll back strategy is a set of procedures you put in place to revert changes to your production environment. These procedures restore your Salesforce org to the stable state it was in before your previous deployment.

What is the purpose of rollback?

The purpose of rollback is to minimize the impact of any bugs or issues that arise after deploying new changes to production. Because it acts as a kind of safety net, developers often call it the “oops button.”

Why is a rollback strategy important?

When you include a rollback strategy in your deployment process as a matter of course, you ensure you can quickly and easily deal with any issues without your end users being affected.

What should be in a rollback plan?

Your rollback strategy should encompass a carefully constructed, written, and tested plan that outlines all the steps you need to perform to revert production to a stable state. It should also define the part each team member plays in the process. In addition, it should include the checks you have to run and how to respond in the event of a failure situation.

When should rollback be used?

Use a roll back to restore stability to production when serious issues occur during a deployment, such as bugs or errors you can’t resolve in a short amount of time. 

You should also use one when new changes are causing complications that have a negative impact on your Salesforce instance’s performance. By performing a rollback to restore your production org to the state it was in before the changes, you can restore stability for your end users. They can go about their daily business, while you can work on a fix for the issue in an isolated environment.

You might also like: What is version control and what are its benefits?

How do you perform a rollback operation in Salesforce?

Now you know what a rollback plan is and when you need one, you’re probably wondering, “How do I roll back changes in Salesforce?” 

You can roll back changes using Salesforce tools, but this is quite complicated, as you can see from the steps below. You can also use Prodly to quickly and easily rollback a deployment.

How to roll back a deployment in Salesforce

To roll back a deployment in Salesforce, perform the following steps:

  • Stop the deployment: If any issues arise during the deployment of a change, stop it immediately to prevent further damage to your Salesforce instance.
  • Inform stakeholders about the rollback: Communicate to everyone on your team, as well as all users and other stakeholders, that you’ve decided to perform a rollback and why.
  • Define the scope of the rollback: Determine which components have been affected by the deployment and need to be rolled back. Use this analysis to plan the steps you need to take to restore your production org to its previous state.
  • How to roll back a metadata deployment: First, we’re going to look at how to rollback metadata changes. Let’s say you have three versions of a Flow, and the most recent version, version 3, is causing problems. You can deactivate version 3, reactivate the previous version (version 2), and deploy version 3 to a sandbox so you can fix it. You’ll have to perform a similar step for each metadata component that’s affected.
An image of deactivating a Flow in Salesforce to illustrate a rollback of metadata in Salesforce
  • How to roll back a config data deployment: Performing a rollback of config data (for example, if you’ve made changes to Salesforce CPQ) is more complex. First, check that you made a backup before you deployed the record updates. Then use Data Loader to revert the updates with that backup. If you inserted new records, identify them using a query or a Salesforce report, and delete them from production.
  • Check and test: After you’ve restored your production org to the stable version, ensure that it’s fully functional. This might involve reconfiguring settings, reimporting data, or updating configurations. Test thoroughly to make sure all components are working as expected and that there are no unexpected problems.
  • Communicate with stakeholders: Inform your team, as well as all users and other stakeholders, that the rollback has been successful. You should also make them aware of any changes to production that will impact their workflows.

How to roll back a Salesforce deployment in 5 steps with Prodly

Prodly DevOps integrates with various version control systems, including GitHub. Because of this, it lets you easily perform a rollback in five simple steps:

  1. Navigate to the appropriate repository in GitHub and select the branch you deployed the changes from.
  2. Click on “Commit History” and select the pull request you want to roll back in the commits list.
  3. Click “Revert” at the bottom of the pull request and select the revert branch GitHub creates.
  4. Merge the new pull request GitHub creates into the branch you originally deployed the changes from.
  5. Deploy the restored changes from your branch to your Salesforce org.

Then all you have to do is log into Salesforce and confirm that your changes are successfully rolled back.

Conclusion

To ensure the continuity of your Salesforce instance, it’s critical to have a well-defined rollback strategy. By consistently making sure you have one for every significant deployment, you can minimize the impact of issues on your production environment and maintain the trust of your users.

FAQs

What’s the difference between a rollback and a roll forward deployment?

When you perform a rollback, you revert your production environment to a previous state of stability—but then it doesn’t have the new features. With a roll forward deployment, you add additional changes that fix the issue while at the same time keeping the new features live.

How often should I make a rollback strategy?

It’s advisable to have a tested rollback strategy in place for every significant deployment you make.