Newer Version Available
Articles
Articles capture information about your company's products and services that you want to make available in your knowledge base. Articles in the knowledge base can be classified by using one or more data categories to make it easy for users to find the articles they need. Administrators can use data categories to control access to articles.
- Article-type layouts to organize the content in sections.
- Article-type templates to render articles.
- Article Type
- All articles in Salesforce Knowledge are assigned to an article type. An article's type determines the type of content it contains, its appearance, and which users can access it. For example, a simple FAQ article type might have two custom fields, Question and Answer, where article managers enter data when creating or updating FAQ articles. A more complex article type may require dozens of fields organized into several sections. Using layouts and templates, administrators can structure the article type in the most effective way for its particular content. User access to article types is controlled by permissions. For each article type, an administrator can grant “Create,” “Read,” “Edit,” or “Delete” permissions to users. For example, the article manager might want to allow internal users to read, create, and edit FAQ article types, but let partner users only read FAQs.
- Article-Type Layout
- An article-type layout enables administrators to create sections that organize the fields on an article, as well as choose which fields users can view and edit. One layout is available per article type. Administrators modify the layout from the article-type detail page.
- Article-Type Template
- An article-type template specifies how the sections in the article-type layout are rendered. An article type can have a different template for each of its four channels. For example, if the Customer Portal channel on the FAQ article-type is assigned to the Tab template, the sections in the FAQ's layout appear as tabs when customers view an FAQ article. For the Table of Contents template, the sections defined in the layout appear on a single page (with hyperlinks) when the article is viewed. Salesforce provides two standard article-type templates, Tab and Table of Contents. Custom templates can be created with Visualforce.
- Channel
- A channel refers to the medium by which an article is available. Salesforce Knowledge offers four channels where you can
make articles available.
- Internal App: Salesforce users can access articles in the Articles tab depending on their role visibility.
- Customer: Customers can access articles if the Articles tab is available in a community or Customer Portal. Customer users inherit the role visibility of the manager on the account. In a community, the article is only available to users with Customer Community or Customer Community Plus licenses.
- Partner: Partners can access articles if the Articles tab is available in a community or partner portal. Partner users inherit the role visibility of the manager on the account. In a community, the article is only available to users with Partner Community licenses.
- Public Knowledge Base: Articles can be made available to anonymous users by creating a public knowledge base using the Sample Public Knowledge Base for Salesforce Knowledge app from the AppExchange. Creating a public knowledge base requires Sites and Visualforce.
- Publishing Cycle
- Salesforce Knowledge Articles move through a publishing cycle from their creation to their deletion. The publishing cycle includes three different statuses: Draft is the stage when a new article is being created or an existing one is being updated. Articles with the Online status are draft articles that have been published and are now available to their different channels. Eventually, when a published article is at the end of its life, it can be moved to the Archived status or sent back to Draft to be updated in a subsequent version.
Working with Articles in the API
Articles are available through the KnowledgeArticleVersion and KnowledgeArticle objects in the API. They both represent an article but provide different capabilities.
- KnowledgeArticleVersion
- Every new draft article in Salesforce Knowledge
has a version number. When an article is published and you want to update it, you can create a
new Draft with a distinct version number. Each version
has its own ID. Once the updated version is ready to be published, it replaces the former one
and updates the version number. You can access the content of an article version using the KnowledgeArticleVersion object and filter on its Draft or Online status. For example, the following query returns the title of the Draft version of all the articles across all article types in United States
English:
1SELECT Title 2FROM KnowledgeArticleVersion 3WHERE PublishStatus='Draft' 4AND language ='en_US'You can change the language to return any other language your knowledge base supports, see “Support a Multilingual Knowledge Base” in the Salesforce online help.
Articles are also auto-assigned an Article Number, which is not a unique identifier to an individual article, but an identifier to a master article and all of its available translations.
- KnowledgeArticle
- Unlike KnowledgeArticleVersion, the ID of a KnowledgeArticle record is identical irrespective of the article's version (status). Where the KnowledgeArticleVersion object provides API access to an article's custom field values, the KnowledgeArticle object provides API access to an article's metadata fields.
The article record is the parent container of all versions of an article, whatever the publishing status (draft, published, archived) and the language. While KnowledgeArticle and KnowledgeArticleVersion represent any article in the Knowledge Base, <Article Type>__ka and <Article Type>__kav are the concrete representation of respectively KnowledgeArticle (“__ka” suffix) and KnowledgeArticleVersion (“__kav” suffix) for a specific article type. For example, Offer__kav gives access to every Offer articles. KnowledgeArticle and <Article Type>__ka give access to an article independent of its version. KnowledgeArticleVersion and <ArticleType>__kav enables you to retrieve a specific article version and all its standard (KnowledgeArticleVersion) and custom (<ArticleType>__kav) fields. The following query returns the title for all the published offers in United States English:
1SELECT Title
2FROM Offer__kav
3WHERE PublishStatus='online'
4AND language ='en_US'The following table lists API resources for working with articles:
| Name | Type | Description |
|---|---|---|
| Article Type__DataCategorySelection | Object | A data category selection represents a data category that classifies an article. |
| Article Type__ka | Object | Gives access to an article from a specific article type independent of its version. This object is read–only and can't be used in a SOQL clause or in a WITH DATA CATEGORY DataCategorySpec SOSL clause. For more information, see KnowledgeArticle. |
| Article Type__kav | Object | Gives access to all articles from a specific article type depending on their version. This object gives access to the fields available in KnowledgeArticleVersion. For more information, see KnowledgeArticleVersion. |
| Article Type__Feed | Object | Represents a single feed item in the feed displayed on the detail page for an article. |
| Article Type__ViewStat | Object | Provides statistics on the number of views for an article from a specific article type. For more information, see KnowledgeArticleViewStat. |
| Article Type__VoteStat | Object | Provides the weighted rating for an article from a specific article type on a scale of 1 to 5. For more information, see KnowledgeArticleVoteStat. |
| CaseArticle | Object | Represents the association between a Case and a KnowledgeArticle. |
| FeedComment | Object | Represents a comment added to a feed by a user. This object is available in API version 18.0 and later. |
| FeedItem | Object | FeedItem represents an entry in the feed, such as changes in a record feed, including text posts, link posts, and content posts. This object is available in API version 21.0 and later. This object replaces FeedPost. |
| KnowledgeArticle | Object | Gives access to an article independent of its version. This object is read–only and can't be used in a SOQL clause or in a WITH DATA CATEGORY DataCategorySpec SOSL clause. |
| KnowledgeArticleVersion | Object | Provides a global view of standard article fields across all article types depending on their version. This object is available in API version 18.0 and later. |
| KnowledgeArticleViewStat | Object | Provides statistics on the number of views for the specified article across all article types. This object is read-only and available in API version 20 and later. |
| KnowledgeArticleVoteStat | Object | Provides the weighted rating for the specified article on a scale of 1 to 5 across all article types. This object is read-only and available in API version 20 and later. |
| NewsFeed | Object | Represents a single feed item on a user's home tab. A Chatter feed shows recent changes to records that the user is following. |
| UserProfileFeed | Object | Represents a user profile feed, which tracks all actions by a user on records that can be tracked in a feed. This feed is displayed on the user profile page. |
| WITH DATA CATEGORY filteringExpression | SOQL clause | Filters articles depending on their status in the publishing cycle and their data categories. For more information, see the Salesforce SOQL and SOSL Reference Guide. |
| WITH DATA CATEGORY DataCategorySpec | SOSL clause | Finds articles based on their categorization. For more information, see the Salesforce SOQL and SOSL Reference Guide. |
Salesforce Knowledge Objects
This entity relationship diagram (ERD) illustrates relationships between the Salesforce Knowledge objects.
For field definitions, see its object's page within this guide. Fields with an asterisk (*) are only accessible if your knowledge base supports multiple languages, see “Support a Multilingual Knowledge Base” in the Salesforce online help.