Before you can run a data deployment, you must manually enable Gearset's data loader. Running a data deployment in Gearset is a quick and simple process:
Select source and target
Using the left-hand side menu, navigate to the Configure and deploy page under
Select the source and target orgs to be used and click
CONFIGURE DEPLOYMENT. The orgs must be owned by your username and authenticated by OAuth, and not username/password.
You can also deploy data to and from Salesforce DX scratch orgs. To find out how to configure and create scratch orgs within Gearset, see our support guide. However, you will not be able to select a delegated org for deploying data.
Select primary objects to deploy
Gearset will now perform a Salesforce
listMetadata call to retrieve the object list from the selected source and target organizations, and display the results in a tree view.
For each parent object in the tree, you can specify the number of records to retrieve, up to a maximum of 100,000.
When a parent object is expanded, which you can do by clicking on it, Gearset checks for and lists any dependencies that are detected that can then be included within your data subset.
Gearset will then traverse the dependency graph to determine any further indirect dependencies (up to 15 levels) necessary to deploy records from the selected objects.
Use the object filter
Configure filterssettings to customise your data set and retrieve and deploy records based on the field value.
Filter using parent objectto further filter the records to deploy, by restricting it based on the parent object.
For the example below, if we tick the
Only deploy ... children of Accounts.Contacts- this will only include children of the selected
Accountsthat ALSO have .com in the Email field. Most likely this will be less than the 16 records displayed that match the
Once the objects have been selected, click
Select matching configuration and related objects
Choose how you want to match existing records, which related objects to include (this is determined by
master-detailfields — see this article for more info), and customize their field mapping for upserting.
Note that if the linked orgs are
RelatedOrgFullDeploymentorgs (e.g. sandboxes and production orgs, but not developer orgs), then, in addition to the "Create new records" and "Upsert records" deployment methods, there is also a "Don't deploy" option. This option will not deploy any records for the selected object, with Gearset assuming that the records are already on the target org.
The field chosen to match records for upserting can be an
External IDfield or a
ID Lookupfield. (You can create a custom field with the
External IDproperty, and view this in Salesforce. The
ID Lookupproperty is visible only via the API in Workbench.) If neither of those types of fields exists, new records will be created.
You can upsert with
IDwhen any of these are true:
The source is "backup" and the target is the original org.
The source is the same org as the target.
The source is a sandbox, the target is a sandbox, and they're sandboxes of the same org.
The source is a prod org, the target is a sandbox, and the target is a sandbox of the source org.
Choose whether you'd like the data deployment to continue if it hits an error deploying a record. In that case, if a deployment step fails, the remaining deployment steps will continue to execute, ignoring the errors encountered and deploying as many of the records as possible. Or, if you want the deployment to stop in the event of an execution step error, select the
Stop deploying remaining recordsoption.
By default, all of the fields that belong to the selected objects will be deployed. If you would like to exclude certain fields from the deployment, you can click the arrow on the right side of the
NEXTbutton and select
You will have the option to check the list of fields for each object and you can simply untick the ones that you would like to leave out of the deployment.
NEXTto continue and configure data masking.
Select data masking options
Choose whether you want to mask any fields to obfuscate their values. If a field is masked, Gearset will deploy fake values instead of the real values for that field, concealing sensitive customer information. Learn more about data masking.
Once you've chosen which fields to mask, click
PRE-DEPLOYMENT SUMMARYto review the data to be deployed. Gearset will create and list out the steps we’re about to take in your data deployment.
Deploy the data records
You'll be able to see the object records to be deployed, the actions Gearset will take to retrieve the records, such as fetching, including, creating and upserting, as well as the field count and any applied filters.
DEPLOY DATAto deploy the selected data to the target org. When the deployment is running, each stage will mark as completed and show you how many records have been processed in each step.
If you're deploying to a production org, you'll be asked to confirm that you're happy to proceed before the deployment runs.
Once complete, you'll have your subset of data available for any testing and debugging you'd like to perform on the target org.
Deploy Audit fields
By default, when deploying data from a source org to a target org, the Created Date and Last Modified Date of the new records will be set to the date of the deployment. This could be problematic where users build reports analyzing data by Created Date.
However, if the "Create Audit Fields" permission is enabled in the target org, and the user performing the deployment has this permission, then inserting the Created Date and Last Modified Date should be possible.
If Gearset needs to do any additional updates later in the deployment i.e. updating lookup fields at the end of the deployment, then the
LastModifiedDatemight become updated to be Gearset user doing a modification.
With these permissions, users can fill audit fields on record creation only through API tools. Future edits (updates) cannot be made.