Newer Version Available
Upload Content with the Data Loader
| Available in: Salesforce Classic |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions |
You can use Data Loader to bulk upload documents and links into libraries
in Salesforce CRM Content. Before uploading documents or links,
note the following.
- If you intend to upload via the Bulk API, verify that Upload Bulk API Batch as Zip File on the page is enabled.
- When you upload a document from your local drive using Data Loader, specify the path in the VersionData and PathOnClient fields in the CSV file. VersionData identifies the location and extracts the format, and PathOnClient identifies the type of document being uploaded.
- When you upload a link using the Data Loader, specify the URL in ContentUrl. Don’t use PathOnClient or VersionData to upload links.
- You can’t export content using the Data Loader.
- If you’re updating content that you’ve already uploaded:
- Perform the Insert function.
- Include a ContentDocumentId column with an 18-character ID. Salesforce uses this information to determine that you’re updating content. When you map the ContentDocumentId, the updates are added to the content file. If you don’t include the ContentDocumentId, the content is treated as new, and the content file isn’t updated.
- Create a CSV file with the following fields.
- Title - file name.
- Description - (optional) file or link description.
- VersionData - complete file path on your local drive (for uploading documents only).
- PathOnClient - complete file path on your local drive (for uploading documents only).
- ContentUrl - URL (for uploading links only).
- OwnerId - (optional) file owner, defaults to the user uploading the file.
- FirstPublishLocationId - library ID.
-
RecordTypeId - record type ID.
To determine the RecordTypeId values for your organization using Data Loader, follow the steps in Exporting Data. The following is a sample SOQL query:
1Select Id, Name FROM RecordType WHERE SobjectType = 'ContentVersion'To determine the RecordTypeId values for your organization using the AJAX Toolkit:- Log in to Salesforce.
- Enter this URL in your browser: http://instanceName.salesforce.com/soap/ajax/38.0/debugshell.html. Enter the instanceName for your organization. You can see the instanceName in the URL field of your browser after logging in to Salesforce.
- In the AJAX Toolkit Shell page,
type:
1sforce.connection.describeSObject("ContentVersion") - Press Enter.
- Click the arrows for recordTypeInfos.
The RecordTypeId values for your organization are listed.
- TagsCsv - (optional) tag.
A sample CSV file is:1Title,Description,VersionData,PathOnClient,OwnerId,FirstPublishLocationId,RecordTypeId,TagsCsv 2testfile,"This is a test file, use for bulk upload",c:\files\testfile.pdf,c:\files\testfile.pdf,005000000000000,058700000004Cd0,012300000008o2sAQG,one - Upload the CSV file for the ContentVersion object (see Insert, Update, or Delete Data Using Data Loader). All documents and links are available in the specified library.