Configuring a chatbot with Digital Messaging
Expose your essential business services to users through a chatbot on multiple messaging platforms by defining a single Pega Intelligent Virtual Assistant (IVA) for Digital Messaging.
As a result, you provide users with additional ways to communicate with your application improving the overall user experience. For example, you can create an IVA for a travel agency application. As a result, customers can instantly book their flight by interacting with your chatbot on Apple Business Chat, Facebook Messenger, Twitter, and other messaging platforms.
This demo shows you how to configure a chatbot by using the Digital Messaging (DM) channel.
Creating a flow in the existing case type
First, you edit the Fee inquiry case type to add a parallel flow for the digital messaging chatbot.
- In App Studio, select the Fee inquiry case type.
- On the Request Information stage, click the More icon.
- Click Add create process, and then select Unified Messaging. A parallel process for the digital messaging is added to the workflow.
Configuring the chatbot conversation
Next, you configure the chatbot conversation by adding Question shapes to the flow. Each Question shape prompts the customer for information that is necessary to inquire about the fee.
- In the case life cycle, open the Request Information BotAgent process.
- On the flow, double-click the BotAgent-Request Information step to configure the chatbot conversation.
- To add a message shape to the canvas, right-click, and then select Add > Conversation > Send a message.
- Select the Send a message shape.
- Click Configure view to configure the conversation.
- Enter text that you want to send as a message to the end-user.
- Set some context by sending another message.
- Next, to add a question shape to the canvas, select Add > Conversation > Ask a question.
- In the Question type list, select Buttons. You can select different question types to build the conversation. The available question types are Open ended, Buttons, Quick replies, Yes or No.
- In the Message text box, enter the message text,
- Add Option items to the question. The option items act as buttons for end users.
- Check the Connector for one of the items to build the navigational path in the flow.
- Continue to build the conversation for the Else connector navigational path.
- Now, use the Open ended question to collect the date of the fee applied to the user's account.
- In the Save response to the field list, select the Date of fee property to automatically use the Date entity to extract the information.
- Confirm that the date of fee is applied to the user's account by using the Yes or No question.
- Insert the DateOfFee property in the question by using Insert property icon.
As this a Yes or No question type, you can see that the two paths (Yes/No) are added to the flow.
- Connect the No path to the previous question from where you obtained the date of fee information from the user.
- Continue to build the Yes path conversation to understand the reason for disputing the cancellation fee by using the Buttons question type.
- Add items such as My ride never arrived, my ride was late, and Other reason to the question.
- In the Save response to the field, select Dispute Reason for disputing the cancellation fee.
- Next to Other reason, select the Connector check box to allow users to enter any other reason.
- Add an Open ended question to collect other reasons from users.
- Once you collect the information for disputing the cancellation fee, leave the user a message.
- End the conversation back to the main path by using a Decision shape to tell the user that you can look up the information to see if you can automatically refund the fee or not. To do so, you need to use two message shapes to let the user know whether the user gets the refund.
- On the canvas, click the Decision shape.
- In the Existing condition list, select Cannot Auto Process Refund.
- In the Go to outcome path, select I've submitted this information...
From the Go to section, you can see all the configured messages for the flow.
- Select the Otherwise go to outcome.
- Add the End shape to end the conversation.
- Finally, save the updated workflow.
Configuring a digital messaging channel
To make the chatbot available to customers, you configure the digital messaging channel.
- In the navigation pane of App Studio, click Channels. The system displays the Channels landing page.
- On the Current channel interfaces, select the already created digital messaging channel, Distributor Facing Chatbot.
- In the Content section, click Add case type to add cases for the Digital Messaging interface, which helps your customer to open and access a case by entering a specific command.
- Perform the following steps to add a case type:
a. In the Case type list, select a case type that you want to create when the user enters a specific command.
b. In the Create case command field, enter the text that triggers the system to create the case.
c. If the case command requires authentication, select the Requires authentication check box.
d. Click Submit to save the changes.
Testing the chatbot
In the Preview console, you can test your chatbot.
- Enter a request, such as Fee Dispute. Make sure the request uses the exact case command you entered in the Create case command field for the channel.
The chatbot walks through the questions to gather the required information. The chatbot confirms when it has received the information required to dispute the cancellation fee.
- Optional: Train your chatbots to recognize the case in few more contexts.