Ask a question

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots may refer to Power Virtual Agents while we update documentation and training content.

A Question node prompts a user for information and stores their response in a variable for use later on in the conversation.

The node allows you to choose the type of information to collect, such as a multiple-choice answer, a prebuilt entity, or a custom entity. Question behavior properties allow you to control the behavior of the node, such as what to do when the user enters an invalid response.

Like Message nodes, Question nodes can include images, videos, cards, quick replies, and message variations. For more information, see Send a message.

Prerequisites

Add a question node

  1. Select the Add node icon below the node under which you want to add a new node, and then select Ask a question. A blank Question node appears.

    Screenshot of a new Question mode with fields to enter a message, set the type of data to collect, and select a variable to store the user response.

  2. In the message box, enter the question you want to ask.

  3. Under Identify, expand the list and select the type of information the copilot should identify in the user's response. You can select an existing entity or create a new one if needed. Learn how to use entities in a conversation.

  4. Depending which Identify option you selected, there might be more properties to set.

    For example, for Multiple choice options, you need to specify the choices the user can select in Options for user. During a conversation, each choice appears as a button, but users can also type their answer.

  5. Select the name of the default variable under Save response as to open the Variable properties panel and change the name to something meaningful, like customerName or bookingDate.

    To choose a different variable or create a new one, select > to open the Select a variable panel.

Configure question behavior

Question behavior properties allow you to control how the copilot responds to an invalid response or how it validates user input.

  1. Select the Question node's menu icon (), and then select Properties. The Question properties pane appears.

  2. In the Question properties pane, select Question behavior. The Question behavior pane opens.

The Question behavior pane is where you can adjust behaviors like prompting, validation, and interruptions.

Skip behavior

Skip behavior determines what the copilot should do if the question node's variable already has a value from earlier in the conversation.

  • Allow question to be skipped: Skip the question if the variable has a value.
  • Ask every time: Ask the question even if the variable has a value.

Reprompt

Reprompt determines how your copilot reacts when it doesn't get a valid answer from the user. You can tell it to try again once, twice, or move on without getting an answer. To customize what your copilot does when it moves on, configure the properties under No valid entity found in the Question behavior pane.

  • How many reprompts: The number of times your copilot tries to get a valid answer. Repeat up to 2 times is the default. You can also select Repeat once or Don't repeat.
  • Retry prompt: To change the message, select Customize, and then enter the new prompt.

Additional entity validation

By default, the Question node checks for a valid response based only on the entity you selected. Additional entity validation allows you to add criteria to the basic test. For example, the Question node accepts any numeric value when it identifies a number, but you might want to make sure it's less than 10. You can also change the prompt to help the user enter a valid response.

  • Condition: Enter a Power Fx formula that returns a boolean value (true or false); for example, Topic.Var1 < 10
  • Condition not met prompt: To change the message, select Customize, and then enter the new prompt.

No valid entity found

No valid entity found determines what happens when your copilot stops trying to get a valid response from the user. You can escalate to a human agent or provide a default value. You can also change the prompt to give the user more context.

  • Action if no entity found:

    • Escalate: Redirect the user to the Escalate system topic. This is the default behavior.
    • Set variable to value: Set the output variable to a value and move on to the next node. Enter or select the value in Default entity value.
    • Set variable to empty (no value): Clear the output variable and move on to the next node. You can use a Condition node later to check whether the variable has a value.
  • No entity found message: To change the message, select Customize, and then enter the new prompt.

Interruptions

Interruptions determines whether the user can switch to a different topic during the question.

  • Allow switching to another topic: The user can abandon the question for a new topic.
  • Only selected topics: Specify for which topics the user can abandon the question.