Virtual agent : Some catalog items and record producers are not showing in the search result
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2019 06:10 PM
Hi Everyone,
I'm currently working on a Virtual Agent(Search Topic) in which I have used the Script from ITSM virtual agent plugin-
var context = '6f7e3f565b30130070e4492c11f91aea';
var contextualSearch = new sn_itsm_va.VAContextualSearchUtil();
var response = contextualSearch.search(context, 'Severance');
var success = contextualSearch.processSearchResponse(response);
var relevantSearchResults = contextualSearch.processGeneralResults(response, 20,0);
var kbResultCount = relevantSearchResults.length;
var search_kb_json_string = JSON.stringify(relevantSearchResults);
gs.info("SEARH RESULT: " + search_kb_json_string );
I have tried searching with a keyword Severance I have expected to have these 3 items in the results but I only got one ,which is the Separation with Severance catalog item only:
[{
"snippet": "Separation with <B>Severance</B>",
"image": {
"thumbnail": {
"link": ""
},
"link": ""
},
"related_links": [{
"sp_link": "?id=sc_cat_item&sys_id=6ee57a0513dc360099f85566",
"link": "com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=6ee57a0513dc360099f85566",
"title": "Order"
}],
"meta": {
"score": 549.3299,
"description": "",
"interleaved": true,
"source": "catalog"
},
"link": "cxs_cat_item.do?sysparm_id=6ee57a0513dc360099f85566",
"id": "sc_cat_item:6ee57a0513dc360099f85566",
"title": "Separation with Severance"
}]
- Labels:
-
Search
-
Service Portal
-
Virtual Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2019 06:15 AM
Hi there,
Did my answer solve your question? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your problem. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2019 12:20 AM
Hi Mark,
I have used your solution in the other problem I had thank you for that, but seems like my problem is from the contextual result itself. It's not querying the record producers data.
Thank you