function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Glyn Thomas 2Glyn Thomas 2 

Knowledge Base Article Views

Hi,

Does anyone know if there is a way to pull article views for knowledge base out from the data loader. I'm working on extracting data from salesforce using data factory in azure so we can do MI reporting on it. It looks like this is an installed module in salesforce however and there seems to be an object within it called article views, but I'm unsure as to how I can see that via the data loader, or how I would pull that out of salesforce using the data factory.

Kind Regards

Glyn
Best Answer chosen by Glyn Thomas 2
AnudeepAnudeep (Salesforce Developers) 
Hi Glyn, 

You can use the following SOQL to extract the article views
 
SELECT id, ViewCount from KnowledgeArticleViewStat where Channel = 'AllChannels'

I recommend doing a CSV export through workbench before attempting this through data loader

Reference: https://help.salesforce.com/articleView?id=000318928&type=1&mode=1

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you

All Answers

AnudeepAnudeep (Salesforce Developers) 
Hi Glyn, 

You can use the following SOQL to extract the article views
 
SELECT id, ViewCount from KnowledgeArticleViewStat where Channel = 'AllChannels'

I recommend doing a CSV export through workbench before attempting this through data loader

Reference: https://help.salesforce.com/articleView?id=000318928&type=1&mode=1

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
This was selected as the best answer
Glyn Thomas 2Glyn Thomas 2
Thank you Anudeep,

Is there a way to tell the difference between internal and external articles? Sorry I should have puit that as one of the requirements in the original post. That is really helpful however so thank you.

Kind Regards

Glyn
AnudeepAnudeep (Salesforce Developers) 
Hi Glyn, 

The channel field in KnowledgeArticleViewStat will give us more information around 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.

I recommend trying with each of this filter as per your needs. As far as know, this is the only field that can be used to determine between internal and external articles