copyright | lastupdated | subcollection | ||
---|---|---|---|---|
|
2021-02-22 |
assistant |
{:shortdesc: .shortdesc} {:new_window: target="_blank"} {:deprecated: .deprecated} {:important: .important} {:note: .note} {:tip: .tip} {:pre: .pre} {:codeblock: .codeblock} {:screen: .screen} {:javascript: .ph data-hd-programlang='javascript'} {:java: .ph data-hd-programlang='java'} {:python: .ph data-hd-programlang='python'} {:swift: .ph data-hd-programlang='swift'} {:video: .video}
{: #deploy-facebook}
Facebook Messenger is a mobile messaging application that helps businesses and customers communicate directly with one another. {: shortdesc}
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. {: important}
-
From the Assistants page, click to open the assistant tile that you want to deploy.
-
From the Integrations section, click Add integration.
-
Click Facebook Messenger.
-
Follow the instructions that are provided on the screen to complete the integration process.
If you want to follow along as someone else walks through the deployment steps, watch this 8-minute video.
{: video output="iframe" id="youtubeplayer" frameborder="0" width="560" height="315" webkitallowfullscreen mozallowfullscreen allowfullscreen}
To read a transcript of the video, open the video on YouTube.com, click the More actions icon, and then choose Open transcript.
{: #deploy-facebook-dialog}
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.
-
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.
{: #deploy-facebook-try}
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 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 preview integration. 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.
{: note}
The dialog 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.