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:
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.
- In the My Apps section, click Create App.
- 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.
- Click Set Up on the Messenger tab.
- 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.
- Click Generate Token.
- In the Token Generated window, select I understand and click Copy to copy the page Access Token.
- Click Done.
- Copy the Page ID of the Facebook page.
- On the Kore.ai XO Platform, navigate to Deploy > Channels > 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.
- Click Add Subscriptions.
- 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.
- Copy the App ID and App Secret values.
- 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 Deploy > Channels > Facebook Messenger.
- Click the Configurations tab, and select YES for Enable Channel.
- Click Save.
After the channel is enabled and all configurations are verified, you can optionally publish the assistant to make it available for end-users, with the new channel. Learn more.
To learn more about adding other Channels to your Bot, please see Channel Enablement.