How to search on specific fields and search terms in Virtual Agent Search Knowledge Base
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2019 11:54 PM
Hi SN Community members,
I'm looking for a method that can be used to search on specific fields in the "Search Knowledge Base" topic.
In the "Search Knowledge Base" topic there is a Script action "Contextual Search" and this uses the input from the previous User Input box.
var search_term = vaInputs.search_term;
var context = vaVars.search_context_sys_id;
var contextualSearch = new sn_itsm_va.VAContextualSearchUtil();
var response = contextualSearch.search(context, search_term);
var success = contextualSearch.processSearchResponse(response);
This works fine, but I want to know if there is a way to push more specific search actions into the search action (e.g. "category=ABC" -or- "Author=XYZ").
Another way of doing it is also fine for me, but the search should "respect" the data security (User Criteria).
Hope to hear from some of you!
Cheers,
Serkan
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 09:34 PM
i was trying to add this in script include and that did not work. i have to give a try in service portal api.
i will create a new topic and will add script action with the above code.