Manage topics in Power Virtual Agents
There are a number of ways you can manage your topics. Power Virtual Agents includes a topic checker that lets you know if there are errors in your topics, you can turn topics on or off so they don't appear to people chatting with your bot, and you can copy or duplicate topics to make it easier to create new ones.
Prerequisites
Important
This topic contains Power Virtual Agents preview documentation and is subject to change.
Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that you can get early access and provide feedback.
If you're building a production-ready bot, see Power Virtual Agents Overview.
Power Virtual Agents offers many ways to manage your topics. It includes a topic checker that flags topics that contain errors. You can turn topics on or off so that they don't appear to people chatting with your bot. And you can copy topics to make it easier to create new ones.
Topic errors
When you save a topic, Power Virtual Agents notifies you if it contains an error or raises a warning. Errors will stop your bot from working. You must fix them before you can publish your bot. Warnings won't stop your bot from working, but they may cause individual topics not to work as expected. You should fix them when you see them.
You can see whether a topic has errors, and how many errors it has, in the Topics page. The Topics page only shows errors, not warnings, because errors will prevent your bot from working.
View topic errors
In the Topics page, select the error count to open the authoring canvas to where the first error is.
Select Topic checker to view a list of the topic's errors and warnings.
Select an error to go directly to the node that contains the error.
Types of errors
The topic checker flags four types of errors:
- Node: The entire node is incorrect. It's highlighted in red.
- Field: The field might be missing required data. It's highlighted in red.
- Expression: The expression might be invalid. It's highlighted in red.
- Variable deletion: A variable was deleted, causing it to become "orphaned." It must be either removed or replaced. It's highlighted in red wherever it was used.
Topic status
Topics can have a status of On or Off to indicate whether they can be used or triggered in a bot conversation. By default, new topics are created with their status set to On. Change it using the toggle in the Status column in the Topics page.
When a topic is On, it will trigger as expected, either as a result of its trigger phrases or when another topic redirects to it.
When a topic is Off, it won't trigger at all. It won't trigger if its trigger phrases are used in a conversation or if another topic redirects to it. As far as your bot knows, the topic doesn't exist. The topic checker will identify an error if another topic redirects to an Off topic.
When you publish your bot, all topics are published whether they're On or Off.
Tip
Turn a topic Off to work on it in a draft state. Leave its status at Off while publishing changes to other topics that are ready to go live.
Copy a topic
After you've created a few topics, you may want to use a previous topic as a baseline when creating new topics.
In the Topics page, select the More actions menu (⋮), and then select Make a copy.
This option duplicates the selected topic with (Copy) added to the name. All the topic content, such as the description, trigger phrases, and the entire conversation, is copied over to the new topic.
A copied topic is Off by default to avoid confusion with the original topic, which has the same trigger phrases.
When you're done editing the new topic, turn it On to test it. When it's ready, publish the new topic.
There's no limit to the number of times you can copy a topic. A number will be added to the name and each topic will have its own internal ID.
To shift the conversation from the current topic to another topic without starting over, add a Redirect node. When the conversation reaches the end of the new topic, it resumes in the original topic by default. However, you can use two special nodes, End current topic and End all topics, to change the normal course of the conversation.
Redirect to another topic
Open your topic in the authoring canvas.
Where you want the transition to occur, select + to add a node, then select Topic management, and then select Go to another topic.
Select a custom or system topic from the list.
Pass variables between topics if needed. If the topic you're redirecting to requires any input or output variables, enter or select a value for each one.
Save your topic, and then use the Test bot pane to confirm that your bot successfully calls the redirect topic.
You can insert more nodes after the Redirect node if you need to. When the topic that's redirected to ends, the bot returns to the original topic and continues with any nodes that follow the Redirect node.
End the current topic or all topics
By default, a redirected conversation returns to the original topic at the end of the called topic. Use the End current topic and End all topics nodes to exit a topic—or the conversation—early.
An End current topic node ends the current topic at that point. If the current topic was called from another topic, the conversation returns to the original topic immediately. A common use of this node is in a condition branch. One branch exits the topic early, while another branch continues the current topic.
An End all topics node ends all active topics immediately. Your bot treats the next message from the user as the first message in a new conversation.
To signal to the user's channel that the bot thinks the conversation has ended, add an End Conversation node before the End all topics node.
Many of the system topics use these nodes to control how conversations end or start over. Learn how to use system topics in Power Virtual Agents.
Tip
The End all topics node doesn't clear or reset any global variables. To clear global variables, use a Clear all variables node first. For an example, see the default Reset Conversation system topic.
Feedback
Submit and view feedback for