Create and edit topics in your Power Virtual Agents bot in Teams

Select the version of Power Virtual Agents you're using here:

In Power Virtual Agents, a topic determines a how a bot responds to a question from a user. You can create topics by customizing provided templates, create new topics from scratch, or get suggestions from existing help sites.

All topics have trigger phrases and conversation nodes.

  • Trigger phrases: phrases, keywords, or questions that a user is likely to type that is related to a specific issue. You don't need to be exact with trigger phrases - the bot can determine what the user meant (their "intent") and match it to the right topic.
  • Conversation nodes: what you use to determine how a bot should respond and what it should do.

For example, a user might type "Open hours" into your bot, which will match that to the trigger phrases for the Store hours topic. The bot then asks which store the customer is interested in, and displays the hours the store is open.

You can see how the bot conversation works in practice by testing it in the Test bot pane. This lets you fine-tune the topic until you're ready to share it.

For bot and topic limits, see the Quotas, limits, and configuration values topic.

Prerequisites

Use system and sample topics

When you create a bot, a number of topics are automatically created.

Screenshot of the Topics list showing lesson topics and system topics.

These automatically created topics fall into two categories:

  • Lesson topics help you understand simple to complex ways to use nodes to create bot conversations.

    You can edit lesson topics or delete them entirely.

  • System topics are topics you're likely to need during a bot conversation.

    You can't delete or disable system topics or edit their trigger phrases. However, you can customize the nodes on the authoring canvas. We recommend that you don't customize these topics until you're comfortable creating an end-to-end bot conversation.

Create a topic

  1. Go to the Topics tab on the side pane to open the topics page.

    Select Topics on the side navigation menu.

  2. On the topics page, select New topic to open the authoring canvas for an empty topic.

    Select New topic at the top of the Topics page.

  3. When you enter the authoring canvas, the Trigger phrases pane will automatically open for you. You can also open the pane by selecting Trigger phrases.

    Selecting Trigger phrases will open the topic details pane

  4. Specify one or more trigger phrases for the topic in the Trigger phrases pane.

    You can specify more than one trigger phrase for a topic. You can include punctuation in a trigger phrase, but it's best to use short phrases rather than long sentences.

    Edit trigger phrases in the trigger phrases pane

  5. Select Details.

  6. Specify a name, description, and one or more trigger phrases for the topic.

    Selecting Details will open the topic details pane

  7. For Name, enter a name for your topic. You can add a Display name and Description.

    The display name is used when the bot needs to ask the person chatting which topic they're asking about.

    The description is never shown to users. Use the description to describe the purpose of the topic to yourself and other bot makers.

    The Topic details pane contains a name, display name, and description

    You can also rename the topic by selecting its name and entering a new value.

    Quickly rename a topic by selecting its name

  8. Select Save to add the topic to the topics list.

Design the topic's conversation path

  1. In the topic list, select the topic you want to edit.

    Selecting a topic will take you to the authoring canvas

  2. Power Virtual Agents opens the topic in the authoring canvas and displays the topic's trigger phrases. The authoring canvas is where you define the conversation path between a customer and the bot.

  3. For existing or system topics, a number of nodes will automatically be created. You can edit these nodes just as you can for other nodes.

  4. When you create a new topic, a Trigger phrases node and a blank Message node are inserted for you.

  5. You can add additional nodes by selecting Add node (+) on the line or branch between or after a node.

    Screenshot of adding a node.

  6. To move or change the paths between a node, drag the node anchor. It looks like a small circle on top of the node. When you drag the node anchor, you'll see a dotted line indicating the original path. You can also double-click the anchor and then select the new place for the anchor (you won't see a dotted line).

    Screenshot of moving a node's anchor.

Insert nodes

When adding a node, you can choose from five options. Each option has a specific node or nodes that will be inserted into the conversation path.

You can:

  • Ask a question
  • Add a condition
  • Call an action
  • Show a message
  • End with survey

When adding a node, you can choose from five options

If the node you are adding is the last in a topic, you can also add a Go to another topic node.

Go to another topic.

Ask a question

  1. To have the bot ask a question and get a response from the user, select Add node (+) to add a node, and then Ask a question to add a new Question node.

    Add a new question mode.

  2. Enter the question phrase in the first text box, Ask a question.

  3. Choose from several options for the user's response in the Identify field.

    These options determine what the bot should be listening for in the user's response. For example, they could be multiple choice options, a number, or a specific string. To understand more about the different options, see Use entities in a conversation.

  4. Depending on what you choose in the Identify field, you can enter what options the user should have.

    For example, if you select Multiple choice options, you can then enter the options the user can specify in the Options for user field. Each option is presented as a multiple choice button to the user, but users can also type in their answer in the bot.

    The conversation editor creates separate paths in the conversation, depending on the customer's response. The conversation path leads the customer to the appropriate path for each user response. You can add additional nodes to create branching logic, and specify what the bot should respond with for each variable.

  5. You can save the user response in a variable to be used later.

Tip

You can define synonyms for each option. This can help the bot to determine the correct option in case it isn't clear what the user's response should be mapped to.

  1. Select the menu icon on the top of the Question node, and then select Options for user.

    Select options for users.

  2. Select the Synonyms icon for the option you want to add additional keywords to.

    Select the synonyms icon.

  3. Add the keywords individually, and then once you're done, select Done to return to the Authoring canvas.

Add a condition

  1. To add branching logic based on variables, select Add node (+) to add a node, and then Add a condition.

  2. Choose the variable you want to use to determine if the bot conversation should branch at this point.

    Choose a variable.

Call an action

You can call Power Automate Flows by selecting Call an action.

Show a message

  1. To specify a response from the bot, select Add node (+) to add a node, and then Show a message to add a new Message node.

  2. Enter what you want the bot to say in the text box. You can apply some basic formatting, such as bold, italics, and numbering.

    You can also use variables that you have defined elsewhere in your bot conversation.

End with survey

When you end the conversation, you can have a survey appear that asks the user if their question or issue was answered or resolved correctly. This information is collected under the customer satisfaction analytics page.

  1. At the end of a response that resolves the user's issue or answers the question, select End with survey.

    End with survey.

Redirect to another topic

  1. To automatically have the bot move to a separate topic, select Add node (+) to add a node, and then Redirect to another topic.

  2. In the flyout menu, select the topic the bot should divert to. For example, you might want to send the user to a specific topic about the closure of a store if they ask about store hours for that store.

    Go to another topic node with options for other topics.

When the bot goes to another topic, the bot will go through the conversation path for that topic and then return to the original topic, at the place where it left.

You can consider the redirected topic as a "subtopic".

Screenshot of the authoring canvas showing nodes under a redirected topic node.

If you redirect to any of the following system topics, however, the entire conversation will end:

  • End of Conversation
  • Confirmed Success
  • Confirmed Failure
  • Goodbye
  • Escalate
  • Start over (this will also reset any global variables)

Use variables

You can also use variables that you have defined elsewhere in your bot conversation.

Delete nodes

  1. Select the menu icon on the top of the node's title.

  2. Select Delete.

    Select the menu icon and then the delete button.

Test and publish your bot

Test your bot when you make changes to your topics, to ensure everything is working as expected.

Once you've finished designing and testing your bot, you can consider publishing it so other team members can use it.