Newer Version Available

This content describes an older version of this product. View Latest

Knowledge Object Model

The Knowledge object model is slightly different than other feature areas in that we expose a set of abstract Salesforce objects that are not directly used when you create articles. These abstract objects then contain concrete derivations that you’ll actually use when creating articles.

Abstract and concrete objects

This architecture gives us some additional flexibility related to search behavior and allows us to support both Lightning Knowledge and Salesforce Classic.

Core Knowledge Objects

The core abstract Knowledge objects are for a Knowledge article (KnowledgeArticle), and a set of versions of that article (KnowledgeArticleVersion). These versions can include different translations, as well as historical versions of a particular article.

Knowledge inheritance

  • KnowledgeArticle—Represents the abstract Knowledge article object. This object contains metadata about a knowledge article irrespective of the article's version, translation, or status.
  • KnowledgeArticleVersion—Represents the abstract Knowledge article version object. Whenever you create a draft of an article, it gets a new version number and a unique ID. Each translation of an article also has a version and ID. Each version is a KnowledgeArticleVersion record with the KnowledgeArticle record as the parent.

When you create knowledge articles, you’ll actually be creating records with concrete Salesforce objects. These objects inherit from their abstract counterparts. By default, these concrete objects are named “Knowledge__ka” (for knowledge articles) and “Knowledge__kav” (for knowledge article versions) in Lightning Knowledge.

Knowledge derivations

This diagram shows the default names (in Lightning Knowledge) for the concrete implementations, but you can change these names. The names always have the suffixes “__ka” (for knowledge articles) and “__kav” (for knowledge article versions). However, you can change the “Knowledge” prefix by changing the Object Name for the Knowledge__kav object in the Object Manager.

Note

The concrete implementation contains any of your custom fields for a knowledge article. The Knowledge__kav object also contains a “RecordTypeId” field, which is a record type used to describe the article structure (for example, FAQ, Tutorial, and so on). Each record type can contain its own layouts. For example, an FAQ record type can use a special layout that displays custom fields such as “Question__c” and “Answer__c”.

In Salesforce Classic, the article structure is determined by the article type. Each knowledge article type has a different concrete implementation (for example FAQ__kav, Tutorial__kav). In Lightning Knowledge, we use one concrete object (for example, Knowledge__kav) and instead use the record type to associate an article with a unique article structure.

Note

Complete Knowledge Object Diagram

To build out the relationship of Knowledge articles to other objects, let’s highlight some of the other important object relationships. In this diagram, we use the default value “Knowledge” as the article type name to illustrate the object model, but keep in mind that if you change this value in Setup, the prefix for each object with “__” in the name would be changed accordingly.

Knowledge object model

The following objects are shown in this Knowledge object model. Each object links to its reference documentation for more information.