If you are a Salesforce developer or an admin, you know that Sandboxes are integral part of your organization’s development and deployment strategy. Sandboxes let you develop and test your applications in a controlled environment that avoids any impact to your production environment.
Especially, if you are dealing with complex development projects, having a well thought out sandbox refresh strategy becomes critical to the velocity and manageability of the implementation. It becomes all the more important when the org is complex and you have lot of custom code along with restriction around PII data compliance or test salesforce releases.
Which brings us to the question, is Sandbox refresh an art or science? While checklists and SOP’s (aka the Science) are important to ensure that you are not wrong footed. However, expertise and judgement (aka the Art) is equally important in more complex scenarios.
In this blog, we take you through three critical considerations, which sum up the art and science of effective sandbox refresh:
- Understand the type of Sandboxes you are using and their refresh limits
- Abide by the list of Dos and Don’ts – and a lot of them!
- Don’t forget those post refresh activities
Let us look at them one by one:
- Different types of Sandboxes and their refresh limits
Sandbox templates allow you to pick specific objects and data to copy to your Full or Partial Copy sandbox to control the size and content of each sandbox. Sandbox templates are only available for use with Full or Partial Copy sandboxes.
Selection of type of Sandbox is dependent on purpose, volume of data required and periodic refresh requirement. Based on these factors, developer and developer pro sandbox is mostly used for development, unit testing and training, partial sandbox is used for system and integration testing, Full sandboxes for data load testing, integration testing, user acceptance testing, performance and load testing, and staging purposes.
2. Do’s and Don’ts of Sandboxes Refresh
- Do not plan sandbox refresh during Salesforce spring, summer and winter release dates and times.
- Data masking for data copied from production to sandbox for critical and sensitive data elements (utilize relevant AppExchange product or having customized scripts/apex class for this purpose)
- Recommendation to plan for full copy sandboxes refresh completion for a minimum of 48 hours as the timing of the refresh is dependent on the salesforce Queue and also amount of data.
- Building Sandbox templates depending on business requirements for refreshes in case of having multiple lines of business using one salesforce org.
- Having proper communication plan including proposed schedule/timeline and impacted audience including integration teams, development teams who might be doing any testing on your full copy or other sandboxes
- For having time controlled or early full copy sandboxes refreshes, contact Salesforce.com premier support in advance to identify place in refresh queue in order to get a better perspective on expected timing/completion of the data copy.
- Have a refresh calendar setup to have right sandbox refresh strategy
- Keep a full metadata backup of the instance being refreshed in case you have not setup DevOps / continuous integration
- Disable Salesforce to Salesforce connection if enabled
- Do not do sandbox refreshes during regular development times. This would increase the effort of the development team.
3. Do not forget the Post Refresh activities
Create read only users for consultants/developers in production which you have to create every time after the sandbox refresh. This way after you refresh sandbox, you can easily update them in sandboxes to give them access. In absence of this, you will have to recreate these users every time which is a waste of time. As a Salesforce admin, using these tips for effective sandbox can save you (and your users) a lot of time and avoid potential heartburn. So, here’s to the yin and yang of effective Sandbox refresh strategy!