Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
Hi there,
Thanks for a superb platform!
We've tried to set up a bot to ask for users email / name initially.
But, the problem is that when I then take the chat as a manual person, the bot continues if it did not finish. Is there any way for me to manually stop bots while chatting (or just when an operator answers)?
Thank you
Offline
Chat becomes pending as soon operators write to a chat.
Offline
Hi Remdex!
It is true for usual bot flow but the issue appears when bot is asking for example for user's email. It continues just send 'your email seems invalid' even to each user's message even if operator has already answered in the chat and chat has status 'active'. it can be reproduced with 'presales bot' from the original setup. Do you have any samples how to implement custom command like '!disable_bot' or so?
Offline
I think i found logical bug. I'll publish link to fix once i change. But I understood what's happening there.
Offline
Hi,
Please apply this fix. https://github.com/LiveHelperChat/liveh … 0991a2617b
Basically problem is operators takes over chat once chat is in the middle of workflow. This should fix it. We will remove any current state workflow once operator takes over.
Offline
Great! I will do, thank you for quick response. Meanwhile I have tried to implement custom command
[== Undefined ==]
public function run()
{
$dispatcher = erLhcoreClassChatEventDispatcher::getInstance();
// Attatch event listeners
$dispatcher->listen('chat.customcommand', array($this, 'chatCustomCommand'));
}
public function chatCustomCommand($params)
{
file_put_contents('chatCustomCommand.txt', print_r($params, true));
return array(
'processed' => true,
);
}
but in the lhchatcommand.php I am getting empty response and 'unknown command' as a result. Can you help with this?
[== Undefined ==]
$commandResponse = erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.customcommand', array('command' => $commandData['command'], 'argument' => $commandData['argument'], 'params' => $params));
if (isset($commandResponse['processed']) && $commandResponse['processed'] == true) {
return $commandResponse;
}
}
return array(
'processed' => true,
'ignore' => true,
'process_status' => '',
'info' => 'Unknown command! [' . $commandData['command'] .']',
);
Offline
See how it's implemented here.
Offline
Cool! By the way the fix works well. Thanks again
Offline
Pages: 1