Login

Sandbox Seeding Walk Through

This guide walks you through your first Sandbox Seed in 10 minutes. This walk through is also available as a Seeding Product Demo Video

Pre-Requisites

This walk through requires two Salesforce orgs and one GRAX deployment with full Auto Backup.

  • "Source" production SFDC org with:
    • Data in SFDC such as many Accounts hierarchies to see
    • A report in SFDC such as "GRAX Training Accounts" that finds all accounts that have "Training" in the name
  • GRAX App with full Auto Backups of the Source org
  • "Target" sandbox or production SFDC org with:
    • Schema matching the source org, but no data as made by SFDC sandbox refresh tooling

Here we will use:

  1. Source "Test Drive" org which you can log into the Test Drive org through the Salesforce App Exchange
  2. GRAX "Test Drive" App which you can log into with a quick link
  3. Target "Demo Restore" org

Log into the Source Org

First log into the Source org.

Next log into the GRAX App.

GRAX has a "Sandbox Seeding User" permission to grant access to perform search and seeding operations, but not access to settings, archive tooling, etc.

Pick a Seed Target

Now go to New Sandbox Seeding and configure a Target org. Either add a Target org by connecting via OAuth, or reuse an existing one.

Here we have a Demo Restore org pre-configured as a target.

Pick a Seed Source

Next configure the data you'd like to see.

Here we will seed from a Salesforce report. In Salesforce, create a report with data you'd like to seed. For example this GRAX Training Accounts Report with all Accounts that have "Training" in the name. All reports with "GRAX" in the name or in a "GRAX" folder show up in the GRAX App.

Then in the GRAX seeding source tool select the Report option and select the Training Accounts Report.

Preview and Run the Seed

Now click through the seeding tool to preview the data hierarchy, record count. Here we see the report includes 3 Accounts and 100s of child Assets, Contacts, Cases, etc.

Continue to click through to execute the seed. After a final confirmation the seeding activity will start and show all the progress, success, or errors.

Review Seed Data

Finally if you log into Target "Demo Restore" org you'll see all the data.

With a few clicks we've taken data from one Salesforce org to another, giving your development team a good dataset in a sandbox to work against.

Frequently Asked Questions

How Does Seeding Handle Errors?

After a seeding operation, there is a results page that shows a summary of all the data creating including success and errors.

One of the most common sources of errors in seeding is conflicts from the target containing existing data. If this is due to a previous seed, you can use the "Undo Seed" tool which deletes everything created by the seed.

If this is not from a seed, you can delete data with an Apex script or other SFDC tooling then try again.

List<User> userList = [Select Id from User where Alias='GSale'];
if (userList.size()>0){
    System.debug('Deleting Everything Created By: ' + userList[0].Id);
    List<Asset> assetResult = [SELECT Id FROM Asset where CreatedById=:userList[0].Id];
    delete assetResult;
    List<Case> caseResult = [SELECT Id FROM Case where CreatedById=:userList[0].Id];
    delete caseResult;
    List<Opportunity> oppResult = [SELECT Id FROM Opportunity where CreatedById=:userList[0].Id];
    delete oppResult;
    List<Contact> contResult = [SELECT Id FROM Contact where CreatedById=:userList[0].Id];
    delete contResult;
    List<Account> acctResult = [SELECT Id FROM Account where CreatedById=:userList[0].Id];
    delete acctResult;
}

How Does Seeding Secure Data?

Seeding offers options to:

  • Anonymize data, which replaces all potential Personally Identifiable Information (PII) with mock data.
  • Pick objects in the hierarchy to skip
  • Override fields with default values

These options help you make sure no sensitive production data ends up in a sandbox.

How Does Seeding Handle Schema Mismatches?

Seeding assumes that the sandbox and production schemas match, as they do with the standard Salesforce Sandbox Refresh tooling.

However Seeding uses the same foundation as GRAX Restore, and contains a lot of smarts about schema mismatches. If a field doesn't exist in the sandbox schema, seeding will not include it. If an extra field exists, seeding will use the default or empty value, as well as let you override the field with a custom value.