Pass and return variables to subtopics

Important

This content is archived and is not being updated. For the latest documentation, go to Power Virtual Agents overview. For the latest release plans, go to Dynamics 365 and Microsoft Power Platform release plans.

Enabled for Public preview General availability
Admins, makers, marketers, or analysts, automatically - Oct 28, 2021

Business value

This feature enables authors to pass variables from the parent topic to subtopics, facilitating the creation and maintenance of large topics.

Feature details

Subtopics operate just like normal topics except they run within the context of that parent topic. With the addition of variable passing, variables from the parent topic can be referenced in the subtopics as well, making them even more powerful.

For example, say you had a topic that's provided as a response when a user asks for the best places to eat in a city. Within that topic, you might ask follow-up questions to determine the type of food they want, in which area of the city they want to eat, or their price range. You could design a conversation path that included all of these follow-up questions in one topic, but it could become long, convoluted, and hard to follow from an admin perspective.

Instead, you can have each follow-up question call a subtopic. Any variables you assign within the subtopic will be available within the parent topic, so you could branch off into a subtopic to determine what type of food they want, fill that as a variable, and then return to the original topic to continue asking other follow-up questions. You could then call the food type variable either in the parent topic or use it in the subtopic that asks where they want to eat. That way, you'll only return restaurants that serve the type of food the user wants.

Screenshot of the authoring canvas showing variable properties pane with receive values selected.

See also

Passing variables between topics (docs)