QUESTION:
Is it possible to use DemandTools to migrate from one salesforce.com org to another one? Or to combine two orgs into one?
ANSWER:
It is feasible. The greatest challenge will be maintaining linkages to the “Parent” and “Linked” objects.
A typical migration would look something like this:
- Export the data from the database to be transferred into Microsoft Access, csv or excel files. If migrating one Salesforce org to another then MassBackup can be used to export all tables to Access or MassEffect could be used to create csv or excel files one table at a time.
- Load the Users and create a lookup for OldOwnerID and NewOwnerID
- Load the Accounts and create a lookup for OldAccountID and NewAccountID (will need the owner lookup to populate the correct owner for the Account). Make sure this is done in batch and that the oldID is saved in a custom field. Create a reference csv file for the oldID and newID.
- Load the Contacts, Opportunities, Leads (again maintain AccountID and OwnerID relationships)
- Load the linker objects OpportunityContact (etc.)
- Load the Attachments (will need the OldParentID and NewParentID for this one). They could link to contacts, accounts, etc.
- Create the Document folders and again track the OldFolderID and NewFolderID
- Load the Documents
- NOTES regarding documents:
- Documents & Attachments are all stored in base64 so just need to export and reimport them.
- Use .mdb (Microsoft Access) as the export output file type when saving the file to avoid the "body" being truncated. Microsoft Access will use a "memo" field for this long area text field avoiding any truncation of data.
- Depending on how many documents or attachments are in the input file and how large they are the "MassEffect Batch Size" setting in Options may need to be adjusted to something lower than 100 (the default batch size).
- Salesforce will throw errors if the amount of data being imported in one batch is over a certain size.
- Changing the batch size will process smaller "chunks" of the input file avoiding having to break the actual file into smaller files. A batch size of 50 is usually sufficient but if errors are returned by Salesforce simply adjust to a lower batch size and try again.
- NOTES regarding documents:
- Create the Tasks and Events (again matching WhoID’s and WhatID’s with the objects)
- Pricebooks, and then Pricebook Entries
- Opportunity Line Items
- Custom objects
There is a document on blog.sforce.com that tells you how to recreate price books.
The greatest challenge in migrating the database is in matching the ID’s of the newly created objects to the old ID’s AND knowing the basic structure of the Salesforce database. Importing the objects in the correct order (i.e. CampaignMembers are put in after Leads, Contacts and Campaigns) is the key to a successful migration.