Loading

Mass Migrate or Add Files and Content to a Salesforce Content Library Using Data Loader

Publiseringsdato: Jun 29, 2026
Beskrivelse

Salesforce administrators can use the Salesforce Data Loader to bulk transfer (mass migrate) Content Documents (Files) and Content to a Salesforce Content Library. This is useful when consolidating files from multiple sources, reorganizing Libraries, or migrating content during org merges.


The Data Loader performs insert operations on the ContentWorkspaceDoc object to associate existing ContentDocument records with a target Library. This process is available in Salesforce Classic. Files must already exist as ContentDocuments (not Documents) before they can be added to a Library via this method. If files exist as legacy Documents, they must first be converted to ContentDocuments before they can be migrated.

 

Løsning

To add one or more files to a Salesforce Content Library using Data Loader, you insert records into the ContentWorkspaceDoc object. This creates an association between existing ContentDocument records and the target Library. Follow the steps below.

Add a File to a Salesforce Content Library

  1. Locate the ID for the target Library. In your browser, navigate to the Library detail page. The URL looks similar to: https://cs3.salesforce.com/sfc/#workspaceView?selectedWorkspaceId=058700000004Cd0

    The Workspace ID is the 15 characters after the equal ( = ) sign and always begins with 058.

  2. Create a CSV file with the following fields:

    1. ContentDocumentId — Populated with the records to be moved. This can be found by running an export on the ContentDocument object.
    2. ContentWorkspaceId — Populated with the WorkspaceID you found above.

  3. Insert to the ContentWorkspaceDoc object. Note: You need to select Show all Salesforce objects:
    1. Start Data Loader
    2. Click Insert
    3. Click Show all Salesforce Objects
    4. Select Library Document (ContentWorkspaceDoc)
    5. Click Browse and select the .csv file created in Step 2, then click Next
    6. Click Create or Edit Map, then AutoMatch fields to columns
    7. Click OK, Next, then Finish

Notes

  • This process does not remove the Document(s) from the Library it was copied from.
  • The above steps apply only to files with a ContentDocument record (for example, files added via Chatter, Files, and Content).
  • If the files currently exist as Documents, they need to be converted into ContentDocuments (Files) before they can be moved to Libraries.
  • To convert legacy Documents to Files: (1) Run Data Export (include images, documents, and attachments); (2) Review Document.csv and the Documents folder for files; (3) Import files to the library using Data Loader. See Upload Content with the Data Loader.
Knowledge-artikkelnummer

000385550

 
Laster
Salesforce Help | Article