Init message from the bot in aiml - chatbot

I'm programming a bot in aiml using programAB and I wonder if there is anyway to make the bot start the conversation,like 'Hello, how are you?', not just waiting for the human to say anything.

You can send a message to the bot first in the code then take the answer of the bot show it and start the chat.

Related

Is is possible to create a custom messenger bot on Facebook?

I would like to know that we are having a lead generation campaign running on Facebook but few of the times our staff isn't available to answer the query on Facebook messenger, so based on that short-coming I am thinking to devise a mechanism that "If within 1 hour of user's message no one replies to him then an automated BOT message should get sent to him."
Please don't deprecate this question as it is based entirely on knowledge. And if perhaps someone has hints or links on how to achieve this thing then I will really appreciate it.
Thanks.
Some options:
You can query your /conversations edge every X minutes to detect when there is a message from a user which has not been replied to, then you would send the automated message using Send API.
https://developers.facebook.com/docs/graph-api/reference/v10.0/conversation
https://developers.facebook.com/docs/messenger-platform/reference/send-api/
You can use webhook data for incoming messages to create a task that will run at received_time + 60 minutes, find the thread in your conversations edge based on PSID and then check if there has been a reply
Alternatively you can check out Handover Protocol which allows a Page to simultaneously use a Messenger Bot and Live chat agent to handle messaging
https://developers.facebook.com/docs/messenger-platform/handover-protocol/

Hangouts Chat bot to post timed message

I can see from this, that a bot can send a message in chat, and if supplied a thread ID that does not exist, will start a new thread and post there. I am wondering if there is a way, given the current REST API or any other compatible with Hangouts, to send a message to a room at a given time of day, rather than when the bot is called or interacted with.
I am working in NodeJS, deploying my project in the GCP.
My apologies for the ambiguity of my question, I am trying to wrap my mind around the GCP environment.
In the bots documentation there are described the three ways in which a bot can send a message to a room. Those are:
Every time the bot is mentioned.
When the bot enters a room for the first time.
When the bot is taken out of the room.
Unfortunately, none of them is a daily message at a given time. If you still have questions, please ask them freely.
We have a working bot (NodeJS based) which sends messages freely. Just use this endpoint https://developers.google.com/hangouts/chat/reference/rest/v1/spaces.messages/create .
Your bot must be invited to the particular space/room for this. You can create threads as well with new and subsequent messages.
We also have bots written in Google Apps Script and there it is also possible.

Facebook Messenger Bot - How to disable bot and allow human to chat

so this is something I've been trying to think through for about 16 hours. I am coding with PHP / CuRl / etc - the bot works and everything is fine. My current issue is figuring out how to disable the bot and allow a human to begin chatting with the customer/sender.
Has anyone successfully, created a route for this ? I mean it's pretty hard from what I see, you'd have to disable etc etc. A lot of effort for my clients.
Thanks for any input.
Facebook has rolled out a "Handover Protocol" which is supposed to facilitate a combined human/bot Messenger implementation.
https://developers.facebook.com/docs/messenger-platform/handover-protocol
It is a little unclear what actually occurs in step 5:
Pass thread control: At some point in the conversation, a user may choose to do something like interact with a live agent. To handle this, pass thread control from the Primary Receiver to the Secondary Receiver. The Secondary Receiver will receive a messaging_handovers webhook event to notify it that is now controls the conversation.
This doesn't actually disable the bot (as the OP requested), and isn't in the control of the Page owner but rather of the user. It seems FB envisions the user typing something like 'I would like to chat with a human' triggering the bot to pass control...but it would be nice to let the page owner simply put the app in standby and handle the messages herself.
Once you recognize someone wants to speak to a human, set a flag that disables all actions of your bot to on.
Then, have your bot message you, or whoever will respond, that a user ID needs responding to. Have your bot continue to send all messages received from them back to you until you enable the bot again.
Create some sort of way for your bot to interact with you that allows you to send a message to a specific user, and a way to once again enable the bot interaction with the user.
Probably something like "sendMessage104012301230'Hi, sorry you couldn't find [etc]', and enableUser104012301230
There may be a better way, but those are some thoughts on how I'd do it
If you enable messages echo, whenever a human respond using the page, a echo post is sent, and inside entry->messaging->message there's no app_id.
You can use that information to disable bot replies for a certain period, or disable indefinitely until you enabled is with some admin command (that's how I'm doing)
I thought a solution could be to label the message as "unsolved". Another solution could be to have the bot mark the conversation as unread. Does anyone know if it is possibile to add a label to a conversation or mark as unread through API?

wit.ai messenger bot with yes or no reply

I'm starting with wit.ai, I'm trying to create a simple messenger bot, I have everything working on facebook but I'm struggling with a simple task how to make the bot reply a different phrase based on the response given by the user.
Example:
User: Hello
Bot: Hi, Do you want to listen a joke?
User: Yes
Bot: [Tell a Joke]
or
User: No
Bot: Ok bye bye!
This seems to be very simple but I'm struggling with it. Some one can make an example how to make this?
Note: I know that there are a doc about this issue on wit.ai documentation, but even with that information I can't put this simple bot working.
The recipe can definitely be better...
You will find below how to train the yes/no entity
We are working on a simpler way to do that with branching and it will come soon. Follow your roadmap here: https://github.com/wit-ai/wit

Integrate Facebook messenger into CRM without bot?

we have built a very simple bot that simply passes any message onto our own application. (we want to answer questions asked from our customers to be handled straight from our CRM application for customer service purpose)
Now, the bot is declined with message:
Thank you for your submission. We tested the messenger experience on your associated page and received either no response from your messenger bot or received a human response. Please resubmit with the new, improved version of your bot.
Which raises the question for me: is it even allowed to do human assistance via the messenger API? Or is it bot only? I have read through all the platform policies, use case examples, etc.
So, how do I create the simplest integration? (send message straight through to one of our customer service users?)
Making a bot is easy if you use Wit.ai which is an NLP and speech API. It can integrate with the messenger/graph API. Basically, you send text to wit.ai and it returns the intent. For example: you send "get me a large pizza" to Wit and it returns something like (intent = pizza, size=large, time = now) You could also try api.ai but in my opinion, it is not as good yet.