Are there any plans to integrate hubot into livechat?
I need to have hubot online in our live chat.
Is there a way how to do that?
This would be a cool integration. So technically its possible. Because livechat rooms are just like normal channels. So it would be a matter of getting hubot added into those rooms. By adding hubot as the sole agent maybe and then have hubot add someone to the room if need be?
If I set the bot as sole agent, the bot responds all chats. That's nice.
Then, if I login as LiveChat manager, click on "current chats", one can see/participate in the conversation between bot and user.
If a manager could just simply see all current chats on the left toolbar, even though he is not the designated agent. One quick solution would be to display all the rooms in the menu for managers instead of filtering the ones to other agents.
I'm using the internal hubot. It works well in normal channels, but in the livechat room, it didn't response any message. I'm not sure if it is caused by the rocket.chat is not support bot in livechat?
Maybe hubot has no connection to these special rooms? I'm interested in this topic and just started to dive in, but having some HUBOT being the first participant on a livechat might bring "conversational ui" with RocketChat ;)
Is this resolved by PR #8933 / Issue #5191 - or does it relate to external hubots instances as well?
Technically you can add hubot to room.
We actually use hubot to answer and transfer to humans
@geekgonecrazy . could you share me how to use hubot to answer and transfer the conversation to human. could you help me check what's wrong with following script,
module.exports = (robot) => {
robot.respond(/live/i, function(res) {
const hubotPackage = require.main.require('hubot/package.json')
const adapterPackage = require.main.require('hubot-rocketchat/package.json')
const sdkPackage = require.main.require('@rocket.chat/sdk/package.json')
var transferData = {
roomId: res.envelope.room,
departmentId: "e3HMKn9dbubKBcZen" // a fixeed
}
robot.adapter.callMethod('livechat:transfer',transferData).then((result) => {
console.log("==========transfer=======");
});
})
}
when I run it, I also get following error message
[Tue May 01 2018 09:44:02 GMT+0100 (GMT Daylight Time)] ERROR [createDirectMessage] Error: { isClientSafe: true,
error: 400,
reason: 'Match failed',
message: 'Match failed [400]',
errorType: 'Meteor.Error' }
(node:20364) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): #<Object>
@geekgonecrazy
how can I use the hubot to transfer to human service within livechat?
Is there a specific method?
We currently use the code below:
robot.hear(/(suporte)/i, (res) => {
res.send('Aguarde um momento...')
robot.messageRoom('transferencia', "Aten莽茫o! Novo cliente na 谩rea")
var params = {
roomId: res.envelope.room,
departmentId: "hnaX5WWETBbE9hQnd"
}
robot.adapter.callMethod('livechat:transfer'params).then((result) => {
console.log(result)
})
})
Can you help us?
Might be worth posting in: https://forums.rocket.chat/c/community-support or https://forums.rocket.chat/c/bots-special-interest-panel
@vnuness can you have sucessfull? I have same problem of you... can you share the solution?
Thanks
Hello @leolage !! I used an external human service, that is, in the livechat.js, when a received an specific behavior, I called an external API and did a redirect.
Thanks for fast response @vnuness and explanation
I will use whatsapp (via twilio) and livechat on site, do you know if i can do this redirect via livechat.js? This proceed is documented to me implement?
Thanks
We have now a new approach to implement this kind of integration, based on Apps. So it's easy to integrate Rocket.Chat/Omnichannel to external systems, we just published a new App that integrates Rocket.Chat and Dialogflow, it's available in our marketplace already.
Other chatbot adapters(Apps) are coming soon, so the Hubot might be one of them.
@leolage, check if the previous explanation help you. If not, if you mastered web development, you can create a web application that will take care of your whatsapp integration and redirect the livechat to your page. For example:
When user types 1 in livechat (you can manipulate this in livechat.js) you will use "location.href = 'yourdomain.com'".
I hope that this help you.
Hugs.
Thanks @vnuness for this tip, I will try.
@renatobecker thanks for share this information, I dont found a tutorial to config RocketChat with Dialogflow, can you share please? I try to configure here but cant do it usefull.
Thanks again.
Thanks @vnuness for this tip, I will try.
@renatobecker thanks for share this information, I dont found a tutorial to config RocketChat with Dialogflow, can you share please? I try to configure here but cant do it usefull.
Thanks again.
You just need to install the App and then set it up. If you have a Dialogflow chatbot agent, you just need to set the credentials to the App and everything will work fine.
Ok @renatobecker I tryed it. But dont worked yet, and I dont found a problem... on logs all request to DialogFlow return null... do you already saw this?
I already setup app and dialogflow
Instance: bRjmZrvWgAdZRtBrW
debug: 2020-08-04T11:40:36.613Z Caller: anonymous OR constructor
[
"onSettingUpdated is being called..."
]
info: 2020-08-04T11:40:36.628Z Caller: run -> run
[
"------------------ Google Credentials validation Success ----------------"
]
info: 2020-08-04T11:40:36.664Z Caller: run -> run
[
"------------------ Google Credentials validation Success ----------------"
]
info: 2020-08-04T11:40:36.684Z Caller: run -> run
[
"------------------ Google Credentials validation Success ----------------"
]
info: 2020-08-04T11:40:36.693Z Caller: run -> run
[
"------------------ Google Credentials validation Success ----------------"
]
info: 2020-08-04T11:40:36.696Z Caller: run -> run
[
"------------------ Google Credentials validation Success ----------------"
]
debug: 2020-08-04T11:40:36.696Z Caller: anonymous OR constructor
[
"'onSettingUpdated' was successfully called! The result is:",
null
]
when I sent a message to bot user @dialogflow.bot on rocketchat:
Instance: bRjmZrvWgAdZRtBrW
debug: 2020-08-04T11:47:48.357Z Caller: anonymous OR constructor
[
"executePostMessageSent is being called..."
]
debug: 2020-08-04T11:47:48.360Z Caller: anonymous OR constructor
[
"'executePostMessageSent' was successfully called! The result is:",
null
]
I dont found a log on dialogflow/googlecloud logs
when I sent a message to bot user @dialogflow.bot on rocketchat:
Instance: bRjmZrvWgAdZRtBrW
debug: 2020-08-04T11:47:48.357Z Caller: anonymous OR constructor
[
"executePostMessageSent is being called..."
]
debug: 2020-08-04T11:47:48.360Z Caller: anonymous OR constructor
[
"'executePostMessageSent' was successfully called! The result is:",
null
]I dont found a log on dialogflow/googlecloud logs
This doesn't mean the requests are returning null, this is a bad implementation of the app logs, they're not displaying the correct information.
As you can see from your previous comment, the setup succeeded: Google Credentials validation Success.
I can't provide any additional information since I don't have access to your Dialogflow chatbot agent, but you can run our develop branch on your local environment and check the payload you get from Dialogflow.
Most helpful comment
This would be a cool integration. So technically its possible. Because livechat rooms are just like normal channels. So it would be a matter of getting hubot added into those rooms. By adding hubot as the sole agent maybe and then have hubot add someone to the room if need be?