A data category selection represents a data category that classifies an article. This object can be used to associate an article with data categories from a data category group or to query the category selections for an article.
The object name is variable and has a syntax of Article Type__DataCategorySelection, where Article Type is the Object Name for the article type associated with the article. For example, Offer__DataCategorySelection represents the association between the Offer article type and its data categories. Every article is associated with an article type.
Users can only access, create or delete data category selection visible to their role, permission set, or profile. If a user has partial visibility on an article's categorization, only the visible categories are returned.
| Field Name | Details |
|---|---|
| DataCategoryGroupName |
|
| DataCategoryName |
|
| ParentId |
Every article in Salesforce Knowledge can be categorized. A data category selection represents a category that has been selected to classify an article. You can use the Article Type__DataCategorySelection object to query and manage article categorization in your organization. Client applications can create a categorization for an article with a Draft status. They can also delete and query article categorizations.
Answer communities use QuestionDataCategorySelection to classify questions.
The following SOQL query returns the data category selections used to classify the article whose ID is ka0D000000005ApIAI.
SELECT Id,DataCategoryName, ParentId FROM Offer__DataCategorySelection WHERE ParentId='ka0D000000005ApIAI'
This clause only returns category unique names. To retrieve category labels use the following clause:
SELECT Id,toLabel(DataCategoryName), ParentId FROM Offer__DataCategorySelection WHERE ParentId='ka0D000000005ApIAI'