Loading

Article Score varies between Salesforce Reports and the API

Fecha de publicación: Aug 21, 2024
Descripción

Article Scores are calculated differently in User Interface Reporting and the API.  Due to this, we recommend that you implement one method of reporting Article Scores (pick either the Reporting or API method) and stick with that calculation.

Switching back and forth between the two methods will provide inconsistent results. 

Solución

Article Score calculation differences between Reports and API 

When accessed via the UI (reports), Article Scores are calculated as an average view rating. Scores take into account a half-life calculation. Every 15 days, if an article has not been viewed its average rating moves up or down. This calculation ensures that over time, older or outdated articles don't maintain artificially high or low ratings compared to newer, more frequently viewed articles.

When accessed via the API, Article Scores are calculated as a weighted view.  The article with most views has a score of 100. Other article views are then calculated relative to this highest view score. Example: If the best-read article has 2,000 views and another has 1,000, the best-read article receives a score of 100 and the other receives 50.


There are two main calculations that are leveraged when score is viewed in a report via the user interface (UI) or when queried via the API. 


1. Half-life calculation
 

This calculation is based on current time and the last reference time of the articles. So as the last reference time for an article increases the score decreases. The purpose of this calculation is to help make sure that older or outdated articles that haven't been viewed in a while don't maintain an artificially high score and so it's calculated based on views over time, with more recent views earning a higher score. 


2. Normalization calculation 
 

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. Reference the NormalizedScore field's details for the KnowledgeArticleViewStat object.


Half life calculation is applied in both situations whether the score is accessed in a report via the UI or when queried via the KnowledgeArticleViewStat object's NormalizedScore field via the API.

The reason the scores differ in both locations is because the normalization calculation is only applied to the score when querying via the API and is not applied when viewing a article score via the UI in a report. Because the scores aren't run through the normalization calculation when viewed in the report, their values may exceed 100 if the article has a high frequency of views over time and is relevant based on recent views.

Número del artículo de conocimiento

000382274

 
Cargando
Salesforce Help | Article