Creating a Template for Salesforce Sandbox Seeding


On this page

Salesforce provides a sandbox that you can use for testing and demo purposes. You can populate, or "seed," the sandbox with a Commvault backup from your production Salesforce data or another Salesforce sandbox. Data is restored from a local (sync) database.

After you have set up a sandbox, you can make customizable and reusable templates for repeatedly seeding it with the data you need. You can apply a data-masking policy to a template or select one when performing the seeding operation.

Here are some important points to remember about sandbox seeding:

  • Seeding is always performed from the latest backup.

  • If a masking policy is attached to a template, it will always be used.

  • If a masking policy is not attached, any can be used during seeding.

  • As of SP32, plain-text SQL WHERE clauses are no longer supported.

  • Child objects are limited to 1000 per rule, per driving object.

  • The WHERE clause filter is not available when a rule has more than one object during creation.


  1. In Commvault, in your source organization, navigate to the Sandbox seeding tab.

  2. Click Create new to create a new template.

  3. Enter a name for the template.

  4. (Optional) Select a data masking policy.

  5. For each object that you want to seed, add a corresponding rule. To add the first rule, click Add next to the Objects grid.

  6. From the object dropdown, select the driving objects for the rule. One, multiple, or all objects can be selected.

  7. In the next dropdown, select a rule:

    • All records: Seed all available records for the object in the latest backup.

    • Most recently updated N records: With this option selected, specify the number of records, N.

    • Records updated in last N days: With this option selected, specify the number of days, N.

    • SQL Where clause: With this option selected, you can build an advanced SQL filter, using a combination of rules and rule groups.

  8. In the Parent objects to restore field, choose whether to restore all parent objects (recommended) or none.

    Important: Including parent objects has the following effects:

    • Data integrity is maintained. If parent objects are included and some parents do not exist or some parents have incorrect values, the restore still completes.

    • When objects such as User objects are updated, end users receive notifications, which may be undesirable.

  9. In the Child objects to restore field, choose the child objects to restore.

    • To exclude some child objects, select the Exclude children check box. Then, in the Children to exclude box, select the child objects that you want to exclude.

  10. Click Add rule.

    If you added multiple objects, each has its own row. Add more rules as needed.

  11. Save the template.

Templates can be edited, cloned, or deleted on the Sandbox seeding tab. To seed a template to a sandbox organization, select the action and click Seed action.