Control topic visibility in Virtual Agent messaging channels
Suppress the display of a topic in a Virtual Agent messaging channel by using a condition script that excludes the topic from a channel.
Before you begin
Roles required:
- virtual_agent_admin or admin
- Administrator for third-party applications
About this task
In your condition script for the topic, use a context variable to identify the messaging channel that excludes this topic.
Procedure
-
Navigate to All > Conversational Interfaces > Assistant Designer.
-
Select the Asset library tab.
-
Select the topic for updating or select +Create to start a new topic.
-
Navigate to the Properties page, and open Who can access this topic under Advanced properties.
-
In the Context section, select Condition followed by Add Condition.
-
Enter a condition script that identifies the messaging channel (Slack, Microsoft Teams, Workplace from Facebook, or Facebook Messenger) from which the topic will be excluded.
You can use the following example script, which contains the vaContext.deviceType variable, to identify the messaging channel that excludes the topic: Slack, Microsoft Teams, Workplace, and Facebook Messenger.
JavaScript(function execute(){ if(vaContext.deviceType === 'Slack' || vaContext.deviceType === 'Teams' || vaContext.deviceType=='Facebook' || vaContext.deviceType=='Messenger'){return false;}return true;})() -
To save the topic properties, click Save.
Result
Publishing the topic deploys it to the Virtual Agent messaging channels, except for the Virtual Agent channels that you specified in the topic condition script. A keyword or an intent (if using NLU/Keyword) does not trigger the topic.
Parent Topic:Integrating Virtual Agent with messaging apps
---
title: Control topic visibility in Virtual Agent messaging channels
description: Suppress the display of a topic in a Virtual Agent messaging channel by using a condition script that excludes the topic from a channel.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/australia/conversational-interfaces/virtual-agent/control-topic-visibility-channel.html
release: australia
product: Virtual Agent
classification: virtual-agent
topic_type: task
last_updated: "2026-07-23"
reading_time_minutes: 1
breadcrumb: [Integrate VA with messaging apps, Integrate VA with other channels, Virtual Agent, Conversational Interfaces]
---
# Control topic visibility in Virtual Agent messaging channels
Suppress the display of a topic in a Virtual Agent messaging channel by using a condition script that excludes the topic from a channel.
## Before you begin
Roles required:
- virtual\_agent\_admin or admin
- Administrator for third-party applications
## About this task
In your condition script for the topic, use a context variable to identify the messaging channel that excludes this topic.
## Procedure
1. Navigate to **All** > **Conversational Interfaces** > **Assistant Designer**.
2. Select the **Asset library** tab.
3. Select the topic for updating or select **+Create** to start a new topic.
4. Navigate to the **Properties** page, and open **Who can access this topic** under Advanced properties.
5. In the Context section, select **Condition** followed by **Add Condition**.
6. Enter a condition script that identifies the messaging channel \(Slack, Microsoft Teams, Workplace from Facebook, or Facebook Messenger\) from which the topic will be excluded.
You can use the following example script, which contains the **vaContext.deviceType** variable, to identify the messaging channel that excludes the topic: Slack, Microsoft Teams, Workplace, and Facebook Messenger.
```
(function execute()
{ if(vaContext.deviceType === 'Slack' || vaContext.deviceType === 'Teams' || vaContext.deviceType=='Facebook' || vaContext.deviceType=='Messenger'){
return false;
}
return true;
})()
```
7. To save the topic properties, click **Save**.
## Result
Publishing the topic deploys it to the Virtual Agent messaging channels, except for the Virtual Agent channels that you specified in the topic condition script. A keyword or an intent \(if using NLU/Keyword\) does not trigger the topic.
**Parent Topic:**[Integrating Virtual Agent with messaging apps](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/va-integration-messaging-apps.md)
| title | Control topic visibility in Virtual Agent messaging channels |
| description | Suppress the display of a topic in a Virtual Agent messaging channel by using a condition script that excludes the topic from a channel. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/australia/conversational-interfaces/virtual-agent/control-topic-visibility-channel.html |
| release | australia |
| product | Virtual Agent |
| classification | virtual-agent |
| topic_type | task |
| last_updated | 2026-07-23 |
| reading_time_minutes | 1 |
| breadcrumb | Integrate VA with messaging appsIntegrate VA with other channelsVirtual AgentConversational Interfaces |