In the previous blog Creation of the topic for the bot conversation https://srinathpega.com/2022/06/26/power-virtual-agents-6-topic-creation-for-conversation/
In this blog will see building the conversation for the bot using variables. Variables to handles the dynamics content, such data input by the user. Variables save responses from user to helps guide the conversation.
Variable’s value can only be used in the topic where the variable is created. However, if you want the bot to use the same value across other topics, you can choose to make it a bot variable (you might know this concept from other systems as a global variable). This means that when the conversation
- Go to https://powerva.microsoft.com/
- Select the bot and Environment from the top right corner.
3. Click on Topics in the left pane.
4. Open the Laptop Details , the Topic we created in the previous blog https://srinathpega.com/2022/06/26/power-virtual-agents-6-topic-creation-for-conversation/ from Topics List.
5. For Question Node the variable will add automatically.
6. Click on the pencil icon in the Save response as section to set up the variable. This will open a Variable Properties pane on the right of the screen. Enter CmpunterBrand as the variable name and select Bot (any topic can access) under the Usage section and Click on save.
The variable name will change to have a bot. prefix. This means the variable can be used anywhere in the bot, in different topics. Your variable name in the authoring canvas will also be updated to show this bot. prefix.
7. Now add the Question node next to the Computer selection node for asking Price range as user input. Give the variable name Price and type is Money.
8. Click on save.
9. Now add the Condition node to Price Question node. and add the conditions to condition node.
10. Add the Show a message node to the condition node.
Test the Bot
11. Enter the massage laptop in the message and click on send.
12. Select the Apple Brand. It will ask the Price for it.
13. Enter the Price 1000 and click on send.
Hope you learn something, Thanks for Reading 📖!