
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
08-04-2022 10:49 AM - edited 01-03-2023 04:58 AM
Changing the navigation URL on Employee Center
In this technical How To article, we'll cover the configuration steps needed to change the behavior of the navigation when a user clicks on a search result.
In this use case, the current behavior for Knowledge articles is that the KB sys_id is used to navigate to the KB page.
We want to change the URL to use the KB number (for example KB000001) instead, so the new URL uses the sysparm_article URL parameter instead of the sys_id.
Note that in this use case, the widget on the KB page is built OOB to handle both the URL with the sys_id and the KB number so we'll focus on the AI Search configuration without reworking any widget.
Finding the EVAM configuration
Navigate to the Portals list, then open the Employee Center record.
Scroll to the bottom of the form and open the Search Results Configuration record.
On this page, open the EVAM View Config Bundle M2Ms tab and open the Taxonomy Portal Search Bundle record (click on the label, not the icon).
Scroll through the list and open the Taxonomy - Knowledge Search Results record.
Tip 1: EVAM View Config drives how search results are displayed and what actions can be taken.
To find which EVAM View Config record drives the search results you're looking to modify, filter by table and look at the Condition field. If there aren't any records, it means the Default Search Results record will be used.
Tip 2: If you are creating new EVAM View Config records, make sure they are part of a Bundle and linked to the Portal via the EVAM Definition.
On the Taxonomy - Knowledge Search Results record form (it's an EVAM View Config record), make sure that the Number is available in the list of Table Fields.
|
We've identified the existing EVAM configuration, now we are ready to modify it to fit our needs. |
Changing the EVAM configuration
From the Taxonomy - Knowledge Search Results record form, scroll to the EVAM View Config Action Assignment M2Ms related list and open the navigation record by clicking on the label (not the icon). To make the next few steps more manageable we recommend opening that record in a new browser tab.
The Navigation record is opened (it's an Action Assignment record), then open the record in the Specify client action field. To make the next few steps more manageable we recommend opening that record in a new browser tab.
The Navigation record is opened in a new tab (it's an Action Payload Definition record). Change the Key and Label fields to match the picture below. Then click Insert and Stay to create a new record.
Key: KB_NAVIGATION
Label: kb_navigation
Then, change the Payload field and Save.
Payload:
{
"table": "{{table}}",
"sysparm_article": "{{number}}",
"url": "{{navigation_url}}"
}
Make sure that the Action Payload Mappings and Action Payload Fields show the new Payload parameters.
Go back to the previous browser tab showing the Navigation record (the Action Assignment record). Change the Action label, Action name and Specify client action and click Insert and Stay.
Action label: KB Navigation
Action name: kb_navigation
Specify client action: kb_navigation
Go back to the previous browser tab showing the Taxonomy - Knowledge Search Results record form (it's an EVAM View Config record), scroll to the EVAM View Config Action Assignment M2Ms related list, click Link Existing and select the kb_navigation Declarative Action then Submit.
The Taxonomy - Knowledge Search Results record has now 2 records on the EVAM View Config Action Assignment M2Ms related list.
While still on the Taxonomy - Knowledge Search Results record form, open the record in the View Template field.
Modify the value actionMappings in the Template field.
Template:
"actionMappings": {
"clickAction": "kb_navigation"
}
|
We've modified the EVAM configuration to change the parameters for the action on click, now we can map it. |
Changing the navigation behavior
Navigate to Search Results Actions and open the Knowledge record for Employee Center.
Edit the Action name value to be kb_navigation, then Save.
Check that the parameters we created for the Action Payload Definition record are now displayed in the Payload query parameters field.
Open Employee Center and start a new search, open a KB result and notice that the URL now uses the number parameter.
|
We now use the new navigation behavior for the search results on the Employee Center. |
References
DocumentationEntity View Action Mapper |
Check out the AI & Intelligence forum to get the best content about ServiceNow's AI products!
- 17,455 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Loic1, thanks for the explanation. Really helps with understanding EVAM and search result actions!
I have one question: After following your instructions the url still has additional parameters (e.g. "&sys_kb_id=xxx"), I'm having troubles getting rid of them.
I have gone in the AI Search Results Action Configurations table (sp_ai_search_results_action_config) and deactivated the records that contain those parameters in the payload query, but they persist. Is there another way these parameters could have been added that I overlooked?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Odin PL ,
Generally speaking, when it comes to rendering or redirecting to KB content, you need the '&sys_kb_id=xxx'.
Are there other url parameters you are looking to remove? Tables are always included in generated urls, for example.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Loic1,
Can we remove table from generated URL?
Thanks,
Anu

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi anu21,
It may be possible, but likely not worth it. You can manipulate the URLs using a Search Script Post Processor. There is not a way to withhold the information via Search Results Action configuraiton.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Loic1 and @Gerard Dwan, thank you for the great article. This is just what i'm trying to do. I have a record that can be searched in service portal. The record has a reference to catalog item. I'll then try to use that catalog item record in the action to direct the user to that catalog item when user click on the search result. But for some reason, i cannot get link to open with "id=sc_cat_item". It always opens in "id=form".
Also i cannot get any custom parameters added to the link.
I have set the Portal page of "sp_ai_search_results_action_config" to "sc_cat_item" and also done the "Action Payload Definition". The only thing that manage to change is the sys_id and table. Could you explain what determines what i can put in the "Action payload definition" ?
Thank you in advance,
Kristoffer

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Kristoffer Pari - this is an indication that you have a missing record in the 'Search Results Actions' table. The behavior you are describing is a fallback behavior.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I can t read all in details but still interested in this area.
What is the added value of all of this?
Having the URL with a KB Number instead of a SysID ? Is that correct or something more beneficial behind ?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Is there a way to update the the URLs for search results in the Next Experience UI?
As an example, we get a genius result card for a knowledge article while searching in the Next Experience UI. The "View article" link opens to the article within the UI (kb_view.do). We would like to open that in the service portal instead. Similar for the "Request this item" button on catalog items. Is that possible?
As another example, we get a non-genius result card for a catalog item or order guide while searching in the Next Experience UI. Clicking the result card opens in the Next Experience UI (com.glideapp.servicecatalog_cat_item_view.do or com.glideapp.servicecatalog_cat_item_guide_view.do). We would also like to open that in the service portal instead. Similar for knowledge articles. Is that possible?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello,
How to do the same for AI Search on Workspace ?
as search result action is specific to Portal.
Regards,
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi thanks for creating this and I'm just curious what is the benefit to the user by the URL referencing the sysparm_article URL parameter instead of the sys_id.? Totally fine if this is just a technical walkthrough. Just curious. 😊
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
In the Virtual Agent, I have the link with this
/kb_view.do?sysparm_article=<KBnumber>
When I use the sys_id, there is the possibility that an article has been updated and I have noticed this approach opens an old version. Using the sysparm_article. It seems to always open the last published version.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content