Skip to main content

Configuring a chatbot with Digital Messaging

Introduction

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.

Video

Transcript

This demo shows you how to configure a chatbot by using the Digital Messaging (DM) channel.

A ride-sharing company wants to enable customers to inquire about a ride fee by using a chatbot.

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.

  1. In App Studio, select the Fee inquiry case type.
  2. On the Request Information stage, click the More icon.
  3. 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.

  1. In the case life cycle, open the Request Information BotAgent process.
  2. On the flow, double-click the BotAgent-Request Information step to configure the chatbot conversation.
  3. To add a message shape to the canvas, right-click, and then select Add > Conversation > Send a message.
  4. Select the Send a message shape.
  5. Click Configure view to configure the conversation.
  6. Enter text that you want to send as a message to the end-user.
  7. Set some context by sending another message.
  8. Next, to add a question shape to the canvas, select Add > Conversation > Ask a question.
  9. 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.
  10. In the Message text box, enter the message text,
  11. Add Option items to the question. The option items act as buttons for end users.
  12. Check the Connector for one of the items to build the navigational path in the flow.
    Buttons question type
  13. Continue to build the conversation for the Else connector navigational path.
    1. Now, use the Open ended question to collect the date of the fee applied to the user's account.
    2. In the Save response to the field list, select the Date of fee property to automatically use the Date entity to extract the information.
      Open ended question type
  14. Confirm that the date of fee is applied to the user's account by using the Yes or No question.
  15. Insert the DateOfFee property in the question by using Insert property icon.
    Yes or No question type

      As this a Yes or No question type, you can see that the two paths (Yes/No) are added to the flow.

Conversation flow

 

  1. Connect the No path to the previous question from where you obtained the date of fee information from the user.
    Connect No path
  2. Continue to build the Yes path conversation to understand the reason for disputing the cancellation fee by using the Buttons question type.
    1. Add items such as My ride never arrived, my ride was late, and Other reason to the question.
    2. In the Save response to the field, select Dispute Reason for disputing the cancellation fee.
    3. Next to Other reason, select the Connector check box to allow users to enter any other reason.
      Dispute cancellation fee
     
  3. Add an Open ended question to collect other reasons from users.
  4. Once you collect the information for disputing the cancellation fee, leave the user a message.
    Build conversation flow
  5. 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.
    Decision
  6. On the canvas, click the Decision shape.
    1. In the Existing condition list, select Cannot Auto Process Refund.
    2. 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.
    3. Select the Otherwise go to outcome.
      Add Criteria
      Build Decision conversation
  1. Add the End shape to end the conversation.
  2. Finally, save the updated workflow.

Configuring a digital messaging channel

To make the chatbot available to customers, you configure the digital messaging channel.

  1. In the navigation pane of App Studio, click Channels. The system displays the Channels landing page.
  2. On the Current channel interfaces, select the already created digital messaging channel, Distributor Facing Chatbot.
  3. 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.
  4. 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.
    Create command
 

Testing the chatbot

In the Preview console, you can test your chatbot.

  1. 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.

  1. Optional: Train your chatbots to recognize the case in few more contexts.

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice