Facebook Messenger Chatbot will let you inevitably offer consumers with immediate responses. It will help in streamlining the product purchase by offering specialized customized services.

Create an App 

To create an FB App, open "Developers.facebook.com", click on Get Started to register yourself. The following page appears:

Click on Register and create your first App. You will be navigated to the Create a New App ID page. In the Display Name box, type the name of the brand (for example Pizza Hut) that you want to be displayed and in the Contact Email box, provide the email id of the brand. Click on Create App ID. See figure below for better understanding:

On clicking Create App ID, the following Security page pops up for user validation. Insert the text and click on Submit. Your Brand ID is created.

Create an FB Page

It is imperative to create a personal Facebook profile before creating your FB page.The individual in that profile is the creator of the fan page. As a result, the subsequent Facebook business page doesn't have a separate login from that of the individual user who created it. 

From your Facebook profile page, click the Pages header in the left-side navigation. Next, click the Create a Page button, and select the type of page--Local Business or Place, for example, or Brand or Product. You'll see a number of fields to fill out, such as your business category, name, and address.See figure below:

Once ID is created, go to the App Dashboard and under Product Settings click Add Product and select Messenger. The following page appears:

Get a Page Access Token

A Page Access Token is based on an app, page, and user and has a scope associated with it. In the developer app, go to the Messenger tab. Select your page and generate a token. This will generate a Page Access Token, Copy this token which is required to create an account in the organization. Save this token as it will be used throughout your integration. You must be an admin on the page in order to generate a valid page access token. See figure below:

Create FaceBook Account in the Org

To create a FaceBook account in an org, log in to the InTouch Settings page and click on Omnichannel Settings>Channel Configurations in the left panel as shown below:

Next, click on one of the Channel List and then on +Add Account. Enter the required details in the fields and click Submit. See figures below for clarity:

Find below the description:

Name
Description         
Account Name  
Brand Name
Source Account Id           
Any random name
App Secret          
App ID that is generated while creating Facebook App
Validation Token             
Token used when creating a Facebook account in the org
Auth Consumer Key       
It is a key that authenticates a particular customer
Secret Key          
Martjack
Website URL     
The store URL
Help Actions      
End user help actions are configured example Coupons
Operator Password         
Martjack
API URL                
http://www3.martjack.com/DeveloperAPI/
Email To Which Feedback Is Sent             
Any feedback that is sent to the registered email id of the store
Enable Mirror    
Martjack
Page Access Token          
Unique ID for a page
Page Id 
Facebook Page ID that is created
Signature Method           
Martjack
Merchant Id       
Martjack
Location Id          
Either Id of the store location or could it be -1(if store has multiple locations)
Transactions      
MARTJACK 
Operator ID        
Martjack
Is Login Required For Feedback 
Not required 
Email From Which Feedback Is Sent

Setup a Webhook

Webhooks are used to send you a variety of different events including messages, authentication events and callback events from messages.Click on Setup Webhook.The following page appears:

In the New Page Subscription(see above) enter the Callback URL, Verify Token and select the message's checkbox under Subscription Fields

  • Callback URL is the path where chatbot webhook is established
  • Verify Token is the token that was used when creating a Facebook account in the org.

Click Verify and Save.

Sub scribe Webhook to FaceBook Page

In the Settings page, select a page to subscribe to your webhook