Adding custom responses for the Facebook channel

You can configure custom responses for the Facebook chatbot so that users, by entering a specific command in Facebook Messenger, perform an action such as view available menu options, log off from the current chat session, or restart the chat session.

To enhance user experience, you can use a rich user interface menu similar to a Facebook generic template, by selecting a custom response type which consists of a title, subtitle, link to an image, and up to three menu options. You must also specify a data transform to render this custom response menu in the chatbot properly. You can use the default pyPopulateOutboundData data transform as an example to create a custom response menu for the chatbot.

Note: You must purchase a separate license before using Pega Intelligent Virtual Assistant in your application. You must also obtain and install the Facebook channel component from Pega Exchange.
  1. Open a Facebook channel interface.
  2. Click the Configuration tab.
  3. To add a custom response, click + Add response.
  4. In the Response type list, click the name of response to provide when a user enters a command.
  5. In the Response command field, enter or modify a user command for the custom response.
  6. In the Response text field, enter the response text to display to the user. You can select a predefined response text by clicking Use existing.
  7. Optional: If you selected a menu response type, to add a command item to display as a menu:
    1. To add a command item, click + Add response.
    2. In the Menu item list, click the menu command name.
    3. In the Label field, enter a label for the menu command item.
    4. To add another command item to display as a menu, repeat steps a to c.
  8. Optional: If you selected a link response type, to link an account, complete the following steps:
    1. In the Title field, enter a title for the link account.
    2. In the Authentication callback URL field, enter the name authentication URL to the account to be linked.
  9. Optional: If you selected a custom response type, to add command items to display as a rich user interface menu:
    1. In the Data transform field, select a data transform that displays the rich user interface menu with response command items.
      You can create a data transform rule or edit the default pyPopulateOutboundData rule.
  10. Optional: If the response type requires authentication, for example when creating a case, select the Requires authentication check box.
  11. Click Submit.
  12. Click Save.