This section outlines the migration of Approvals the source (Dev/Test) to any other target (Dev/Test/Prod) environment.

Tools Used for Migrating Data

Dataloader.iMio (to export/ import data with reference ids) www.dataloader.io


Naming convention

  • Source Environment > SrcEnv
  • Target Environment > TrgEnv

To migrate data

  1. Ensure all other metadata is migrated beforehand. For example, any new fields created on Quote/Agreement objects which are used in Approval Process.
  2. Create External ID fields for the objects, if not created. Text field with external ID flag checked, with an appropriate name entered.
    1. Approval Process
    2. Approval Rule Dimension
    3. Approval Rule
    4. Approval Rule Entry
  3. In the approval process object, create a RecordType text formula field with the return type "Text". Formula: RecordType.Name.
  4. For all thes objects, copy each record's ID into the External ID fields in the SrcEnv. For this you must export the data from SrcEnv, update the data in the CSV and import the data back to SrcEnv. For example, ID and External ID should be the same for all these records in the source environment.

Exporting Data

  • For Object Approval Rule Dimension export all records from SrcEnv.
  • For Object Approval Rule export all records from SrcEnv.
  • For Object Approval Rule Entry export all records from SrcEnv
  • For Object Approval Rule Assignee export all records from SrcEnv
  • For Object Approval Process from SrcEnv (copy paste the filter values)
    • Export records with filter Record Type Text = Approval Process and a specific Process Name.



  1. Manually update Backup Admin field in the CSV with the user id from TrgEnv.
    1. Export records with filter Record Type Text = ‘Entry Criteria’
    2. Export records with filter Record Type Text = ‘Initial Submission Action’
    3. Export records with filter Record Type Text = ‘Final Action’
    4. Export records with filter Record Type Text = ‘Step Group’
    5. Export records with filter Record Type Text = ‘Step’
  2. Blank out all data from Step Assignee ID column in CSV.
    1. Export records with filter Record Type Text = Step Filter Criteria.

There are 11 CSV files in total.

Importing Data

Before importing data it is recommended that you sort the spreadsheet by record name (for advanced logic purposes).

  1. Import ‘Approval Rule Dimension’ csv in TrgEnv. No Lookups are required.
  2. Import ‘Approval Rule’ csv in TrgEnv.
  3. Use lookup to External ID for all dimension fields.



  4. Import the Approval Rule Entry CSV in TrgEnv.
  5. Use lookup to External ID for Approval Rule field.



  6. Import the Approval Rule Assignee CSV in TrgEnv.
  7. Use Lookup to External ID for Rule Entry Field.



  8. Import Approval Process CSV in TrgEnv.
  9. Remove Mapping for RecordTypeId
  10. Add Mapping to the custom field APTS_Record_Type_Text__c, to Record Type ID, Lookup via: Name.



  11. Import the Entry Criteria csv in TrgEnv.
  12. Use the lookup to External ID for Entry Criteria field.



  13. Remove the mapping for RecordTypeId
  14. Add the mapping to custom field APTS_Record_Type_Text__c, to Record Type ID, Lookup via: Name
  15. Import Initial Submission Action csv in TrgEnv.
  16. Use the lookup to External ID for Initial Submission Action Field.



  17. Remove Mapping for the RecordTypeId
  18. Add Mapping to the custom field APTS_Record_Type_Text__c, to Record Type ID, Lookup via: Name
  19. Import Final Action csv in TrgEnv.



  20. Use the lookup to External ID for Final Approval Action Field.



  21. Remove Mapping for RecordTypeId.
  22. Add a mapping to custom field APTS_Record_Type_Text__c, to Record Type ID, Lookup via: Name.
  23. Import Step Group csv in TrgEnv.
  24. Use lookup to External ID for Step Group Field.



  25. Remove the mapping for RecordTypeId.
  26. Add the mapping to custom field APTS_Record_Type_Text__c, to Record Type ID, Lookup via: Name.



  27. Import  ‘Step’ csv in TrgEnv.
  28. Use Lookup to External ID for Step Field.



  29. Remove the Mapping for RecordTypeId
  30. Add the Mapping to custom field APTS_Record_Type_Text__c, to Record Type ID, Lookup via: Name



  31. Import the Step Filter Criteria csv in TrgEnv
  32. Use Lookup to External ID for Step Filter Field.



  33. Remove Mapping for RecordTypeId.
  34. Add Mapping to custom field APTS_Record_Type_Text__c, to Record Type ID, Lookup via: Name.


There is an issue with the advanced filter logic in Step Filter Criteria as there is no sequence number stored in the export files. If you are using Advanced Filter Logic, verify it manually after importing all the data.

If the user ID is not the same across the orgs, it may cause issues, and the user ID might have to be populated manually.