How to restrict virtual agent topics on service portal side only.

Pavan Kumar28
Tera Contributor
Hi Team,

We have configured MS Team - ServiceNow Integration via virtual agent. We activated the virtual agent chatbot at Service Portal side for testing purpose whether same topics are visible or not. Same topics in the sense which are reflecting at MS Teams side. We confirmed that all published topics are visible at SP side and MS Teams as well... 
 
Here we are trying to exclude few topics from SP side and we want to display the topic in MS Teams alone for that I tried the below script 
 
 Path::  topic -->properties tab--> who can access this topic--> context-->edit script.

But the topic still reflecting on service portal side. Can anyone pls help me how to restrict this topic SP side and it should be display at MS Teams alone.
Note: Highlighted code only we written.
 
PavanKumar28_0-1706151108074.png

 

(function execute() {
    var gr = new GlideRecord('incident');
    //----------------------------------Restring the topic teams alone------
     if(vaContext.deviceType === 'Teams'){
      return true;
      }
      
     if(vaContext.portal == 'sp'){
    return false;
      }
    //----------------------------------------------
    return gr.canCreate();
})()


Thanks and regards,
Pavan.
0 REPLIES 0