Sandbox seeding has been designed to make the job of deploying test data to Salesforce sandboxes, as frictionless as possible. However there are still strategies that can be employed, to ensure you have a successful outcome.
Refreshing
Gearset will match records between the source and target, using the Salesforce Id and your seeding history. In addition, data can only be deployed where the metadata is consistent between source and target.
Therefore it is recommended to refresh sandboxes before using Gearset sandbox seeding for the first time. Following this, metadata in the target should be kept up to date with the source. This can be achieved using compare & deploy, pipelines or periodic refreshes.
Start small
For the best outcomes, start by seeding a small amount of data, then build out. Sandbox seeding is configured to seed data across multiple deployments. Gearset always upserts records (when the object is updatable). Gearset uses the Salesforce Id and your seeding history to match records from the source to the target. This ensures duplicates aren't created.
If parent records have already been deployed, Gearset will maintain the relationships in the target org even if they aren't included in the current seeding. This again uses the Salesforce Id and your seeding history to match records from the source to the target.
Once you have run the seeding, you can add more data by clicking on rerun. This will take you back to object selection. Deploying again won't create duplicates and all relationships with previously deployed data will be maintained.
Which parents and children are included?
In each sandbox seeding, all records deployed need to be related to the starting object. The starting object is marked with a yellow star. All records will be included for that starting object based upon the filters.
β
When a child is included (opportunity in the above example), Gearset will deploy records based upon all lookup fields from the child (opportunity) to the parent (account). Child objects can also be filtered.
When a parent is included (pricebook2 in the above example), again Gearset will deploy records based upon all lookup fields from the child (opportunity) to the parent (pricebook2).
When an object has a self referential lookup field (parentId for account in the above example), Gearset always deploys the parents.
Record types and related users will be matched between source and target. If they exist in both orgs and you have the correct permissions, Gearset will maintain record types and audit data. To deploy audit data the Create Audit Fields permission is required on the target org, for the user performing the seeding. Audit data can only be set when creating records.
Act on problem analyzers and disable automations
Sandbox seeding has problem analyzers to alert users to potential issues. They can help with problems, such as invalid records types and invalid restricted picklist values. Read the suggested fix, to see how errors can be prevented.
Gearset can also disable rules and automations. This is done following masking. Deployments are more likely to succeed, where rules and automations are disabled. Therefore it is best to disable all suggested rules and automations.
Don't forget to reactivate the rules and automations after you have deployed your data!!!
Use templates
Once you have a working deployment, don't forget to save a template. Templates can be saved following the disable page or from the results page. They can be shared with your team, ensuring everyone has a solid starting point for their seeding.
When starting from a template you will land in the object selection page. This acts to remind you of the objects included in the seeding. The filters used and objects selected can be changed to suit the current seeding. In addition, templates can be updated. If you start small, you can evolve your templates until they fulfils you aims.
Break your seeding up
Sandbox seeding is more reliable with small deployments. Therefore, breaking your seeding up into multiple deployments often helps with getting the best results. Remember:
If the parent records have already been deployed, Gearset will establish the relationships when the child is deployed.
If the records have already been deployed, we won't create duplicates.








