Integrating with Facebook Messenger
IBM Cloud
Facebook Messenger is a messaging application that helps businesses and customers communicate directly with one another.
After you create an action, you can integrate your assistant with Facebook Messenger.
Currently, no method exists to identify or delete data that is associated with a specific user who interacts with the assistant through Facebook Messenger. Do not use this integration method for deployments that must be compliant with the General Data Protection Regulation (GDPR).
Before you begin
To integrate your assistant with Facebook, you must have the Admin
role on Facebook's Meta App Development. For more information, see Meta App Development.
To integrate your assistant with Facebook, do the following steps:
-
Go to the Integrations page by clicking the integrations icon () in the left menu.
-
Click Add on the Facebook Messenger tile.
-
Click Confirm.
-
Follow the instructions that are provided on the screen to complete the integration process.
When a field that is required for authentication is changed, all entries in the related fields must be filled and validated again.
Action considerations
The rich responses that you add to the action are displayed in a Facebook app as expected, with the following exceptions:
-
Connect to live agent: This response type is ignored.
-
Image: This response type embeds an image in the response. A title and description are not displayed before the image, whether or not you specify them.
-
Option: This response type shows a list of options that the user can choose from.
- A description is not displayed, whether you specify one or not.
- After a user clicks one of the buttons, the button choices disappear and are replaced by the user input that is generated by the user's choice. If the assistant or the user enters new input, then the button-generated input disappears. Therefore, if you include multiple response types in a single response, position the option response type last. Otherwise, content from subsequent responses, such as text from a text response type, will replace the button-generated text.
- The title is automatically taken from the text of the relevant step of the action where options are listed.
Chatting with the assistant
To start a chat with the assistant, complete the following steps:
- Open Facebook Messenger.
- Type the name of the page you created earlier.
- After the page comes up, click it, and then start chatting with the assistant.
The welcome action is not processed by the Facebook Messenger integration. The welcome message is not displayed in Facebook Messenger like it is in the assistant preview. It is not triggered from here because nodes with the welcome
special condition are skipped in action flows that are started by users. Facebook Messenger waits for the user to initiate the conversation.
The action flow for the current session is restarted after 60 minutes of inactivity (5 minutes for Lite and Standard plans). This means that if a user stops interacting with the assistant, after 60 (or 5) minutes, any context variable values that were set during the previous conversation are set to null or back to their default values.
Only the page administrator can interact with the Facebook Messenger chatbot until Facebook approves it. After Facebook approves it, any page visitor can interact with it.