
Prerequisites
- A Facebook account.
- Access to Facebook (Meta) Messenger.
- Access to the Facebook (Meta) Developer Center.
Generic endpoint settings
Override snapshot connections
If you activate the Override Snapshot Connections toggle, the endpoint overrides the connections in the snapshot with connections from the project. If only the snapshot has a connection, the connection isn’t overridden. If necessary, you need to update such connections manually. To override the connection of the agent in production, you can:- Make the necessary changes in a staging environment, create a snapshot of the same agent, and select the snapshot in the endpoint settings. Deactivate the Override Snapshot Connections toggle.
- Import connections from another agent using a package. Activate the Override Snapshot Connections toggle.
Mocking
In the Advanced Settings section, you can toggle on the Enable Mocking setting to activate mocking for the endpoint. Mocking lets you change node behaviors and test how they perform through the endpoint without changing the original node settings. Make sure that you also activate mocking at the node level.Additional endpoint settings
You can use the following additional settings to customize the endpoint:- NLU connectors
- Data protection & analytics
- Transformer functions
- Real-time translation
- Session management
- Copilot
- Inject and Notify
Endpoint-specific settings
How to set up
1. Create a Facebook page and a Facebook app
1. Create a Facebook page and a Facebook app
- Log in to your Facebook account. Go to the Pages section.
- Click Create New Page, select a type (Business or Community), and provide a name and category.
- Go to the Facebook (Meta) Developer Center.
- Click Manage Apps, then Add a New App.
- Fill in the required details to complete the app creation.
- In your app’s product overview, locate Messenger and click Set Up.
2. Generate a page access token
2. Generate a page access token
- Go to Messenger > Access Tokens. Add the Facebook Page created earlier.
- Click Generate Token, acknowledge the warning, and copy the token.
3. Create a Messenger endpoint
3. Create a Messenger endpoint
- In the left-side menu of the Cognigy Project, go to Deploy > Endpoints.
- On the Endpoints page, click + New Endpoint.
- In the New Endpoint section, do the following:
- Select the Messenger Endpoint type.
- Add a unique name.
- Select a relevant Flow from the list.
- Open the Facebook Page Setup section. Paste the Page Access Token from the Facebook App.
- (Optional) Enter your App ID and App Secret for additional security.
- Copy the Endpoint URL for later use.
4. Configure webhooks
4. Configure webhooks
- Go to the Facebook app. Under Messenger > Webhooks, click Add Callback URL.
- Paste the Endpoint URL as the callback URL.
- Enter the Verify Token from Cognigy:
- For
https://trial.cognigy.ai, use the token6a1ed94ef26462d1a529ab80afabe135e5ac7cc8b414ef762e1208f3339f887196d3433c996c0f30ea15295fbd86293cd7516abaa9b9e78d641ebb514eea32b4. - For other environments, contact Cognigy technical support for more information.
- For
- Click Verify and Save.
- Add Subscription Fields: select
messages,messaging_postbacks, and optionallymessaging_referrals. Save the settings.