Skill 6.2: Build and publish a basic chatbot
Power Virtual Agents simplifies the process of creating chatbots by eliminating the need to write code and providing a graphical design interface. The following sections examine the steps involved in creating and running a chatbot.
This skill covers how to:
Create a chatbot
After starting Power Virtual Agents, a developer must begin by creating a bot, using the dialog box shown in Figure 6-11. This step involves selecting a name, a language, and the environment in which the bot will be created. The process by which Power Virtual Agents creates the account’s first bot occurs in the background and can take as long as 15 minutes.
FIGURE 6-11 The Create a new bot dialog box
To create additional bots, developers must click the Bots panel icon at the top-right corner of the Power Virtual Agents portal to open the Bots panel shown in Figure 6-12 and then click the + New bot button.
FIGURE 6-12 The Bots panel in the Power Virtual Agents portal
Create a topic
As noted earlier, Power Virtual Agents includes a collection of system topics that cover some of the most common exchanges between bots and customers. When first creating a bot, a developer might want to use the Greeting topic to start the conversation, but after that, developers might have to create topics from scratch to accommodate their business needs.
The prebuilt Greeting topic ends with a message node saying “So, what can I help you with today?” Therefore, the next topic should address the possible responses that the customer might supply to that question. After creating that new topic, the developer can then link it to the Greeting topic to create a conversation by clicking the plus sign and selecting Go to another topic, as shown in Figure 6-13.
FIGURE 6-13 Linking to another topic
To create a new, blank topic, the developer clicks the +New topic button on the Topics page to open the panel shown in Figure 6-14. After supplying a name for the topic, and optionally a description, the developer can proceed to create a list of trigger phrases. These phrases should be the most likely responses to the question the bot asks at the end of the Greeting topic.
FIGURE 6-14 The +New topic interface in the Power Virtual Agents portal
For this example, Request might be an appropriate title, and some possible trigger phrases would be as follows:
■ I want to check the status of an order
■ I want to return a product
■ I want to place an order
After saving the topic, clicking the Go to authoring canvas button adds the phrases to the Trigger Phrases node, along with an empty Message node. The developer can add a message and then click the plus sign under the Message node to add another node. For example, the developer could select the Ask a question option and use it to provide the customer with three choices, as shown in Figure 6-15.
FIGURE 6-15 Building a topic in the Power Virtual Agents workspace
The Question node allows the developer to branch the conversation by creating three conditions corresponding to the three trigger phrases. The developer can then develop the branch for each option separately to complete the desired task.