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.
- Open a Facebook channel interface.
- Click the Configuration tab.
- To add a custom response, click + Add response.
- In the Response type list, click the name of response to provide when a user enters a command.
- In the Response command field, enter or modify a user command for the custom response.
- 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.
- Optional:
If you selected a menu response type, to add a command item to display as a menu:
- To add a command item, click + Add response.
- In the Menu item list, click the menu command name.
- In the Label field, enter a label for the menu command item.
- To add another command item to display as a menu, repeat steps a to c.
- Optional:
If you selected a link response type, to link an account, complete the following steps:
- In the Title field, enter a title for the link account.
- In the Authentication callback URL field, enter the name authentication URL to the account to be linked.
- Optional:
If you selected a custom response type, to add command items to display as a rich user
interface menu:
- Optional: If the response type requires authentication, for example when creating a case, select the Requires authentication check box.
- Click Submit.
- Click Save.