Deployment Step: Data

Updated 20 hours ago by David Venegas

This article is part of the Deployment Steps.

The Data deployment step allows you to deploy records from one Org to another based on a SOQL query.

In this step records are migrated using the Upsert call of the SOAP API, meaning that new records will be created if they do not exist and existing records will be updated.

Note:

  • The batch size is 200.
    • It's possible to change the default batch size (200 records) by adding the following text on the Step name ":batch=N" where N is greater than 0 and less then 200. Here is a step name as an example where the batch size is set to 20: "Accounts :batch=20".
  • The fields included in the query are expected to exist in the destination Org (with the same API names and data types).
  • Data transformation is currently not supported.

Deploying Related Records (Relationships)

By creating multiple data steps you can deploy related records (relationships). For example, if you are deploying Account records and you want to include related Contacts, Invoices and Invoice Items, you will then need to create 4 Data deployment steps in the following order:

Step 1: SELECT External_Id__c, Name from Account

Step 2: SELECT External_Id__c, Lastname, Account.External_Id__c from Contact

Step 3: SELECT External_Id__c, Date__c, Number__c, Account__r.External_Id__c, Billing_Contact__r.External_Id__c from Invoice__c

Step 4: SELECT External_Id__c, Quantity__c, Unit_Price__c, Invoice__r.External_Id__c from Invoice_Item__c

You can make Environment variables apply to Data deployments by adding ":applyEnv=true" to the step name. 
Having a data backup will let you revert a data deployment in case the Query was not well suited to your requirements.


How did we do?