I've successfully setup a DialogFlow bot which integrates with Facebook Messenger.
Is it possible for a human user to log into the Facebook Messenger inbox and take manual control over the conversation?
When I log into the Facebook Messenger inbox I've been unable to stop the bot from replying to the user and as a result it ends up being a 3 way conversation between me, the user and the bot.
This usecases makes sense but is not well documented. Facebook mentions this in the handover protocol documentation:
Taking Thread Control From Facebook Page Inbox
For Messenger experiences that enable live chat via Facebook Page Inbox, the handover protocol allows the Page admin to manually initiate a take thread control event by moving the conversation from 'Done' to the 'Inbox'. It is important to note that the thread would immediately be passed to Facebook Page Inbox irrespective of the current app’s role.
I guess this is what you need.
What you need to do is this:
Find the conversation you want to manual control
Check 'Move to Done'
FInd the conversation again by adding the 'done'-filter
Click the Move to Main button (the envelop in the top right
corner)
Remove the 'done' filter to find the conversation
from now on, the inbox has control and your chatbot will not respond if the user types a message. You will be the only one responding
If you need the chatbot to manage the conversation again, just click on the Move to Done-checkmark and the chatbot has control again.
Ps: the documentation also suggests you to subscribe to two webhooks (Standby and messaging-handovers). To be honest: for me it worked with and without subscribing to these webhooks
Related
Let's assume a user chats with another user in a 1:1 chat. (Might also be a group chat.) The user adds a bot and continues to chat while the bot now adds value to the conversation.
We are searching for a way to make adding the bot to a chat as seamless as possible through a simple button click. It seems the closest we can get to a button is using a messaging extension action command.
When the user invokes the messaging extension our backend service runs and can respond e.g. with a card. Now instead of a card is it possible to generate a response to add a bot? There are special responses e.g. for authentication. Is there a response telling the Teams client to add a bot?
Any hints are appreciated.
JIT installation of bot is an option here. You will be able to add bot to user conversation. Check following sample application which helps to add bot instantly: https://github.com/SubbaReddi/89.teams-just-in-time-installation
I follow the instruction provided by diaglogflow as the below, however, it did not work.
The "Get Started" button do pop up for my page's messenger, but click on it or say words in the default welcome message (I did set the intent as Facebook welcome) doesn't trigger any response.
Do I miss any setting?
Pic.1 Get started do appear but no response:
Steps provided by diaglogflow:
Get your Facebook Page Access Token and insert it in the field below.
Create your own Verify Token (can be any string).
Click 'START' below.
4.Use the Callback URL and Verify Token to create an event in the Facebook Messenger Webhook Setup.
Pic.2 Integration setting in dialogflow(left) and messenger setting in Facebook(right):
Pic. 3 Default welcome intent in diaglogflow and it's response(I had clicked the save button):
Pic4. Messenger set up for Webhook version
It seems you've configured the webhook for your app. Make sure you've subscribed your app to a Facebook Page.
Click 'Add or Remove Pages' and select the pages you want to
subscribe your app to. Your webhook will receive events for each
selected page when people chat with it through Messenger.
In the 'Access Tokens' section there will be a Generate Token button
for each authorized Page. Make sure to save the access token, it's
needed to send messages using the Send API.
For each authorizedPage, the 'Webhooks' section will contain the fields the
app can subscribe to. Click on "Add Subscriptions" to select desired fields.
At a minimum, we recommend you choose messages and messaging_postbacks to get started.
Don't forget to choose message_postbacks. If still you face the issue re-configure the webhook. In addition test your messenger response from dialogflow from right side try it --> hi/hello --> and click default response change it to messenger if you can see the expected message from response tab that means you are missing something from page integration. I am attaching a snapshot of checking messenger response from dialogflow:
official documentation
To add Tasnuva's answer, the subscription button is in the field of:
"messenger setting--> webhooks--> add/remove page right side button."
I was once confused by the add/remove page at the access page token field.
Click the button in the red square to edit it:
I am recently working on dialog flow bot (API.ai)
I have integrated my chatbot with slack from API.ai. When I start conversation and continue chatting, I found that bot username displayed in slack shown as Dialog flow Bot. But I have configured the name as treselle. How to change it?
Please find the screenshot below:
Yes! you can change it.
Go to your slack chatbot application.
Click on about tab.
enter image description here
Click on settings button.
Below "Bot user", select edit bot name button beside the bot name.
I'm not sure it's possible or at least I couldn't make it neither.
If you're a developer too, here is what you can do:
create a Slack app and bot, with enabled events subscriptions that will call your application webhook each time a message is sent to your bot
create a DialogFlow agent that you will call using 'query' API
create your own web application with a webhook route called by Slack, from which you can call DialogFlow API
This way you'll be able to customize every single details, including username, description, icon of the Slack bot, and send messages with rich content!
Here are more details: https://blog.eleven-labs.com/en/en/replace-erp-by-slack-bot-with-dialogflow-and-symfony/
I was wondering the same thing. Apparently you can't change the name of the bot until it is public. Here's a quote from the documentation...
Once logged in, navigate to the instance and locate the bot user called #dialogflow-bot.
Note: In order to change the name of the agent or add a logo, you'll need to make the bot public.
https://dialogflow.com/docs/integrations/slack
I know Dialogflow (Api.ai) can be a bot in Slack. But what about monitoring the conversation and possibly manually intervene in the conversation? If possible, what would be the general direction to implement this?
So Slack has Open APIs for interacting with the Slack App. Here
Since you want to monitor the conversations so Events APIs and Conversations APIs would help you to notify as well as capture the conversations.
conversations.history will help you to fetch the messages within public or private channels.
Since you want to intervene in the conversation then I suggest using chatbot, which will provide a suitable way to intervene and respond to some particular events. Bot Users
Dialogflow has an sample on how to do this: https://github.com/dialogflow/agent-human-handoff-nodejs
You'll have to build you own front end for the human to override the response and call the Dialogflow query API to integrate:
Slack <--> Front end w/human override <--> Dialogflow's query API <--> Dialogflow Agent
Yes, it's possible. Just login to DialogFlow with your Google credentials, then on the left sidebar you can see the Integrations Tab. Click on it. You will find a bunch of different integrations for line, telegram, Twilio, kik, Viber, Skype and a lot more.
Click on Slack. It will ask you for some details for connecting with endpoints such as client ID, token, client secret. You can get it from the Slack API. You can also check the Slack API integration link here. After everything is properly set up, click the "Test in Slack" button in the DialogFlow Slack integration.
My bot is running in perfect conditions when I use it trought funpage.
But what I want to know is if we can start the conversation with the user instead user with it.
For example: The user is on a page that his next interation is talk with my BOT. But i don´t want my clients start I want my bot starts.
At this case we can consider that user already authorized my app.
Not if this is their first messenger interaction with you.
When you message a user, you're sending a message to a user id that is page scoped.
So unless they've previously messaged your page, there's no way for you to get their id
The id must be an ID that was retrieved through the Messenger entry points or through the Messenger webhooks (e.g., a person may discover your business in Messenger and start a conversation from there.
These IDs are page-scoped IDs (PSID). This means that the IDs are unique for a given page.
If you have an existing Facebook Login integration, user IDs are app-scoped and will not work with the Messenger platform.
(see https://developers.facebook.com/docs/messenger-platform/send-api-reference)