Portal Search Experience: Order guide (sc_cat_item_guide) shows as a sc_cat_item

user8928938913
Tera Expert

Hi Community,

 

Just wondering if anyone could provide some suggestions or thoughts on this problem. We've recently upgraded to Tokyo and our portal search experience got a nice little upgrade. We now have "Suggestions" which provides us with a quick way to open items during a search.

 

Unfortunately, we've run into an issue where our order guides are being opened as an sc_cat_item, instead of sc_cat_item_guide when the user uses the "Suggested" feature. As such, the order guide isn't presented properly (does not have the "Next" button or the "Choose Options" button to proceed us to the next step). However, if the user completes the search to see the full results and then selects the item, they will be able to access the result properly (as a sc_cat_item_guide).

 

As an example:

user8928938913_0-1668722428286.png

If the user clicks the "Suggested - Order Guide - TEST", they will be brought to the order guide with the following URL:

https://<instance>.service-now.com/sp?id=sc_cat_item&table=sc_cat_item&sys_id=<sys id>

 

 

user8928938913_2-1668723619094.png

Whereas if they were to see the full list of results from the search and then click on the item, they would be brought to the order guide with the following URL:

https://<instance>.service-now.com/sp?id=sc_cat_item_guide&table=sc_cat_item&sys_id=<sys id>

 

We've tried:

  • Marking the order guide as "No Search" - but this prevents the item from being searched at all
  • Adjusting the Search Profile/Search Source (AI Search > Search Experience > Search Profiles) to hide the Class of Order Guides from the search results - the order guide as a Catalog Item shows up
  • Trying to add order guides as a Facet in the Search Applications (AI Search > Search Experience > Search Applications) - but we get an error "Invalid table name: "sc_req_item_guide". Please ensure that the table is defined in the current search profile's search sources."
    • So we tried to add an indexed source for the sc_cat_item_guide table but it doesn't existuser8928938913_1-1668723402136.png

       

 

At this point, it looks like we are either going to have to disable the Suggested results from showing up or deal with the backlash of our end users being unable to submit an order guide. Our intention would be to be able to prevent specific items (our order guides) from appearing as a Suggested item in the search experience.

 

Any tips or suggestions would be really appreciated!

 

Thank you

1 ACCEPTED SOLUTION

Hi Dale,

 

Try this:

function onLoad() {
   //Type appropriate comment here, and begin script below
	var qury = getParameterValue("id");
	var sysId =getParameterValue("sys_id");
	//alert('ji--  '+qury);
	if(qury == "sc_cat_item"){
top.window.location = "/sp?id=sc_cat_item_guide&table=sc_cat_item&sys_id="+sysId
	}	
	
function getParameterValue(name) {  
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");  
    var regexS = "[\\?&]" + name + "=([^&#]*)";  
    var regex = new RegExp(regexS);  
    var results = regex.exec(top.location);  
    if (results == null) {  
        return "";  
    } else {  
        return unescape(results[1]);  
    }  
}
}

 Created on the order guide as an onLoad script

 

View solution in original post

32 REPLIES 32

I received an update on our case.

 

Received an update from development this issue is planned to be backported to
- Tokyo Patch 7
- Utah

As a workaround, I've added an 'invisible' widget on the sc_cat_item page that detects an Order Guide is attempting to load and redirects to the sc_cat_item_guide page. This works for all but 2 of our Order Guides (not sure why) so I did something else on the sc_cat_item page to handle those.


Susan Williams, Lexmark

I received an update on our case.

 

Received an update from development this issue is planned to be backported to
- Tokyo Patch 7
- Utah

As a workaround, I've added an 'invisible' widget on the sc_cat_item page that detects an Order Guide is attempting to load and redirects to the sc_cat_item_guide page. This works for all but 2 of our Order Guides (not sure why) so I did something else on the sc_cat_item page to handle those.

 


Susan Williams, Lexmark

I received an update on our case.

 

Received an update from development this issue is planned to be backported to
- Tokyo Patch 7
- Utah

As a workaround, I've added an 'invisible' widget on the sc_cat_item page that detects an Order Guide is attempting to load and redirects to the sc_cat_item_guide page. This works for all but 2 of our Order Guides (not sure why) so I did something else on the sc_cat_item page to handle those.


Susan Williams, Lexmark

Agreed.

SusanWinKY
Kilo Sage

I've been having trouble posting my reply. Hopefully it works this time...

 

I received an update on our case.

 

Received an update from development this issue is planned to be backported to
- Tokyo Patch 7
- Utah

As a workaround, I've added an 'invisible' widget on the sc_cat_item page that detects an Order Guide is attempting to load and redirects to the sc_cat_item_guide page. This works for all but 2 of our Order Guides (not sure why) so I did something else on the sc_cat_item page to handle those.


Susan Williams, Lexmark