We are developing a chatbot to work with facebook messenger. We have 1 human agent to solve what the bot can't solve.
Sometimes, when the bot is interacting with with customer, the human agent reads and replies to customer, the bot has no way to detect if the customer's message is replied or not to stop send its messages.
How can i implements the bot realize customer's message is replied or not?
Thanks
There are basically two ways how to implement it:
Listen to message echos Facebook Messenger API will send you a message echo webhook whenever any message is sent to a user. So you could listen to all echo messages and match them with those you sent from chatbot. If some echo message doesn't match then someone else jumped into the conversation. Then you can stop the chatbot and let the human agent respond. Don't forget to turn on the chatbot after some timeout.
Handover protocol Facebook has implemented its own handover protocol which deals with this problem. It's not my favourite as it's quite complicated and has certain drawbacks.