Loading

Update or Assign Salesforce Knowledge Article 'data categories' via Data Loader

게시 일자: Jun 29, 2026
상세 설명


Updating article data category assignment via the API is not possible. However, it is possible to delete existing data category assignments and insert or assign new categories to articles via the API using a client tool such as Salesforce Data Loader.

Administrators may consider manipulating existing Article Type__DataCategorySelection records by exporting existing assignments, deleting them, and then preparing a file to insert only their desired category assignments for articles to effectively achieve the same result as a mass update.

Notes

  • Users can only access, create, or delete article data category selections that are visible to their role, permission set, or profile via the API. Be sure that the user performing this operation has visibility to all Data Category Groups and Categories.

  • As of Spring '20, the maximum number of data categories that can be linked to an article is up to 50, allowing you to catalog articles more accurately. For more information, see the 'Find and Organize Articles with More Data Categories' section in the Salesforce Spring '20 Release Notes.
솔루션


The following steps describe how to mass-update or reassign Salesforce Knowledge Article data categories using Salesforce Data Loader. Because direct updates to data category assignments via the API are not supported, the process involves exporting existing DataCategorySelection records, deleting them, and inserting the desired new assignments. Always back up your data before proceeding.

⚠️ Warning: Always back up your data before performing any data operation. See Export Backup Data from Salesforce or Export Data for details. It is highly recommended to test these steps in a Sandbox first with a small subset of records before running in production.

Step 1: Export Existing DataCategorySelection Records

A. Open Data Loader and click Export | Login | Next

B. In 'Step 2: Select Data Objects' select Show all Salesforce objects and locate your desired Article Type's Data Category Selection object.

For example, an article type named "Documentation" appears as: Data Category Selection: Documentation (Documentation__DataCategorySelection)

Click Browse... and choose a file name and location to save the export file, then click Next.

C. In 'Step 3: Edit your Query' click Select all fields then Finish. Click Yes on the pop-up prompt.

Note: Keep an unaltered version of this export file for your records and backup.

Step 2: Delete Existing DataCategorySelection Records

Note: This step is not required if you are only adding new assignments. However, if you are updating, it is easier to delete existing article data category assignments and start with a 'clean slate' to ensure only the assignments you specify are applied. If a Data Category is already assigned to an article, the insert for that row fails with the error: duplicate value found: <unknown> duplicates value on record with id: <unknown>

A. Open Data Loader and click Delete.

B. In 'Step 2: Select Data Objects' select Show all Salesforce objects and locate the article type's Data Category Selection object. Click Browse... and choose the previously exported file. Click Next.

C. In 'Step 3: Mapping' click Create or Edit a Map then Auto-Match Fields to Columns and confirm the Id field is properly mapped. Click OK then Next.

D. In 'Step 4: Finish' click Browse..., choose a file name and directory to save success and error files. Click Finish, then Yes on both prompts.

Step 3: Insert New Data Category Assignments

Note: This process requires manual creation of a new file or manipulation of your export file. Create a unique row for each data category you want to assign to each article. Using Article Type__DataCategorySelection, you cannot select both a parent category (for example USA) and one of its descendants (California) or ascendants (North America) — only the first category is selected.

A. Create a .csv file with the following column headers:

  • ParentId — Id of the article associated with the data category selection. Generate a list of Article IDs by running an export or query against the KnowledgeArticleVersion object.

  • DataCategoryGroupName — Unique name of the data category group associated with the article.

  • DataCategoryName — Unique name of the data category associated with the article. To review available categories, navigate to Setup > Quick Find > Data Category Setup. For more details see Modify and Arrange Data Categories.

B. Open Data Loader and click Insert.

C. In 'Step 2: Select Data Objects' select Show all Salesforce objects and locate the article type's Data Category Selection object. Click Browse... and choose your insert file. Click Next and verify the record count, then click OK.

D. In 'Step 3: Mapping' click Create or Edit a Map then Auto-Match Fields to Columns. Confirm each field is properly mapped. Click OK then Next.

E. In 'Step 4: Finish' click Browse..., choose a file name and directory to save success and error files. Click Finish, then Yes on both prompts.


Knowledge 기사 번호

000382462

 
로드 중
Salesforce Help | Article