I have roughly 7 objects - some with relationship to each other and some stand alone. I have to repeatedly copy the data from the production org to one of the dev orgs (there is roughly 10 so you can see why I want to automate this) whilst maintaining the relationships between the objects.

I am fairly certain I can set something up in Jitterbit that will export the current data from Production and then insert it into the dev org whilst maintaining relationship fields (lookups).

Does anyone know how to do this? If not in Jitterbit is there another application that is better?


One way that might work would be to create prod_id fields that are external ids in your dev org and schedule the export to a csv file from production and then use the csv files to upsert to your dev org matching the production id to the external id fields in dev. Scheduling the upserts so the parent objects get upserted first.
Update: For a junction object you would have the prod_id external id field on all 3 objects, upserting the junction object last. Adding a screen shot of an example from a test dev org.
enter image description here

  • This would be a good solution but if I have a junction object for instance, how do I maintain the relationships from production (lookup fields) when I do not have the new Salesforce IDs from inserting into the dev org? I can not do this through purely external IDs. I need some sort of automated process to match these fields in CSV files or SQL tables etc..... – David Dawson Dec 30 '14 at 2:40
  • If you upsert the other 2 objects first you should be able to match each related production ids to their corresponding external ids. – Jenny B Dec 30 '14 at 2:45
  • @DavidDawson added a screenshot where Authorities is a a child to both Account and Policy in this example. – Jenny B Dec 30 '14 at 3:04
  • 1
    I forgot that data loader has the ability to place external IDs into lookup fields to match records. Obviously it would be better to assign each object legacy external IDs but if production IDs are required for use then this is also a good solution. Thanks! – David Dawson Dec 30 '14 at 23:40

You can use DBAamp you can easily access your Salesforce objects using SQL Select, Update, Insert and Delete statements.

Then you can automate by writing SQL scripts that will pull data from live and then insert them into a dev environment. It will use API calls and you have to make the selects or update in bulk to be efficient.

  • This solution did come up during discussion but it's reliance on SQL knowledge makes it slightly more difficult. But I definitely agree for someone with the ability to manipulate data in SQL tables this would be a great solution. – David Dawson Dec 30 '14 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.