How to Import the Notes Via Data Loader in Salesforce

In Salesforce, we have a data import wizard to import, export, and update org’s data but when it is required to import Notes, then it can’t be done with the data import wizard. In that situation, the Data loader is used to import notes.

In this Salesforce tutorial, we will learn to import the Notes via the data loader in Salesforce. Later we will also relate the imported notes with the accounts or contacts records.

Data Loader for Importing Salesforce Notes

In Salesforce, a data loader is a tool that allows us to import, export, and delete large amounts of data from your organization. While the primary use of a data loader is not specifically for importing notes, it can be used for various data migration and data management tasks, including importing notes.

With the help of the insert data operation, we can insert notes and then relate or assign those notes to the accounts or contacts records.

Data loaders are used to perform bulk data operations; this allows us to import large numbers of notes.

Considerations:

There are a few considerations that we should be aware of while importing notes with the Salesforce data loader.

1. Make sure you have created the CSV file with the correct header columns.

2. If you are importing bulk notes, then divide the data operations in small batches for better accuracy and easy debugging.

3. Make sure you have the required permission to import and view the Notes and the parent records of the imported notes.

4. Ensure correct mapping of the header columns with object field names.

Insert the Notes Via Data Loader in Salesforce

To insert the Notes via data loader in Salesforce, we first need to create a CSV file that we will import with the help of the insert operation.

1. Create a CSV file with header columns Title, OwnerId, and Content. In this CSV file, the tile of the note and in the Content column, enter the path of the notes where it is saved in your system.

Insert Notes with data Loader in Salesforce

2. To get the OwnerId, open the Salesforce console, and on the setup page, go to the Quick Find box and search, then select Users. Then, select a user ID that will be the owner of the notes. Then, from the URL, copy the 15-digit code starting from 00.

See also  Mass Update Campaign Member Status with Data Loader in Salesforce | Editing Multiple Campaign Member in Salesforce

If you do not insert the OwnerID in the CSV file, then by default, it will consider owner to user performing the Insert operation.

Create a CSV file to import notes with Salesforce Data Loader

3. Now save the created CSV file in your system from where it can be accessed by the Salesforce Data Loader.

4. After this, open the Data Loader, log in with your credentials, and then click on the Insert button.

Import Notes from Salesforce Data Loader

5. In this step, activate the checkbox Show all Salesforce objects, then search and select the data object Note(ContentNote), then browse the CSV file that we have created in the above steps.

At last, click on the Next button.

Use Salesforce Data Loader to import Notes

6. As we click on the Next button, the data loader will initialize the uploaded CSV file, and after successful initialization, click on the OK button.

Use Data Loader to import notes in Salesforce

7. In this step, we will map the CSV column header with the Lookup field names, and for that click on the button Create or Edit a Map, then in the next window click on the button Auto-Match Fields to Columns.

If the field names are not auto-matched, then you have to drag the object fields to the column mapping. After mapping, click on the OK button, then click on the Next button to proceed.

Import Mass Notes Using Salesforce Data Loader

8. In this window, select the location for the error and success files from where they can be accessed later. After this, click on the Finish button.

Import Notes via Salesforce Data Loader

9. As we click on the Finish button, a warning message will appear regarding the insert operation. Here, click on the Yes button to proceed.

Import Multiple Notes with Salesforce Data Loader

10. Now, the data insertion will start, and after the completion, we will see a dialog box with the success and errors that occurred during the data import. We can also view the successful insertion by clicking on the button View success.

Now, we have successfully imported the notes using the data loader. In the further steps, we will relate the inserted notes to a parent record with a Data Loader.

Relate the Inserted Note to a Parent Record with the Data Loader

Till now we have inserted the note with the defined ownership. After this, we need to relate these notes to the parent record. 

See also  How to Mass Delete Leads in Salesforce

 To import into ‘ContentNote,’ you must have both Chatter and the new rich text ‘Notes‘ feature enabled in your Salesforce organization.

Since the Note is stored in ‘Content,’ we need to insert a record to the ‘Content Document Link‘ table, and for that follow the below steps.

1. Create a CSV file with the column headers ContentDocumentID, LinkedEntityId, ShareType, and Visibility.

In the ContentDocumentID column, enter the IDs that we got in the Success file of the above data insert operation.

Relate the imported data to the records with Data loader

2. To get the LinkedEntityId, open the record page from which you want to relate this note and copy the 15-digit code starting from 00.

If you want to relate the imported notes with the multiple accounts or contacts records, then it will be better to export the contacts or accounts IDs with the data loader.

Import Notes with Data Loader in Salesforce

3. Now, in the header column ShareType, specify the values ‘I‘ or ‘V‘ for the standard objects since type ‘C‘ is not supported.

Where V = Viewer permission: The user can explicitly view but not edit the shared file, and I = Inferred permission: The user’s permission is determined by the related record.

Then, set visibility according to your requirements. In this example, I have set visibility as All users.

Relate the imported notes with salesforce data loader

Now save this CSV file in your system from where it can accessed by the data loader.

4. Now again, open the data loader and log in with your credentials, then click on the Insert button.

Salesforce Data Loader to import Notes

5. In this step, activate the checkbox Show all Salesforce Objects, then select the data object Content Document Link.

After this, browse the CSV file that we have created with ContentDocumentID and LinkedEntityId, then click on the Next button.

How to Import Notes using a Salesforce Data Loader

6. As we click on the Next button the CSV file will be initialized by the data loader. Here, click on the OK button to continue.

Import Notes in Salesforce via Data Loader

7. In this step, we will create a mapping between the Column headers and object field names, to do that click on the button Create or Edit a Map then in the window click on the button Auto-Match Fields to Columns.

If the field names are not auto-matched, then you have to drag the Salesforce object fields down to the column mapping.

After mapping, click on the OK button, then click on the Next button to proceed.

Import Notes to records via Salesforce Data Loader

8. Now select the file location for the error and success CSV file from where it can accessed and viewed later.

See also  How to Install Salesforce Data Loader for Windows

After this, click on the Finish button.

Use Data Loader to import bulk notes in Salesforce

9. As we click on the Finish button, we will get a warning message regarding the data insertion. Here, click on the Yes button to proceed.

Use data loader to import and relate notes in Salesforce

10. Now, the data insertion will start, and after its completion, we will see a dialog box showing the number of successes and errors that occurred during the data insertion.

In this case, we can see the success with zero errors, which means the import was successful.

Now click on the OK button to close the data loader.

Import Notes to records with Salesforce Data Loader

11. To view the inserted notes, open the Salesforce console and go to the Notes tab. There, you will see the imported notes and the records of contacts or accounts related to the notes.

Import notes to the ContentNote object with Data Loader

Now, as we can see in the above image, we have successfully imported notes and assigned them with a parent record via the data loader in Salesforce.

In this way, we can import the Notes Via Data Loader in Salesforce by following the above steps.

Conclusion

In Salesforce, importing notes via Data Loader saves time and streamlines our data management processes.

By following the above steps, you might have understood the method of importing notes via the Salesforce data loader, and now you will be able to efficiently import large volumes of notes into Salesforce, ensuring accurate and organized data.

Along with this, we also learned about the method to create a CSV file for the Notes insertion via data loader, and later, we also discussed relating the imported notes to the parent record ID with the help of the data loader.

You may like to read: