Facebook Messenger App Config
Facebook Messenger is an instant messaging app for communicating on the go. Using it for incident creation and management will become easier if you integrate ServiceOps Virtual Agent within Facebook Messenger. Once added, you can generate or review requests from Facebook Messenger without signing-in to the ServiceOps Support Portal or accessing the chat agent from the portal.
What is a Virtual Agent?
A Virtual Agent is a bot that works based on the chat flows configured in ServiceOps. Using this, you can create and manage both incident and service requests. You can integrate a custom-built Facebook Messenger app that connects with your ServiceOps Portal, enabling the Virtual Agent to send responses to the requester over it.
Applicable Version
This functionality is applicable from version 7.9 onwards.
Prerequisites
- ServiceOps hosted on a public URL.
- SSL Certificate enabled.
- Chat functionality enabled.
- The Base URL in ServiceOps should be the same as the portal URL.
- Facebook account created.
- Once the app is created, submit it for App Review. For more details, refer to the Submission guide page.
Configuring the Facebook Messenger Virtual Agent
To create a Facebook Messenger Virtual Agent, follow the below steps:
Step 1: Create a Facebook Business account.
Step 2: Login to the account, click Get Started, and register on the Meta for Developers page.
Click Continue.
Step 3: Verify your account, a code will be sent to your number, enter it, and click Continue.
Step 4: In the Contact Info tab, enter your primary email address, and click Confirm Email.
Step 5: In the About you tab, select the role as Developer, and click Complete Registration. The Developers account gets created.
Step 6: On the following page, create an application using the Create App button.
Step 7: In the Business Portfolio tab, select "I don't want to connect a business portfolio yet" option, and click Next.
Step 8: Add use case by selecting Other option and clicking Next.
Step 9: Create a business app by selecting the App Type as Business and clicking Next.
Step 10: Enter the basic details like the App name, App contact email, and click Create app.
Step 11: Re-enter the password of your account and click Submit.
The app gets created, and its details page appears.
Step 12: On the left-side menu, click the Add Product link, select the Messenger App from the list, and click Set up.
Step 13: In the menu, navigate to Messenger > Messenger API Settings and the below page appears. If there are no FB pages available, first create them.
Step 14: To create a FB page, go to your Facebook account, click the Options button, and select Page.
The Create Page appears. Enter the following details:
- Page Name: Name of the page.
- Category: Select the category from the list.
- Bio(Optional): Enter a short description of the page. Once done, click Create Page.
Step 15: Set up the page by entering the required additional optional details and clicking Done. Similarly, you can create multiple pages if you wish to link them with ServiceOps.
Once the page(s) are created, return to Meta for Developers page. In the Generate Access Tokens section, click Connect, and the below popup appears.
Step 16: Select the pages that you want to access, review, and Save.
Step 17: Next, generate the token for the created page(s) by clicking the Generate button next to the required page(s).
Step 18: Select the "I Understand" flag, copy the generated token, and click Done. You need to paste this token in Callback URL and the ServiceOps Portal (Client ID).
Step 19: In the Configure webhooks section, click Configure.
The Edit Callback URL popup appears. Enter the following:
Callback URL: Enter the URL of the ServiceOps Portal using the below format.
Verify Token: Use the token entered in the Verify Token field of ServiceOps Messenger Settings.
Once done, click Verify and Save.
Step 20: Add Webhook Field by clicking the Manage button.
Step 21: In the Webhook fields popup, search for messages and subscribe it.
Step 22: Next, in the Generate access token section, click Add Subscriptions, select messages option, and click Confirm for all the created pages.
Step 23: In the Complete App Review section, click Request Permission to request the “pages_messaging” permission.
Step 24: Once done, submit your app for review. Before submitting, fulfill the required prerequisites. For more details, refer to the Submission guide page.
To submit the app, you need to provide a sample video, and a short description explaining the purpose of the app. For example, here is a sample description and video.
We are excited to introduce an enhanced level of access to our services through the Messenger platform. We are seeking advanced permissions, specifically the pages_messaging access, to empower our facebook users to seamlessly interact with our server by creating support tickets via Messenger.
By granting this access, facebook users will be able to initiate conversations with our dedicated chatbot simply by sending a message to our page. This chatbot will serve as a helpful guide, assisting them in various tasks related to our services, ensuring a smoother and more efficient experience for our facebook users.
Please note that for this system to work effectively, users engaging with us through Messenger should have an active account within our server. In cases where a user does not have an account registered with us, we will create new Guest User In our server.
We appreciate your understanding, and we look forward to providing an even more accessible and user-friendly experience for our valued facebook users.
Note: We don't need facebook login to create Users as we allow to create Guest Users with minimal permission in our System, to Create Tickets.
Step 25: In the App Review > Permissions and Features tab, search for the pages_messaging permission and request for the Advanced Access.
Step 26: In the ServiceOps Portal, navigate to the Admin > Support Channel > Virtual Agent > Facebook Messenger App Config tab.
Here, you can link multiple Facebook Messenger pages to a single ServiceOps instance. This allows for managing and responding to requests from multiple sources (pages) within a single interface.
To add a page in ServiceOps, follow the below steps:
- Click Add Messenger Page, and the following popup appears.
- Enable the functionality and provide the below details:
- Name: Name of the page.
- Client ID: Paste the token generated from the Meta for Developers account (Step 16).
- Page ID: Paste the Page ID copied from the Generate Access Tokens section of Meta for Developers account.
- Once done, click Add. The page will get added. Similarly, you add more pages.
- Next, in the Messenger Settings, set the verification token in the Verify Token field. This token is used to establish a connection between the Facebook and ServiceOps. The token can be any text or combination of text and numbers. For example: Hello. Use this same token in the Verify token field while editing the Webhook Callback URL (Step 17).
Step 27: Next, open your Facebook Messenger and search for the ServiceOps Virtual Agent. The chat page appears. Guest users can also use the Facebook Messenger to raise their requests. In the beginning it prompts to select the email id or contact no. option using which the communication can take place with ServiceOps.
Once selected, you can begin your conversation by selecting the options or typing the desired question.