How to customize OOB 'Popular Topics' widget to show only some particular topics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 05:02 AM
I cloned the the 'Popular Topics' widget and tried to pass the sys ids of the topic I wanted . But that is not working for me . Can someone please guide me how can I achieve it?
I want to only display my topics in the below screenshot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 05:09 AM
Hi @Rahul Dev ,
Unfortunately, i don't think you can customize the algorithm.
We define "popular" topics as topics that contain content (catalog or knowledge) that have higher popularity. For a catalog item, popularity is the number of times it was requested and for a knowledge article, it is the number of times it was viewed. The popularity of a topic is the aggregation of the popularity of all the content under a topic.
Popularity is calculated based on a daily scheduled job that looks at the entire history, since the day Employee Center was turned on the instance and across all users in the instance.
The Popular Topics widget does not provide the option to tweak the recommendation algorithm. It will be customization if you choose to do so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2023 10:42 PM
Hello,
- There is a Scheduled Job "Populate Topic Popularity" which executes a script include that updates the popularity of popular topics and saves the data in the Topic Metrics table.
- I have turned off the scheduled job as it is not required.
- Changed the Order for this Topics in Topic matrics table "sn_ex_sp_topic_metric " through the fix Script.
var gr = new GlideRecord('sn_ex_sp_topic_metric');
gr.query();
while (gr.next()) {
if (gr.topic == 'ffb7887b1bf1d1109507535f034bcbfe') { //Report a Problem
gr.popularity = 100;
gr.update();
} else if (gr.topic == '9126c43b1bf1d1109507535f034bcbb8') { //Access Request
gr.popularity = 90;
gr.update();
} else if (gr.topic == 'a9e5403b1bf1d1109507535f034bcb05') { //Hardware Request
gr.popularity = 80;
gr.update();
} else if (gr.topic == '81e704bb1bf1d1109507535f034bcb4d') { //Software Request
gr.popularity = 70;
gr.update();
} else if (gr.topic == '7467c87b1bf1d1109507535f034bcb80') { //Onboarding/ Offboarding Services
gr.popularity = 60;
gr.update();
} else if (gr.topic == 'a9c6cc3b1bf1d1109507535f034bcb29') { //Departmental Services
gr.popularity = 50;
gr.update();
} else if (gr.topic == 'a807c07b1bf1d1109507535f034bcbfd') { //Infrastructure Services
gr.popularity = 40;
gr.update();
} else if (gr.topic == '4f96883b1bf1d1109507535f034bcb54') { //Can we help you?
gr.popularity = 30;
gr.update();
} else if (gr.topic == 'bf0808bb1bf1d1109507535f034bcb86') { //Knowledge Articles
gr.popularity = 20;
gr.update();
}
}
Thankyou
Please Mark correct if Helpful