User Guide
API DOCSVOICE GATEWAYHELPSECURITY
Current Version
Current Version
  • Welcome
  • What's New
  • 🚀GETTING STARTED
    • Login
    • Concepts and Glossary
    • Language Models
      • Syntphony NLP
      • Other NLP and LLM Connectors
      • FAQs
    • Build a Virtual Agent
      • Overview
      • From Scratch
      • By Importing
      • Pre-Built Templates
      • Training task
    • Testing
      • Automated Test
      • Advanced Request
      • Simulate Dialog
      • View Logs
    • Create and manage profiles
  • 💬BUILD DIALOGS
    • Flows
    • Dialog Cells
      • Intent
      • Entity
      • Answer
      • Input
      • Jump
      • End
      • Service
      • Rest Connector
      • Code
      • Rule
        • Variable answers using Code and Rule cells
        • Enable and disable flows using Rule Cells
    • Data Masking of Personal Identificable Information
    • Dynamic Content and Contexts
    • Voice Agent
    • Multilingual Agent (beta)
  • ✨GENERATIVE AI
    • AI features
    • Assist Answer (beta)
    • Examples Generator
    • Knowledge AI
    • Prompt cell
      • Prompt crafting
      • Practical examples
    • Rephrase Answer
    • Zero-Shot LLM
  • 🌐CHANNELS
    • Channels
      • WhatsApp (by Infobip)
      • Facebook Messenger
      • Microsoft Teams
      • Integrating Existing Channels
    • Webchat Plugin
  • ⚙️CONFIGURATIONS
    • Parameters
    • Advanced Resources
    • Other Options
      • Intent Navigator
  • 📊ANALYTICS & INSIGHTS
    • Dashboards
      • Overview
      • Funnel charts
      • User messages
      • Conversations
      • Reports
    • External Analytics Platforms
  • API DOCS
    • Overview
    • API Guidelines
      • Conversation API
      • Cloner API
      • EVG Connector
      • Management API
        • Admin API
          • Bot Admin
          • Environment
          • Organization
          • User
          • Notification
        • Instance API
          • Knowledge AI
          • Knowledge AI NLP
          • Answer
          • Automated Tests
          • Bot
          • Broker
          • Channel
          • Dashboard
          • Dialog Manager
          • Entity
          • Generative Service
          • Intent
          • Parameters
          • Tag
          • Technical Log
          • Training
          • Transactional Service
          • Rest Connector
          • Wait Input
          • Websnippet
      • Webhooks
    • Infrastructure Guidelines
      • Syntphony CAI server Installation guide
      • Maintenance Methods
      • Supported/verified third-party software
    • Data Structure
      • Admin Data Structure
      • Environment Data Structure
    • Voice Gateway
      • Genesys Cloud CX
Powered by GitBook
On this page

Was this helpful?

  1. CHANNELS
  2. Channels

Facebook Messenger

With Syntphony Conversational AI we can integrate with Facebook Messenger

PreviousWhatsApp (by Infobip)NextMicrosoft Teams

Last updated 8 months ago

Was this helpful?

To configure the Messenger connector, you must access the and have access to Syntphony CAI’s MySQL database. Then, execute the following steps.

1. Create your Facebook App

In the Facebook for Developers console, create a new App or use an existing one of your choice.

2. Add Messenger configuration

In the App Home, click on the Set Up button in the Messenger box.

If this box does not appear to you, click on the plus button besides the PRODUCTS label in the left menu.

3. Get your Facebook Page ID and Name

In Facebook, access the page in which you want to enable the messenger chat and copy the Page ID and Page Name. This information will be used in the next step.

The Page ID can be found in the URL after you access your page. For example:

https://www.facebook.com/MyFacebookPage-105498651278284/?modal=admin_todo_tour&ref=admin_to_do_step_controller

The Page ID above is 105498651278284.

The Page Name is the same that appears on the screen.

4. Select the channel and configure a token in Syntphony CAI

Open your virtual's agent channels menu, and find the channel you want to integrate with. This channel's UUID will be listed there. This will be used it in the next SQL command.

Choose a security token. This can be any sentence to be used on both Syntphony CAI and Facebook to check that your Facebook Developer App and Syntphony CAI instance are yours. For example, a token could be simply “syntphony-facebook-security-token”.

Now, execute the following command replacing the values:

insert into
    facebook_configuration (page_id, page_name, hub_token, page_access_token, channel_uuid)
values
   (
       < PAGE_ID > , '<PAGE_NAME>,' < TOKEN > ','', < CHANNEL_UUID > 
   )
;

5. Configure Webhook

On Facebook for Developers console, go to the Messenger > Settings menu (if you clicked on the “Set Up” button before, you should be on this page already) and click on the “Add Callback URL” in the Webhooks box.

URL field
Value

orgUUID

Your organization's UUID, found on your Virtual Agent's URL.

envUUID

UUID of the environment your bot is in, found on your Virtual Agent's URL.

botUUID

UUID of the bot your channel is in, found on your Virtual Agent's URL.

channelUUID

UUID of the channel to be used by facebook, found in your channel list within your Virtual Agent's left menu.

DEPRECATED: The following URL still works but is deprecated and will be removed in a future release:

https://[YOUR_SERVICE].eva.bot/eva-facebook/org/{orgUuid}/env/{envUuid}/bot/{botUuid}/fb/webhook

New URL: https://[YOUR_SERVICE].eva.bot/eva-facebook/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/channel/{channelUUID}/v1/conversations

In the Verify Token field, put the same token created before and click on the Verify and Save button.

This step configures how Facebook will call Syntphony CAI.

6. Select a Facebook Page

In the Webhooks box, click the Add or Remove Pages button and select which page you want to use. You will have to give the Facebook for Developers permission to access your account for this step to work.

A table will appear with the columns Pages and Webhooks. Click on the Add Subscriptions button and select the messages and messages_postbacks options.

Save it.

On the Access Tokens box, click the Generate Token button for your page and copy the token, it will be used to update the facebook_configuration table.

7. Configure the page token in Syntphony CAI

The final step for configuring the integration is to update the database with the page token. Execute the command below in your MySQL database replacing the page token and page id.

  update
   facebook_configuration 
set
   page_access_token = '<PAGE_TOKEN>' 
where
   channel_uuid= '<CHANNEL_UUID>';

8. Test it!

To test your virtual agent, enable the chat button in the Facebook Page by clicking the “Add button” on the top right and select the “Send message” option. You are now ready to test your virtual agent.

Important:

This manual shows how to integrate a virtual agent with Facebook in development mode. This will not make it available to all Facebook users. To set a virtual agent to production mode, you still have to follow Facebook compliance rules and submit it for evaluation.

🌐
Facebook for Developers console
The callback URL must match the most recent standard of https://[YOUR_SERVICE].eva.bot/eva-facebook/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/channel/{channelUUID}/v1/conversations