IBM Cloud Docs
Integrating with Facebook Messenger

Documentation for the classic Watson Assistant experience has moved. For the most up-to-date version, see Integrating with Facebook Messenger.

Integrating with Facebook Messenger

Facebook Messenger is a mobile messaging application that helps businesses and customers communicate directly with one another.

After you configure a dialog skill and add it to an assistant, you can integrate the assistant with Facebook Messenger.

There is currently no mechanism for identifying users who interact with the assistant through Facebook Messenger, which means that is no way to identify or delete data associated with a specific user. Do not use this integration method for deployments that must be GDPR compliant. See Information security for more details.

  1. From the Assistants page, click to open the assistant tile that you want to deploy.

  2. From the Integrations section, click Add integration.

  3. Click Facebook Messenger.

  4. Follow the instructions that are provided on the screen to complete the integration process.

Dialog considerations

The rich responses that you add to the dialog are displayed in a Facebook app as expected, with the following exceptions:

  • Connect to human 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.

  • Audio: This response type embeds audio from various file formats in the response. A title and description are not displayed, whether or not you specify them.

  • Video: This response type embeds a native video from various file formats in the response. A title and description are not displayed, whether or not you specify them.

  • iframe: This response type inserts an embeddable third-party link in the response that displays interactive content (such as forms or maps). A title is displayed in the preview card. A description is not displayed, whether or not you specify it.

  • Option: This response type shows a list of options that the user can choose from.

    • A title is required and is displayed before the list of options.
    • 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.
  • Pause: This response type pauses the assistant's activity in the Messenger. However, activity does not resume after the pause unless another response type is triggered after it. Whenever you include this response type, add another, different response type, such as a text response, and position it after this one.

See Rich responses for more information about response types.

Chatting with the assistant

To start a chat with the assistant, complete the following steps:

  1. Open Facebook Messenger.
  2. Type the name of the page you created earlier.
  3. After the page comes up, click it, and then start chatting with the assistant.

The Welcome node of your dialog is not processed by the Facebook Messenger integration. The welcome message is not displayed in the Facebook chat like it is in the "Try it out" pane or in the assistant preview. It is not triggered from here because nodes with the welcome special condition are skipped in dialog flows that are started by users. Facebook Messenger waits for the user to initiate the conversation. For more information about how to set context variable values consistently at the start of a conversation, see Starting the dialog.

You can upload media files or even documents to the chat. Files shared in the chat can be intercepted and processed by a configured premessage webhook. For more details, see Processing input attachments.