I want to reorder the Popular topics categories to order below

Prashant Ahire
Kilo Sage
Reorder Buttons

Report a Problem

Access Request

Hardware Request

Software Request

Onboarding/ Offboarding Services

Departmental Services

Infrastructure Services

Can we help you?


Normally for Popular topics in  Employee center portal 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.
can we modify this and arrange them to specific order?
1 ACCEPTED SOLUTION

Prashant Ahire
Kilo Sage

Hello,

I have found the solution for this.

- 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();
}
}

View solution in original post

5 REPLIES 5

Prashant Ahire
Kilo Sage

Hello,

I have found the solution for this.

- 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();
}
}

Hi Prashant,

 

I tried this solution, but widget still showing old categories.

any help would be appreciated.

 

hitakshipatil
Tera Contributor

Thanks @Prashant Ahire ,

I tried this solution and it helped me.

Ratna Jyothi
Tera Contributor

Hi @Prashant Ahire - Is the above answer also solves if we want to make the popular topics as Static widget with respective topics instead of dynamic topics ?