Providing every developer and admin on your team with their own sandbox for their Salesforce development is an essential aspect of DevOps. To prepare those build and testing environments at the beginning of a project, you need to copy data to them from your production org. In this blog, we’ll discuss 5 ways to populate your salesforce sandboxes with data.
Perform a Salesforce Sandbox Refresh
To get the most current test data in your org, perform a sandbox refresh. This will refresh it with data from your production org.
Time Limits for Refreshing Salesforce Sandboxes
You can refresh a Full sandbox once every 29 days with metadata and data from production. If you delete a Full Copy, you have to wait until the 29 days are over before you can create a new one.
The refresh interval for a Partial Copy is once every five days. This updates your sandbox with data and metadata from production. Again, if you delete it, you have to wait until the five days are over before you can replace it.
In Salesforce, refresh Developer orgs or Developer Pro sandboxes once a day. Note that this only updates the metadata. You’ll need to seed data into the orgs yourself.
How to Refresh a Sandbox in Salesforce
Begin by selecting the sandbox you want to refresh in your list of sandboxes in Salesforce. Click “Refresh,” and review—and if needed, edit—the Name, Description, and Create From values.
Select the type of environment you want. Refer to the table to see the number and type of sandbox licenses in your org.
Select the data you want to copy. If you’re refreshing a Full Copy, click “Next,” and determine how much of the existing object data you want to copy.
If you’re refreshing a Partial Copy sandbox, click “Next,” and choose a template that determines the data you’re copying.
You can activate your sandbox immediately after refreshing it by clicking “Auto Activate.”
Clone a Sandbox
If you simply want to recreate an org you’re already using, you can clone it. All its metadata and data will be copied to the new sandbox.
Because the cloned sandbox uses the same license type as the source org, you need to make sure you have that type of license available.
Use Data Loader and Excel
Data Loader is the native Salesforce data migration tool you can use to seed orgs. You can leverage it to export, insert, update, and delete Salesforce records using the user interface or, if you have Windows, the command line.
First, prepare the data you want to export from production into your sandbox. Specify the configuration parameters to determine the scope of the data migration. Select the Excel files Data Loader will use to first export the data from production and then into the destination org. Finally, make sure that your field names in the import file correspond exactly to the field names in Salesforce.
Note that most people find Data Loader to be frustratingly time-consuming, labor-intensive, and prone to error.
Create a Custom ETL Script
If you’re a developer, you can use an extract, transform, and load script to seed a sandbox in Salesforce. An ETL script might not be the first solution you think of to seed a sandbox, but it can be effective, nonetheless.
The benefits of writing your own script are that you’re not limited by refresh intervals. Nor do you have to use Data Loader. But you do have to invest the time to initially write the script—and then maintain it.
Use an Automated Data Migration Tool
Use an automated data migration tool from the AppExchange—like Prodly AppOps—to quickly and easily populate sandboxes with data.
An automated data migration tool has the benefit of minimizing the manual steps involved in the process. On top of that, automation eliminates human error, which prevents frustrating mistakes and do-overs. And like ETL tools, using an automated data migration tool lets you bypass refresh intervals. In short, it’s the easiest, fastest way to prepare your build and test environments for development work.
Leverage Automated Data Migration for CPQ Configuration Data
When using configuration data in apps like Salesforce CPQ, you’ll want to promote changes back up the release chain, as well. In Salesforce, copy data from one sandbox to another further along in the release pipeline with an automated solution. This saves time and prevents errors with migration work and provides you with more time and resources for testing and problem solving.
Discover the Ease of Prodly AppOps
Prodly AppOps lets you populate up to five sandboxes from production—or any other org—with just a few clicks. Contact us to request a personalized demo.