Hiding Topics based on Portal in Virtual agent topic picker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 10:38 PM
Hi
we got new requirement to make Virtual agent bot visible from servicenow to third party application but few topics should be hidden in third party applications
And we are trying to hide few topics using below code, but we are having below issues
1.It is not going to else part
2.Also, is "vaContext" servicenow specific ? It will work for topic hiding on third party using "vaContext"
Any suggestions really helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 11:17 PM
Hello
Please see below threads.
Article : https://community.servicenow.com/community?id=community_article&sys_id=563785fadb27b7c423f4a345ca9619f6
Thread : https://community.servicenow.com/community?id=community_question&sys_id=b987066b1b9adc108672ea89bd4bcb8e
Mark my answer as correct if that helps.
Regards
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 11:29 PM
Hi there,
Don't know if this also works for third party integrations, though worth trying:
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
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
05-17-2022 01:36 AM
Hi
We found one issue, when we are trying with below code, we have seen in both KB and SB portals, it is returning portal name as "SP" only, Can anyone please sugegst, from where portal name like "sp" or "kb" is returning. I have seen in portals, kb record is having "kb" as url suffix and "sp" has "sp" as url suffix but it is returning sp even for KB portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2022 03:15 AM
Hi there,
You could try something like:
if(vaContext.portal == 'sp' || vaContext.portal == 'kb'){
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field