Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2020-09-03 19:53:22

socialboost
New member
Registered: 2020-08-05
Posts: 6

Skip bot flow?

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 smile

Offline

#2 2020-09-04 05:54:23

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Skip bot flow?

Chat becomes pending as soon operators write to a chat.

Offline

#3 2020-09-09 13:45:43

codimcc
Member
Registered: 2020-09-03
Posts: 24

Re: Skip bot flow?

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

#4 2020-09-09 13:50:37

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Skip bot flow?

I think i found logical bug. I'll publish link to fix once i change. But I understood what's happening there.

Offline

#5 2020-09-09 13:55:23

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Skip bot flow?

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

#6 2020-09-09 14:16:28

codimcc
Member
Registered: 2020-09-03
Posts: 24

Re: Skip bot flow?

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

#7 2020-09-09 14:22:53

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Skip bot flow?

Offline

#8 2020-09-09 14:24:14

codimcc
Member
Registered: 2020-09-03
Posts: 24

Re: Skip bot flow?

Cool! By the way the fix works well. Thanks again

Offline

Board footer