Add-on | AI agents - Advanced |
Facebook Workplace is a communication tool created by Meta which connects everyone in a company. Clients can use familiar features like Groups, Chats, Rooms and Live video broadcasting to get people talking and working together.
We have established a new integration that allows to connect with Workplace via our existing Facebook integration and gather user information to increase automation and create a more personalised user experience.
This guide explains how to integrate AI agents - Advanced with Workplace and collect visitor information automatically to streamline the flow and create a customized experience.
This is an internal document but can be adapted for external use. Currently the Get Visitor Info action must be configured using the JSON by the Customer Success Manager.
Step 1: Create Custom Integration in Workplace
-
Login to Workplace
-
Go to Admin Panel > Integrations
-
Click on Create Custom Integration
-
Add a Name (e.g. AI agents - Advanced)
-
Add a Description (e.g. custom integration with AI agents - Advanced and Workplace)
-
Click Create, and a new integration will appear in Custom Integrations
Step 2: Configure Custom Integration in Workplace
-
Click on the new custom integration
-
Click Create Access Token and save the token for a later step
-
Select relevant Integration permissions - we recommend selecting all but this can be adjusted based on the clients requirements
-
Scroll down to Configure webhooks and enter the following information:
-
Callback URL: https://chat.ultimate.ai/api/facebook
-
Verify token: BotID (this is available in the AI agents - Advanced dashboard)
-
Select: message_deliveries , messages, messaging_postbacks and message_reads
-
-
Complete Step 3 before clicking Save
Step 3: Configure Integration in AI agents - Advanced Dashboard
-
Open a new tab and login to the AI agents - Advanced dashboard
-
Go to Settings > Chat Platforms
-
Click + Add Integration and select Facebook from the drop-down
-
Click Integration Parameters and enter the following information:
-
Page ID: enter the Facebook Page ID (see Troubleshooting section below if unknown)
-
Page Token: Access Token created in step 2 above
-
Select: Is a Workplace
-
-
Click Save
-
Enable Automation Engine
The automation engine must be enabled to save the custom integration settings in step 2 because a connection needs to be established. After saving the custom integration in Workplace you can disable automation again if you wish.
Step 4: Create Actions in AI agents - Advanced Dashboard
-
Go to Settings > Actions or create content actions
-
Click the three dots and click JSON View and add the following script as required:
[
{
"action": {
"data": {
"visitorInfoType": "organization",
"saveAs": "organization"
},
"name": "getVisitorInfo",
"target": "facebook"
}
},
{
"action": {
"data": {
"visitorInfoType": "title",
"saveAs": "title"
},
"name": "getVisitorInfo",
"target": "facebook"
}
},
{
"action": {
"data": {
"visitorInfoType": "employee_number",
"saveAs": "title"
},
"name": "getVisitorInfo",
"target": "facebook"
}
},
{
"action": {
"data": {
"visitorInfoType": "external_id",
"saveAs": "name"
},
"name": "getVisitorInfo",
"target": "facebook"
}
}
]
Troubleshooting
-
The Facebook Page ID can be found in Workplace by clicking on Chats on the side panel, search for the custom integration created previously and start a conversation. Here you will find the Page ID at the end of the URL: https://ultimate212.workplace.com/chat/t/xxxxxxxxxxxxxxxx
0 comments