Hide Topics in portals virtual agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 04:29 AM - edited 05-15-2024 04:42 AM
Hello all i have requirement in virtual agent i have to show topic in my custom portal , portal name is test , and hide from sp portal , my virtual agent topic is hello world , properties there is for scripting
i write this script
(function execute() {
if(vaContext.portal == 'test'){
return true;
}
else
{
return false;
}
})()
but it is disapearing from service portal as well as test portal
i tryied but no luck
any help will highly appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 09:52 AM
@dheeru_1994 Not sure if you have configured the below. Just sharing it as per the below support case,
In your portals, you have to generate URLs with "sysparm_portal" parameter in order to read them from the Virtual Agent conditions. You can use this parameter as "vaContext.portal" in the condition for Virtual Agent topics.
Referring @Mark Roethof comment on the post : https://www.servicenow.com/community/virtual-agent-nlu-articles/virtual-agent-available-topics-depen...
To configure URL parameters through the instance options, see this article:
https://community.servicenow.com/community?id=community_article&sys_id=1ce3cd66db9e88101cd8a345ca961...
To configure the URL directly in your widget, you would need to clone the "Virtual Agent Service Portal Widget" widget and edit the URL in the Client Controller/Client Script:
$ctrl.vaSource = '/$sn-va-web-client-app.do?sysparm_nostack=true&sysparm_stack=no';
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 04:30 AM - edited 05-21-2024 04:32 AM
Hi @Sujatha V M , we have two portals test and sp, do we need to update below code with one of the portal suffix, I am not sure how we can update widget, I have checked above links but not able to find how we can update widget code or in option schema, could you please provide more information or steps to update widget.