TOPIC Page as Search Result in EC Pro opening in backend view

nechauhan
Tera Contributor

Hi All,

 

We have a requirement to include Topics in search result along with knowledge articles and catalog items in our EC pro portal. After creating Indexed source and including it in Search profile, we are able to see the topic in search result, but on clicking it is redirecting to back end topic page.I have gone through these two articles and created below configurations for redirection. 

 

Reference community articles:

https://www.servicenow.com/community/employee-center-forum/topic-page-as-search-result/td-p/2524513/...

 

https://www.servicenow.com/community/ai-intelligence-articles/changing-the-ai-search-navigation-on-e...

 

1. Created AI Search Results Action Configuration for Topics :

neha_chauhan_2-1704821067782.png

 

2. Created EVAM View Config :

neha_chauhan_9-1704821549800.png

 

3. Created new view template copying from default template and updated clickAction in the script :

neha_chauhan_8-1704821467786.png

 

4. Created new Action Assignment for topic navigation :

neha_chauhan_10-1704821726655.png

 

5. Created new Action Payload definition:

neha_chauhan_11-1704821839725.png

 

**As a result, the EVAM View Config record has two action assignment M2Ms as below :

neha_chauhan_12-1704821966865.png

 

ISSUE: When we click on the searched topic it is redirecting to backend topic page URL  :

https://<instanceName>.service-now.com/topic.do?sys_id=<topicSysId>&sysparm_view=

 

However I need it to redirect to below URL :

https://<instanceName>.service-now.com/esc_old?id=emp_taxonomy_topic&table=topic&topic_id=<topicSysId>&recordUrl=%2Ftopic.do%3Ftopic_id%3D<topicSysId>&sysparm_view=

 

Let me know if I need to share more details. Has anybody had this issue and been able to solve it? Any help or guidance is really appreciated.

4 REPLIES 4

Julie21
Tera Expert

Did you find any solution to this? I'm struggling with the same issue. 

sachinmishr
Tera Contributor

Did anyone find solution on this . We are also facing same issue but not able to redirect to esc portal.

Out of the box the "topic page" search is actually rich content on the page. The pages we wanted to show up we added at least 1 piece of rich content to the page. If you don't want a lot of extra text on the page you could add a rich content image at the top as a page header then just name the rich content block the same as the topic page which is what shows up in search. 

 

The downside to this approach is in VA AI search does not work with rich content OOTB configuration like it does in the portal. So, you will not have a 1:1 experience with portal and VA search.  We were told ServiceNow has no intent to fix this defect as well. 

 

It is a work around but given ServiceNow is moving away from topic pages all together not expecting any OOTB solution here. 

Julie21
Tera Expert

Hi. I got it to work on my instance by doing the following: 

Create Index

AI Search > AI Search Index > Indexed Sources

Create a new index:

  • Name: Topics
  • Source: Topic [topic]
  • Conditions: Active is true; Taxonomy is [*your taxonomy*]
  • Field settings and mappings:

Source

Field

Attribute

Value

topic

name

map_to

title

topic

description

map_to

text

 

Remember to index all tables on all instances.

 

Create Search Source

AI Search > Search Experience > Search Sourcse

  • Name: ESC Topics
  • Indexed source: Topics

 

Configure Search Profile

AI Search > Search Experiences > Search Profiles

Use existing search source "ESC Portal Default Search Profile" (in Employee Center Core scope)

  • Link the search source you've just created.

Remember to publish the search profile.

 

Configure Search Result Configuration

This is what is shown in the list of search results - which icon, what keywords, etc.

Portals > [*your portal*] and open the search result configuration "ESC Portal Search".

  • Open the EVAM View Config Bundle M2M called "ESC Portal Search Bundle".
    • Create a new EVAM View Config: Name: Topic
    • Table: topic
    • Table fields: Description, Parent topic, Name
    • Custom fields: ai_search_teaser_title,ai_search_teaser_text,navigation_url,document_index
  • Create a new view template:
    • Name: Topic.
    • Template: Copy the template from the Universal Request template and make a few adjustments. I’ve made the key “Topic” not translatable, since it showed “topic” on the portal instead of “Topic” if I made it translatable.

{

    "component": "sn-search-result-evam-card",

    "staticValues": {

        "imageType": {

            "translatable": false,

            "key": "icon"

        },

        "icon": {

            "translatable": false,

            "key": "grid-outline" //choose an icon to be shown in search results

        },

        "textHeaderLabelOne": {

            "translatable": false,

            "key": "Topic"

        }

    },

    "mappings": {

        "textHeaderLabelTwo": "parent_topic",

        "textHeaderLabelThree": "sys_updated_on",

        "title": "name",

        "summary": "description",

        "ariaLabel": "description",

        "detailLabelOne": "sys_updated_on"

    },

    "actionMappings": {

        "clickAction": "navigation"

    }

}

 

  • Under EVAM View Config Action Assignment M2Ms: Link Existing. Select navigation

Create a new Search Result Action

Service Portal > AI Search > Search Results Action

Create a new one:

  • Short description: Topic Nav
  • Service Portal(s): [*your portal*]
  • AI Search Source: ESC Topics
  • Action name: navigation
  • Payload query parameters: sysId topic_id
  • Portal page: emp_taxnomy_topic

 

Change ACLs

Make sure users have read access to the topic table to be able to see search results.