How to modify the contextual search result?

LearnerSubho
Mega Guru

Dear All,

How to add a filter in the contextual search result inside the notification email? e.g. I want to filter out some results based on the knowledge category.

I found that the OOB configuration is calling below macros and 'script include' to include the search result inside a notification

Macros :

1.cxs_results_header_email [protection policy : read-only]

2. cxs_result_email [protection policy : read-only]

Script include:

1. cxs_TableActions [protection policy : read-only]

I am not able to figure it out where to modify (even if I create a copy of the protected macros/scripts and use it in my custom configuration).

Do anyone have any idea how to implement this?

pradeepksharma kalai Mike Allen

10 REPLIES 10

Hello Steve,

I haven't worked on Contextual Search for quite a while but let's see what we can do.

  1. We did implement a Contextual Search Service Portal component and as part of that the url information for Service Portal was added to the results.  If you look at the Service Portal Widget 'Contextual Search - Inline Results' and the related templates that should give you a good starting point.
  2. The short answer is yes.  From what I remember it's in a UI Macro called 'searchservice_table.xml' which is on the file system.  You'll have to contact support to get a copy for your version so you can overload.

Hope that helps.

Cheers,

C

Hi Chris,

Thanks for the quick response! I figured out the macro header is just pulling from the Table Configuration record under Contextual Search so I was able to update that without having to modify anything.

I think what I'm going to do for changing the URLs is parse out the sys_ids of the KB articles and Catalog Items from the returned JSON object URLs in the email notification script, and then reconstruct them as SP links and reinsert them in the JSON for when they get rendered in the email. Seem like a logical approach?

Cheers,

Steve

Got it working using the approach I described, thanks again!

LearnerSubho
Mega Guru

It seems nobody has any idea how to achieve it.



sergiu.panaite tony.barratt could you please look into it if there is any way to add a filter?



michaellshively
Mega Expert

This is something I am struggling with as well. Seems that the documentation may be lacking a bit.


Would anyone happen to know how to remove Contextual Search results from notifications?


Specifically the notification sent to the end user... "Incident opened for me "