Edit your bot's code directly with the code-behind view in the authoring canvas

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, Power Platform, and Cloud for Industry release plans.

Enabled for Public preview General availability
Users, automatically - May 24, 2023

Business value

Speed up bot development by utilizing your team's developer knowledge. Bot builders can use a YAML-based code view for bot topics and make edits directly into the code.

Feature details

Bot authors typically do most of their bot topic creation in Power Virtual Agents with the visual authoring canvas, which they can extend with advanced variables and Power Fx formulas.

The Power Fx formula editor provides autocomplete and type checking features for cases that require editing formulas in conditions and variables, but for advanced scenarios, bot builders can also view, edit, and configure their bot's topics using a code-behind view.

The code-behind language is a subset of YAML with added Power Fx formula support, and includes error handling and code autocompletion. For example, if the content for a node or function within a bot's topic is not well formed, the bot builder will be warned and must resolve the errors before they can save or return to the visual editing part of the authoring canvas. This ensures all content that is created for the bot has a visual representation, and there can be no "hidden" code.

Undo history is also preserved between the visual editor and code.

Even if you use the code-behind view, bots can still be exported using Power Platform solutions. The content exported is stored in the same format used by the code-behind view, so it's always easy to see what your bot is doing.

See also

Create and edit topics in your Power Virtual Agents bot - Edit topics with the code editor (docs)