Based on the user ,the items should be populated in the popular item in service portal

sekhar6
Tera Contributor

Hai All,

Base on log in user they should get frequently used catalog items in popular item in service portal ,For Example I have Log in ,into the service portal, Which item frequently used should be appear in Popular item , 

For example :

1.XXXX

2.YYYY

3.ZZZZ

These three catalogs were used means ,When the user logged in to the service portal  , the three catalogs only should be visible in the popular items.

3 REPLIES 3

Teja11
Giga Guru

Hi @sekhar6 ,

 

To display frequently used catalog items in the "Popular Items" section of the Service Portal based on the login user, you can follow these steps:

  1. Create a new table in ServiceNow to store the catalog items used by each user. You can create a new table by navigating to "System Definition" -> "Tables" -> "Create Table". For example, you can name this table "User Catalog Usage".

  2. Add two fields to the "User Catalog Usage" table: one for the user (reference field to the user table) and one for the catalog item (reference field to the catalog item table).

  3. Create a business rule that runs on the "sc_request" table and triggers when a catalog item is ordered. In the business rule, you can check if the logged-in user has an entry in the "User Catalog Usage" table for the ordered catalog item. If an entry exists, increment the usage count. If an entry doesn't exist, create a new entry with the user and the catalog item.

  4. Create a widget in Service Portal to display the popular items for the logged-in user. You can create a new widget by navigating to "Service Portal" -> "Widgets" -> "Create Widget". In the widget, you can query the "User Catalog Usage" table for the catalog items used by the logged-in user, sort them by usage count, and display the top three items.

  5. Add the widget to the "Popular Items" section of the Service Portal homepage. You can add the widget by editing the Service Portal homepage and dragging the widget to the "Popular Items" section.

 

Once you have completed these steps, the Service Portal will display the three most frequently used catalog items for the logged-in user in the "Popular Items" section.

 

If you don't want to create a new widget. Clone the existing widget and modify that.

 

Regards,

Teja

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

sekhar6
Tera Contributor

Hai ,

I have already a Popular item Widget , For that Which role should be Given to populate only the particular persons item when he logged in to the portal.

You can't normally give some roles and make them appear in a widget.

You need to know(calculate) how many times the user used the catalog items. so that you can get the frequently used catalog items to appear.

Need to follow the above steps to achieve this requirement.

 

Regards,

Teja

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.