You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: power-virtual-agents/authoring-create-edit-topics.md
+92-6Lines changed: 92 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,14 @@
2
2
title: "Use topics to design a chatbot conversation"
3
3
description: "The authoring canvas provides an intuitive, no-code way of creating a bot that can help answer user questions, perform actions, and solve issues."
4
4
keywords: "PVA"
5
-
ms.date: 8/27/2021
5
+
ms.date: 11/01/2021
6
6
ms.service: power-virtual-agents
7
7
ms.topic: article
8
8
author: iaanw
9
9
ms.author: iawilt
10
+
ms.reviewer: clmori
10
11
manager: shellyha
11
-
ms.custom: authoring, ceX
12
+
ms.custom: authoring, topics, variables, ceX
12
13
ms.collection: virtual-agent
13
14
searchScope:
14
15
- "Power Virtual Agents"
@@ -160,6 +161,7 @@ Additionally, you can **Add a condition** when inserting a node after a **Questi
160
161
161
162
You can [call Power Automate Flows](advanced-flow.md) and [insert authentication nodes](advanced-end-user-authentication.md) by selecting **Call an action**.
162
163
164
+
If you have configured hand off to Omnichannel with voice-based capabilities, you'll also see [additional actions](configuration-hand-off-omnichannel.md#voice-based-capabilities).
163
165
164
166
#### Show a message
165
167
@@ -170,16 +172,16 @@ You can [call Power Automate Flows](advanced-flow.md) and [insert authentication
170
172
You can also [use variables that you have defined elsewhere](authoring-variables.md) in your bot conversation.
171
173
172
174
173
-
#### Go to another topic
175
+
#### Redirect to another topic
174
176
175
-
1. To automatically have the bot move to a separate topic, select **+** to add a node, and then **Go to another topic**.
177
+
1. To automatically have the bot move to a separate topic, select **+** to add a node, and then **Redirect to another topic**.
176
178
177
179
1. 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.
178
180
179
181
180
-
:::image type="content" source="teams/media/topics-nodes-other-topic-flyout-teams.png" alt-text="Go to another topic node with options for other topics":::
182
+
:::image type="content" source="teams/media/topics-nodes-other-topic-flyout-teams.png" alt-text="Redirect to another topic node with options for other topics.":::
181
183
182
-
When you insert a link to go to another topic, the bot will go through the conversation path for that topic.
184
+
When you insert a link to redirect to another topic, the bot will go through the conversation path for that topic.
183
185
184
186
You can consider the redirected topic as a "subtopic".
185
187
@@ -201,7 +203,91 @@ If you redirect to any of the following [system topics](#use-system-and-sample-t
201
203
- Start over (this will also reset any [global variables](authoring-variables-bot.md))
202
204
203
205
206
+
#### Passing variables between topics
207
+
When redirecting to other topics, you might want to pass values into variables in the destination topic or get variables back from it. This is especially useful when you already have information that the topic needs and don’t want to have the user answer the question again to obtain the information. This can also be helpful when refactoring and separating your topics into reusable components, and you want to pass variables across the topics.
204
208
209
+
For more information on using variables generally within Power Virtual Agents, see [Use variables](authoring-variables.md).
210
+
211
+
>[!NOTE]
212
+
>Variables of type `Custom Entity`, `Date Time`, and `Duration` can't be passed between topics.
213
+
214
+
##### Receive values from other topics
215
+
When a topic defines a variable (for example, by a question node), the end user talking to the bot will be asked the question to fill in the variable’s value. If the value has already been acquired by the bot, there is no reason to ask the question again. For these cases, this variable can be defined as **Receive vales from other topics**. When other topics redirect to this topic, it can then pass a variable (or [literal values](authoring-create-edit-topics.md#using-literal-values-on-variable-inputs)) into this variable, and it will skip the question altogether. This leads to a seamless experience for the end user talking to the bot.
216
+
217
+
To receive values from other topics, set the variable's property:
218
+
219
+
1. In the **Question** node, select the variable that you want to receive values from other topics.
220
+
221
+
2. In the **Variables properties** pane, under **Topic (limited scope)** select **Receive values from other topics**.
222
+
223
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-properties-receive-input.png" alt-text="Screenshot of the authoring canvas showing variable properties pane with receive values selected.":::
224
+
225
+
3. Save the topic.
226
+
227
+
4. Go to the other topic which you want to redirect to, and follow the steps in [Redirect to another topic](authoring-create-edit-topics.md#redirect-to-another-topic) to redirect to the correct topic.
228
+
229
+
5. Select **+ Add input for destination topic**.
230
+
231
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-step1.png" alt-text="Screenshot of the authoring canvas showing adding input for destination topic.":::
232
+
233
+
6. Select the desired variable from the redirected topic that you want to pass the variable to.
234
+
235
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-step2.png" alt-text="Screenshot of the authoring canvas showing selection of the variable from the redirected topic.":::
236
+
237
+
7. Under **Enter or select a value**, select the variable from the current topic that you want to pass into the redirected topic.
238
+
239
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-step3.png" alt-text="Screenshot of the authoring canvas showing selection of variable from the list of options.":::
240
+
241
+
8. Once selected, the variable will be shown in the redirected node.
242
+
243
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-step4.png" alt-text="Screenshot of the authoring canvas showing the variable being passed into the redirect node.":::
244
+
245
+
246
+
##### Return values to original topics
247
+
248
+
When a topic asks a question (or otherwise obtains a variable from an action), this variable can be returned to the original topic that redirected to it.
249
+
250
+
In this case, the variable also becomes part of the original topic and can be used as any other variable. This helps you construct the topic so that information obtained by the bot is used across topics. This also reduces the need for global variables.
251
+
252
+
To return a variable to the original topic, set the variable's property:
253
+
254
+
1. In the **Question** node, select the variable that you want to receive values from other topics.
255
+
256
+
2. In the **Variables properties** pane, under **Topic (limited scope)** select **Return values to original topics**.
257
+
258
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-properties-return-value.png" alt-text="Screenshot of the authoring canvas showing variable properties pane with return values selected.":::
259
+
260
+
3. Save the topic.
261
+
262
+
4. Go to the other topic which you want to redirect to, and follow the steps in [Redirect to another topic](authoring-create-edit-topics.md#redirect-to-another-topic) to redirect to the correct topic.
263
+
264
+
5. The variable that's being returned to the topic is shown in the redirected topic.
265
+
266
+
6. Use the returned variable in your topic.
267
+
268
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-pass-receive.png" alt-text="Screenshot of the authoring canvas showing redirect topic with both values input and returned.":::
269
+
270
+
##### Using the variables pane
271
+
272
+
You can also use the **Variables** pane to select the receive or return status of multiple variables at once:
273
+
274
+
1. On the topic's menu bar, select **Variables**.
275
+
276
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-variables-bar.png" alt-text="Screenshot of the authoring canvas showing the variables pane icon.":::
277
+
278
+
2. Select whether you want the values to be passed in or out (or both) between topics for each of the variables in the topic.
279
+
280
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-variable-return-value.png" alt-text="Screenshot of the authoring canvas showing variable pane with two variables and a combination of input and output selected.":::
281
+
282
+
283
+
##### Using literal values on variable inputs
284
+
285
+
When passing a variable into a topic, you can also pass in literal values instead of a variable. Type the value intended to be passed in directly into the redirect node input.
286
+
287
+
To pass a literal value, type the value you want to use as the input instead of selecting a variable.
288
+
289
+
:::image type="content" source="media/authoring-create-edit-topics/authoring-subtopic-pass-variable-literal-value.png" alt-text="Screenshot of the authoring canvas showing literal input on an input variable in a redirect note":::
0 commit comments