Configure the Virtual Agent
integration for Facebook Messenger and
associate the app with your instance.
Before you begin
You should already have the following:
Roles required:
- virtual_agent_admin and external_app_install_admin or admin
- Administrator for third-party applications
Procedure
-
In Facebook developer, navigate to .
-
Locate the Token Generation section.
-
From the page list, select the Facebook page you created and make note
of the Page Access Token that is generated.
-
Locate the Webhooks section and click Setup
Webhooks.
-
On the New Page Subscription pop-up window that displays, enter these
fields:
| Field |
Value |
| Callback URL |
Your ServiceNow instance URL followed by
/api/now/v1/cs/adapter/messenger/message |
| Verify Token |
nowbot |
| Subscription Fields |
Select messages and
messaging_postbacks |
-
Click Verify and Save.
-
In your ServiceNow
instance, enter hash_message_verification.list in the
Filter navigator.
-
In the Hash Message Verifications form, click
New to create a new record.
-
Enter these fields:
| Field |
Value |
| Name |
Name that helps to identify this record. This
field may default to
sample-fb-messenger-inbound-app-token
but this default can be changed. |
| Description |
Description for the record |
| Secret |
App secret of your Facebook Messenger app (the secret was generated when you created
the app) |
-
Click Submit.
-
In your ServiceNow
instance, enter token_verification.list in the Filter
navigator.
-
In the Token Verifications form, click New to
create a new record.
-
Enter these fields:
| Field |
Value |
| Name |
Name that helps to identify this record. This
field may default to
sample-fb-messenger-outbound-app-token
but this default can be changed. |
| Description |
Description for the record |
| Token |
Page access token of your Facebook Messenger app (from step 1b of this procedure) |
-
Click Submit.
-
In your ServiceNow
instance, enter message_auth.list in the Filter
navigator.
-
In the Message Auth page, click New to create a
new record.
-
Enter these fields:
| Field |
Value |
| Name |
Name that helps to identify this record. This
field may default to
sample-fb-messenger-app but
this default can be changed. |
| Provider |
Name of the provider |
| Inbound message verification |
Name specified on the Hash Message Verifications
form (this token verifies if the request is actually
from the provider) |
| Outbound message creation |
Name specified on the Token Verification form
(this token interacts with the provider on behalf of
the user) |
-
Click Submit.
-
In your ServiceNow
instance, enter
sys_cs_adapter_configuration_page_messenger.list in
the Filter navigator.
-
In the Facebook Messenger Adapter Configuration Page, click
New to create a new record.
-
Enter these fields:
| Field |
Value |
| App Type |
Defaults to Facebook Messenger and cannot be
changed |
| Messenger Page ID |
Your page ID (the page ID can be found in the URL
of the Facebook page) |
| Name |
Name that helps to identify this record. This
field may default to
sample-fb-messenger-app but
this default can be changed. |
| Provider Auth |
Name specified on the Message Auth page |
-
Click Submit.
-
Configure whether users should be prompted to link their profile to their ServiceNow profile.
-
In the Navigation filter, enter
sys_properties.list.
-
Navigate to and click
va.messenger.account.auth.
-
In the Value field, enter
true or false.
| true |
Prompt users to link their account to their ServiceNow profile. Users who
link their account to their ServiceNow profile can access
all topics and also chat with a live agent. Users
who do not link their account can access only guest
topics. |
| false |
Do not prompt users to link their account to
their ServiceNow profile.
Users can access only guest topics but can still
chat with a live agent. |
-
Click Update.