Loading

Tips to Update Knowledge Base Articles With Salesforce Data Loader

Udgivelsesdato: Jul 29, 2025
Beskrivelse

General process steps for updating Knowledge Article with Data Loader:


1. Export the articles

2. Manipulate your article's data externally in a text editor

3. Perform an update

 

Note the following restrictions:

 
  • It's only possible to update draft articles via Data Loader, and there are restrictions on how you can export or query knowledge articles.
  • It's not possible to update an article's PublishStatus via the Data Loader, and it's necessary to create a draft version for each article you would like to update.
  • There is no standard or supported means to mass update articles to draft status. They must be set to draft status one at a time via the user interface.
  • You can only export and update one article type at a time if you're using classic knowledge. If you have multiple article types, separate operations will be required for each.



For the more adventurous types, the Salesforce Knowledge Developer Guide indicates that it may be possible to programmatically update knowledge articles, but Salesforce does not offer a supported client tool that leverages the Knowledge APIs for an end-to-end out-of-the-box solution for mass updating articles. You may be able to leverage the Apex Knowledge Management Publishing Service Class in order to set articles to draft, update them, and then re-publish, but doing so would require the creation of a client tool to manage this overall process, which is not supported. 

To potentially help a developer get started leveraging the Knowledge API, there is an informative Updating Knowledge Articles programmatically post on the discussion forums.

There is a Knowledge Heroku tool that includes the ability to update articles. More details are available in the Knowledge Import/Export Tools Success Community Group, but please note that this tool is not officially supported by Salesforce.

In addition, you may consider exploring the potential use of the Salesforce Knowledge Global Search and Replace (Release 2.0) App for Classic or Lightning Knowledge Search and Replace App, however, again these tools are not supported. See Support for third-party apps, installed packages, or programs for more details.

 

Løsning

1. Perform an Export:


a. Open Data Loader, click Export, and log in to your organization.

b. Select Show all Salesforce objects and select the appropriate ArticleType__kav object in Classic Knowledge where each article type has its own object available for selection. Substitute ArticleType with your desired article type's name to find its corresponding KnowledgeArticleVersion object. For Lightning Knowledge the object and is listed as Knowledge__kav.

c. Click Browse... and choose a location and file name for the export's resulting .csv file. Click Next >

d. Select your fields for export. Be sure to include Id and any of the desired standard or custom fields you would like to update.

Note: There are query implementation restrictions when performing an Export via Data Loader against the KnowledgeArticleVersion ArticleType__kav Classic or Knowledge__kav in Lightning) object. You must filter using the following syntax: Id = [single ID], Id IN [list of ID's], or PublishStatus = [status]. In addition PublishStatus is only permitted in a top-level AND condition or you will encounter the following error:
 
'MALFORMED_QUERY: Implementation restriction: When querying or searching the Documentation__kav object, you must filter using the following syntax: Id = [single ID], Id IN [list of ID's] or PublishStatus = [status]. In addition PublishStatus is only permitted in a top-level AND condition.'
 
You may add the following conditions to your query to satisfy the restrictions: 

PublishStatus = 'Draft' AND Language = 'en_US'
 
If your Knowledge base supports multiple languages you can find a list of available language codes for the Language condition in the documentation Supported Languages

e. Once you're satisfied with your field selection and have added the conditions as outlined above, click Finish.
 

2. Manipulate your resulting export file externally using an application of your choice:

 
Note: Salesforce does not provide support for Microsoft Excel features or functionality and it's against policy to perform data management or manipulation tasks. The following is provided to serve as a general example or guide for customers to prepare their data and can't be performed by Support on their behalf.

If your articles contain rich text area (RTA) fields, the column for the field will contain the HTML code for the rich text field. See the Supported HTML Tags and Attributes section of the Rich Text Editor documentation for a list of compatible HTML tags.

As an example, say that you need to update hard references to embedded image URLs in your Knowledge articles and your resulting export file's custom RTA field HTML for an example image is:

<img alt="Launch" src="https://c.<YourOldInstanceHere>.content.force.com/servlet/servlet.ImageServer?id=015a0000003AlU7&amp;oid=00Da0000001aQGp"></img>

To do so you could use Excel's find and replace function to search for "https://c.<YourOldInstanceHere>.content.force.com" and replace it with your new instance to update the references to the previous instance in all occurrences of URLs within your article's fields:

<img alt="Launch" src="https://c.<YourNewInstanceHere>.content.force.com/servlet/servlet.ImageServer?id=015a0000003AlU7&amp;oid=00Da0000001aQGp"></img>

This example would be particularly helpful if your organization has been included in an instance split or migration to ensure your Knowledge article images remain visible.
 

3. Perform an update:

 
Warning: Always back up your data before performing any data operation. See Export Backup Data from Salesforce or Export Data for more details. It is recommended to run a test with a small subset of records to ensure the operation was successful through manually opening and verifying that the corresponding records are correct in Salesforce.

a. Open the Data Loader and click Update.

b. Select Show all Salesforce objects and select the appropriate ArticleType__kav object where ArticleType is the article's article type name for Classic Knowledge or Knowledge__kav for Lightning Knowledge.

c.  Click Browse... and choose your updated file that you prepared externally in step 2. Click OpenNext >Ok.

d. Click Create or Edit a Map and either select Auto-Match Fields to Columns or manually map the Id field and the fields that you're updating. Click Ok. Verify the mapping is correct and click Next >

e. Click Browse... and choose a location to save the success and error files. Click Finish.

f. Review the warning and if you're ready to proceed, click Yes.
 
Vidensartikelnummer

000381649

 
Indlæser
Salesforce Help | Article