Adding the Facebook Messenger Channel¶
To add the Facebook Messenger channel to your Virtual Assistant, you need a Facebook Developer account. With this account, you can configure the connection between Facebook Messenger and Kore.ai. Enabling the Facebook Messenger Channel on the Bot Builder helps your users chat with the Virtual Assistant using their Facebook accounts.
The steps to enable this channel are simple and summarized below:
- Create and set up a Facebook Messenger App.
- Configure the Webhook or Callback URL to send and receive messages.
- Subscribe to the app on the Facebook page using the Client ID and Client Secret.
- Submit the App for Approval.
- Enable the channel and complete the configuration on the Kore.ai XO Platform.
Step 1: Create and Set up a Facebook Messenger App¶
-
Log in to the Facebook Developer Portal and click the My Apps top menu option.
Note
New users should register on the Facebook Developer Portal. Learn more.
-
In the Select an App Type window, select the Business tab, and click Next.
-
In the Details section, enter the required details, and click Create App.
-
Provide your account password in the Please re-enter your password window when prompted, and click Submit.
- Your App is now created and you are redirected to the Add products to your app page.
-
You now need to associate a page with the app. If you do not have a page, click Create New Page in the Access Tokens panel.
-
Click Add or Remove Pages and follow the instructions to add your page.
-
In the Token Generated window, select I understand and click Copy to copy the page Access Token.
-
Click Done.
-
On the Kore.ai XO Platform, navigate to Channels & Flows > Channels > Digital > All > Facebook Messenger.
-
Click the Configurations tab, and paste the Page Access Token and Page ID values you’ve copied.
-
Navigate to Settings > Basic and configure the Privacy Policy URL and Terms of Service URL fields for the app.
-
Click Save Changes.
- Enable the deployment of the app by changing App Mode: Development to Live.
Step 2: Configure the Webhook/Callback URL¶
To set up the webhook URL, follow the steps below:
-
Copy the Webhook URL and Verify Token from the Kore.ai XO Platform’s channel configuration panel.
-
On the Messenger Settings page of the Facebook Developer Portal, click Add Callback URL.
-
Paste the copied values in the Edit Callback URL window, and click Verify and Save.
-
The webhook URL is successfully set up.
-
Select messages, messaging_postbacks, messaging_optins, message_deliveries, and message_reads in the Edit Page Subscriptions window to select the webhook services.
-
Click Save.
Step 3: Set up App ID and Secret¶
To configure the Client ID and Client Secret for the app, follow the steps below:
- On the Facebook Messenger Developer Portal, navigate to Settings > Basic.
-
On the Kore.ai Bot Builder, navigate to the Configurations section of the Facebook Messenger channel and paste these values in their respective fields.
Step 4: Submit the App for Approval¶
Configure any other settings that Facebook might require, then submit the app for approval. Learn more.
Once approved, you can enable the Facebook Messenger channel for your assistant with the steps mentioned below.
Step 5: Enable the Channel¶
On the Kore.ai XO Platform, enable the Facebook Messenger channel to complete the integration. To enable follow the steps below:
- Navigate to Channels & Flows > Channels > Digital > All > Facebook Messenger.
-
Click the Configurations tab, and select YES for Enable Channel.
-
Click Save.
After enabling the channel and verifying all the configurations, you can optionally publish the assistant for the new channel. Learn more about Publishing your Virtual Assistant.
To learn more about working with Channels within the Kore.ai XO Platform, please see Channel Enablement.