For many the concept of mass or bulk loading files to salesforce.com using Salesforce CRM Content Libraries can be daunting or has always presented a challenge. We wanted to help so we have decided to layout some best practices along with tips and tricks. If you still don’t feel comfortable, please reach out to us as we can easily assist you with our services. We charge hourly for our services, so if you just need a few hours or a few days, we can make it a win-win situation. Please visit our services page or call us for more information.

Steps for loading files to salesforce.com, specifically Salesforce CRM Content Libraries:

1. Ensure that you have permission to load records using the Apex Data Loader tool. The Apex Data Loader application can be downloaded from Setup > Administer > Data Management > Data Loader. There is now a Mac version, so choose Windows or Mac and install the app to your local machine. We recommend the Windows version for loading files to Salesforce CRM Content Libraries. For all other data loads, you can use either version.

2. Install the Apex Data Loader application.

3. Review the Reference Guide from salesforce.com. This will get you familiar with the process and what it entails.

4. Before you launch the Apex Data Loader application, you should modify a few things to maximize performance. The Java Heap Size must be increased to process large Content files. Do do this, locate the Apex Data Loader application icon and right-click the icon Select “Properties” from the menu, then select the “Shortcut” tab and in the “Start In” field modify it to this (reference source):

“C:\Program Files (x86)\salesforce.com\Data Loader\Java\bin\javaw.exe” -Xms1024m -Xmx1256m -Dappdata.dir=”C:\Users\<user>\AppData\Roaming” -jar “C:\Program Files (x86)\salesforce.com\Data Loader\dataloader-<version>.0.0-uber.jar”

where <user> is the username of the User of the machine and <version> is the version of the app

Example: “C:\Program Files (x86)\salesforce.com\Data Loader\Java\bin\javaw.exe” -Xms1024m -Xmx1256m -Dappdata.dir=”C:\Users\Michael\AppData\Roaming” -jar “C:\Program Files (x86)\salesforce.com\Data Loader\dataloader-32.0.0-uber.jar”

Apex Data Loader Properties Apex Data Loader Shortcut Image

 

 

 

 

 

 

 

 

5. Save the settings and launch the Apex DataLoader app to ensure it starts properly. If you receive an error, ensure that the text from step 4 is correct.

6. Login to your salesforce.com organization and then modify the settings. Select Settings > Settings. Check the box for “Use Bulk API” and “Upload Bulk API Batch as Zip File (enable to upload binary attachments)”  and change the Batch Size to “1” (this will allow each file to be loaded one at a time).

Apex Data Loader Content Version

Apex Data Loader Settings

 

 

 

 

 

 

 

7. Prepare your Excel file (later to be converted to a .csv file) with the fields laid out in the Reference Guide as mentioned above in step 3.

8. Tips for creating the file for mass upload:

  1. Note all Dates must be in xx/xx/xxxx format
  2. Author is the OwnerID, so you will need to get the UserID of any Author you wish to be displayed on the Content once it is uploaded. Note that Author must have Library permission to publish content.
  3. Add LibraryID and RecordTypeID (optional).
  4. VersionData and PathOnClient are typically same. This is the full file path of each file.
    1. Note that it is easier if you place all of the Files in the same directory, so you can just copy and paste the same path for all files, but we understand this is not always an option.
    2. The File Name at the end must be the exact file name including the extension (.docx, xlsx, etc).
    3. You can create a concatenation formula in Excel to help ease the pain of listing all of the document names to the file path.

Example: c:\<user>\my documents\load files\price list 2016.xlsx

9. Once the Excel file is completed, save it as a .csv file.

10. Make a copy of the .csv file and add a “2” in the file name. This will be used in case some files don’t load or time out, you will have a reference of the full file listing.

11. Go back to the Apex Data Loader app and select “Insert”.

12. Select “Show all Salesforce objects” and select “Content Version (ContentVersion) as the object to load the files to.

13. Select the mappings and begin the load process.

14. Depending on the size of the files, the process can begin quickly or slowly. If the process fails, you will have to see which ones were loaded through the salesforce.com UI. We have found that the number processed shown on the Apex Data Loader screen does not always match the number of files loaded. You can then open the .csv file and delete the rows for the files that already loaded. Save the .csv file and begin from step 11 again.

15. Some files that are too large for the Java Heap Memory, will not load and it is best to load those manually and ensure you remove them from the .csv file.

This process can be brutal when you have large (20+MB) files and the batch fails to create or the Java heap size hits its limit, so just be prepared to mix in manual loading along with this semi-automated mass load of Salesforce CRM Content.

For more information please email us at sales@letsstrategize.com or call @ 908-376-9773 and we would be happy to review your project and ensure you are applying the right best practices to leverage salesforce.com features and functions and maximize your user adoption.