Jump to content


Display Field values

Chatbot api fields

8 replies to this topic

#1 cstanleyhns

    Advanced Member

  • Members
  • PipPipPip
  • 46 posts

Posted 14 November 2018 - 10:15 AM

Hi

I am able to use pass-thru to take data from my website and pass into the livezilla app but i would like to then use that data in the transcript during the chat. So for example, i will set the Name Field [111] using pass-thru but then in the chatbot php script I want to use that name value in a greeting. I assumed something like below but it doesn't work.:

$responseNode["Value"] = $responseNode["Data"]["111"];

Does anyone know how to display stored data in the chat transcript?

Thanks

Chris

#2 Patrick Keil

    Administrator

  • Administrators
  • 3841 posts
  • LocationSingen, Germany

Posted 14 November 2018 - 01:51 PM

Hi,

You can use the custom placeholder in your chat transcript template under (User Management -> Group -> Language -> Emails -> Chat Transcript -> Right click text input to add placeholder).

Hope that helps.

#3 cstanleyhns

    Advanced Member

  • Members
  • PipPipPip
  • 46 posts

Posted 15 November 2018 - 09:33 AM

Hi Patrick

Thank you for response.


Lets say using pass-thru, I have pushed in the visitors name into the Livezilla system in Field ID 111. Now, in my chatbot php, I want to use that value in a greeting -e.g, Hello Chris where Chris is the name stored in field Id 111.

If i can do this, then it would be great and i would have thought it should be straight forward.

Thanks in advance, Chris

#4 Patrick Keil

    Administrator

  • Administrators
  • 3841 posts
  • LocationSingen, Germany

Posted 15 November 2018 - 01:31 PM

Hi,

I did some research and the custom data is not passed to your script.

We just added it for our tomorrows update 8.0.0.4.

You will be able to access it via

$requestObject["Customs"][0]

Cheers

#5 cstanleyhns

    Advanced Member

  • Members
  • PipPipPip
  • 46 posts

Posted 15 November 2018 - 10:03 PM

Hi Patrick,

That is brilliant. Thank you :-P. I will confirm here that it works.

Chris

#6 cstanleyhns

    Advanced Member

  • Members
  • PipPipPip
  • 46 posts

Posted 16 November 2018 - 10:11 AM

Patrick, in the meantime, I upgraded this morning to v8.0.0.3 and i have lost the license. It says i am on a trial. Should this have happened?

** EDIT - Add the license again and its fine - next issue is that the chatbot always sends me to human even though its set to never

Chris

#7 cstanleyhns

    Advanced Member

  • Members
  • PipPipPip
  • 46 posts

Posted 16 November 2018 - 02:15 PM

Hi Patrick,

I have updated to 8.0.0.4 today and i am unable to test as the chatbot ALWAYS sends to a human. See attached file. I have set the chatbot to NEVER pass to human. Then look at the conversation, the chatbot picks up the chat, I type 'hi' then it connects immediately.

Is this a bug in the new release?

Chris

Attached Files



#8 cstanleyhns

    Advanced Member

  • Members
  • PipPipPip
  • 46 posts

Posted 19 November 2018 - 11:17 AM

Patrick

I have been able to get the chatbot to stop putting through to an operator. Not sure what was going on. Anyway, so now i test using $responseObject["Value"] = $requestObject["Customs"][0]; in the chatbot php script and it always says "I am sorry, I did not find any resource matching your question. Please try a different search phrase." which i know it does when it sees an error in the php file. So, i still have the same problem. Can you help please?

Chris

#9 cstanleyhns

    Advanced Member

  • Members
  • PipPipPip
  • 46 posts

Posted 19 November 2018 - 11:28 AM

All,

I found the correct syntax. If you want to pass thru some data from your web applications backend and then use that data in your chatbot responses, then you use the syntax as below within your chatbot php:

$responseObject["Value"] = "Hi " . $requestObject->Customs[0];

* Where Customs[0] is the custom field configured in the Data section of the link widget config

To get the data for pass thru i used some javascript and knockout to pick out the data required from the MVC model.

Thanks

Chris





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users