Jump to content


Chat Bot - Force visitor to enter information (name, email, question)


28 replies to this topic

#1 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 23 June 2017 - 12:50 PM

Hi!

Yesterday I updated to version 7.0.5 and, differently from version 7.0.4, visitors can started the Chat Bot imediatelly, without the need to fill any initial information (name, e-mail, question, etc.). Once they click to talk to a human operator, we receive the chat request without this important information. Please, is there a way to force visitors to fill the information BEFORE entering the chat (Bot), just like version 7.0.4 ?


Thanks! Regards,

Fabio

#2 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 23 June 2017 - 04:39 PM

I also realized that chat transfer is not working anymore. When I select to transfer the chat to other operator, opens an window but there is no other operator in the list to select, even when there are other avaliable operators.

Thanks!

#3 Patrick Keil

    Administrator

  • Administrators
  • 3180 posts
  • LocationSingen, Germany

Posted 26 June 2017 - 08:56 AM

Hi,

Thanks for bringing this to our attention.

A fix will be included in 7.0.5.1 coming later this week but we also updated our latest build.

You can use the chat bot API to request customer information. The chat bot is meant to be a replacement for the login mask so you can't combine both.

#4 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 26 June 2017 - 12:27 PM

Hi Patrick,

Ok, thanks! I will research about chat bot programming. If is not too much work for you, please can you give us an example (in PHP) where chat bot ask user for name and e-mail?


Best regards,

Fabio

#5 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 26 June 2017 - 01:48 PM

Well, I will really need some help on this, some simple example on asking visitor for name and e-mail and storing this data. Thanks!

#6 Patrick Keil

    Administrator

  • Administrators
  • 3180 posts
  • LocationSingen, Germany

Posted 27 June 2017 - 07:21 AM

Hi Fabio,

we added another example called "Pizza Bot" that shows how to request and store information.

https://www.livezill.../chatbotapi/en/

#7 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 27 June 2017 - 09:01 PM

Hi Patrick,

I got into the Chat Bot configuration and set it to "Welcome Manager Mode" > "Bot offers to forward to a human operator: Always", set the BOT API URL (double checked it) and also set a welcome message. Then I created this code based in your example:

<!--?php
$requestobj = json_decode($_POST["livezilla_user_api_request"]);

$responseNode = array();
$responseNode["Value"] = "";
$responseNode["ResponseTo"] = "";
$responseNode["SearchKB"] = false;

if ($requestobj->Value != "[__[EXIT]__]") {

	$responseNode["Id"] = "action:request_name";
	$responseNode["Value"] = "Please, what is your name?";

	if ($requestobj->ResponseTo == "action:request_name") {

		$responseNode["Id"] = "action:request_email";
		$responseNode["Value"] = "Ok " . $requestobj->Value . "! And what is your e-mail?";

		$responseNode["Data"] = array();
		$responseNode["Data"]["111"] = $requestobj->Value;

		if ($requestobj->ResponseTo == "action:request_email") {

			$responseNode["Id"] = "action:request_user";
			$responseNode["Value"] = "Are you a registered client?";

			$responseNode["Data"] = array();
			$responseNode["Data"]["112"] = $requestobj->Value;

			$responseNode["Select"] = array();
			$responseNode["Select"][] = array("title"=>"Yes I am","return"=>"Yes I am");
			$responseNode["Select"][] = array("title"=>"No not yet","return"=>"No not yet");

			$responseNode["Block"] = true;

			if ($requestobj->ResponseTo == "action:request_user") {

				$responseNode["Id"] = "action:request_info";
				$responseNode["Value"] = "Great! Now please tell me with few words what you need.";

				$responseNode["Data"] = array();
				$responseNode["Data"]["0"] = $requestobj->Value;

				$responseNode["SearchKB"] = true;
				$responseNode["Block"] = false;

			}
		}
	}
} else {

	$responseNode["Id"] = "action:end_chat";
	$responseNode["Value"] = "Thank you!";

}
echo json_encode($responseNode);
?>

But once I enter in the chat, BOT answer it with the welcome message and nothing more happens :(

Please, what am I doing wrong? Are there errors in the code? Or maybe I need an extra configuration?


Thank you again!

Fabio

#8 Patrick Keil

    Administrator

  • Administrators
  • 3180 posts
  • LocationSingen, Germany

Posted 28 June 2017 - 06:55 AM

Hi Fabio,

Please understand that we can't troubleshoot user scripts.

#9 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 28 June 2017 - 11:02 AM

Ok, so I copy the "ChatBot-Script Pizza Bot" exactly as here https://www.livezill.../chatbotapi/en/ and it still not working... Nothing happens when I enter the chat. Chatbot show me the welcome message, I type some text and it return only the potential answers got from knowledge base... The BOT API URL is correct, I double checked it.

Here is what I need: visitors enter the chat, fill their name, e-mail, etc., chat bot welcome they and show potential answers got from knowledge base, giving them the options to leave a message or talk to a human operator (if avaliable). Version 7.0.4 works this way, but when visitors click to talk to a human operator they go back to the initial form, asking again for the name, email, etc. I do not mind if chat bot ask for visitors name, e-mail and question, and then show potential answers, as long as it works.

My question is: once the chatbot script is correct (copied from your example), why it is not working? What are the configurations I might change in order for it to work?

Thanks!

#10 Patrick Keil

    Administrator

  • Administrators
  • 3180 posts
  • LocationSingen, Germany

Posted 28 June 2017 - 11:03 AM

Did you check the logs?

#11 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 28 June 2017 - 12:14 PM

28.06.17 08:00:43 177.197.69.68 ERR# 129 Error connecting USER API, invalid response: https://atendeonline...ckstart_bot.php ({"Value":"Ok. What's your name please?","ResponseTo":"","SearchKB":false,"Data":{"114":"test"},"Id":"action:request_name"}) IN LINE 0

#12 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 28 June 2017 - 12:31 PM

Please, is this error related with some problem in the script or some configuration ?

Field "114" is configured in my chat as "Question" btw

#13 Patrick Keil

    Administrator

  • Administrators
  • 3180 posts
  • LocationSingen, Germany

Posted 28 June 2017 - 01:25 PM

Your have a Byte order mark in your script file. You need to remove that.

https://stackoverflo...nning-of-a-file

#14 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 28 June 2017 - 01:44 PM

Ok, thank you! Now it is working and I can make tests with the script. Once I finish I will make it avaliable here for everyone.

#15 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 04 July 2017 - 03:29 AM

Please, is it possible to start the Bot chat asking visitors to select an option, without waiting them to make the first interaction?

#16 Patrick Keil

    Administrator

  • Administrators
  • 3180 posts
  • LocationSingen, Germany

Posted 04 July 2017 - 05:43 AM

Hi,

No, that's not possible - sorry.

#17 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 04 July 2017 - 12:21 PM

Here is my problem: visitors most of the time do not read the bot chat welcome message, asking for their name, and start typing some question. So it wrongly record the question as visitor's name. Would be great if Livezilla have some configuration where I can set to always ask for visitors information BEFORE entering the chat, even to talk with bot. Hope this make sense to you.

Thanks!

#18 Patrick Keil

    Administrator

  • Administrators
  • 3180 posts
  • LocationSingen, Germany

Posted 04 July 2017 - 12:43 PM

That makes sense.

You may want to let the visitor confirm the name by adding a Yes / No button combination (is this your name, yes / no) as response to the first message. The visitor is required to read then.

Yes = continue
No = reset

#19 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 04 July 2017 - 01:04 PM

I would start the bot chat with a question "Are you a registered user?" and 2 buttons "Yes, I am a registered user" / "No, I am not a registered user", so visitors must pay attention what they are doing before asking for their name and e-mail. I think it would help to avoid this problem...

#20 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 19 July 2017 - 09:49 PM

Hi Patrick!

Is there any news about the subject of this topic in the version 7.0.6.0 ?

Would be great to have an option "Ask visitor for their details before entering the Chat BOT" that we can enable or disable as needed.

Allow me to explain again my problem... I bet many of your clients and even yourselves have the same needs...

We created a complete and huge knowledge base using Livezilla, with step-by-steps, ilustrated images, videos, etc., but almost ALL visitors enter the chat without checking it. So we lost time to accept the chat and to repeat instructions and informations that are already detailed in the knowledge base. Would be great if visitors fill their information and question, are first attended by BOT that list all the knowledge base itens found based in their question (informed before entering the chat), and give option to talk to a human operator.

Thank you for your support and patience!

Best regards,

Fabio





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users