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.
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.
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.
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.
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:
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.
000382462

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.