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.
Supported Calls
describeSObjects(), query(), retrieve()
Special Access Rules
Users must have access
to the published version of an article to retrieve its views. For
more information on published article version, see the PublishStatus field in KnowledgeArticleVersion.
Fields
| Channel
|
- Type
- picklist
- Properties
- Filter, Restricted picklist
- Description
- The channel where the article is viewed:
- AllChannels for article views
across all channels.
- App for the internal Salesforce Knowledge application.
- Pkb for article views in
public knowledge base.
- Csp for Customer Portal.
- Prm for article view in partner portal.
|
| NormalizedScore
|
- Type
- double
- Properties
- Filter, Nillable
- Description
- Article's weighted views in the selected channel. The article
with most views has a score of 100. Other article views are then calculated
relative to this highest view score. For example, if the best read
article has 2000 views and another has 1000. The first one gets a
score of 100 while the second gets 50.
|
| ParentId
|
- Type
- reference
- Properties
- Filter
- Description
- ID of the viewed article. This corresponds to a KnowledgeArticle record.
|
| ViewCount
|
- Type
- int
- Properties
- Filter, Group, Sort
- Description
- The number of unique views an article
has received in the selected channel. An article with a high
number of views may not always have a high normalized score. The normalized
score for an article is calculated based on views over time, with
more recent views earning a higher score. This field is available
in API version 27.0 and later.
|
Usage
Use this object to query or retrieve
statistics for article views.
Alternatively, client applications
can use the article type API Name followed by __ViewStat to query
or retrieve most viewed articles from a specific article type.
SOQL Samples
The following SOQL clause uses KnowledgeArticleViewStat to query all the article views in Salesforce Knowledge and return the related articles:
SELECT Id, NormalizedScore, Parent.Id
FROM KnowledgeArticleViewStat where Channel = 'App'
ORDER BY NormalizedScore
Use the following clause to
restrict your query to Offer articles for the Offer article type:
SELECT Id, NormalizedScore, Parent.Id
FROM Offer__ViewStat where Channel = 'App'
ORDER BY NormalizedScore