Live Helper Chat support forum.. Old google groups forum can be found here

You are not logged in.

Announcement

#1 2020-08-31 20:50:22

tecnotronico
New member
Registered: 2020-08-31
Posts: 4

How to collect custom attributes from button values from Bot

Hi fellows,

I have created a bot and works just fine.

The situation I have right now is that I need to create a dynamic URL based on custom attributes to have something like:

htt...//domain.com?typebusiness=rent&typeproperty=Apartment&zone=NothingHill&minprice=1000&maxprice=3000

I know how to collect custom attributes with the bot and assign an attribute id, however, what I need is to get those attributes values from buttons instead of from the user's input.

Let's suppose that this is a real state website and I need to ask about the type of business that the user wants. It could be a) rent or b) buy , I could ask that through a Button List response type, having just those two buttons available (rent and buy) so that the user is obligated to choose one of them instead of writting it. Well, once I know the user's option (i.e. rent) I need to assign that value to the custom attribute named as typebusiness. The same situation would be for the other variables like typeproperty, zone, minprice and maxprice.

So the question is, How could I assign a button value to a custom attribute to be able to build the custom url I want to create??

P.D: Once having the custom atrributes I know how to create the url like: ht..//domain.com?typebusiness={lhc.add.typebusiness}&typeproperty={lhc.add.typeproperty}&zone={lhc.add.zone}&minprice={lhc.add.minprice}&maxprice={lhc.add.maxprice}

Waiting for your very appreciated support on this matter.

DanielR

Last edited by tecnotronico (2020-08-31 20:52:14)

Offline

#2 2020-09-01 02:53:21

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

Re: How to collect custom attributes from button values from Bot

Well you did not wrote what response types you are using exactly... If you are using quick reply buttons there is Store name and store value.

1598928752_doing.jpg

So in link you can use "I'm doing just good. http://google.com/{lhc.add.doing}"

And if you are using any other buttons. You can always use "https://doc.livehelperchat.com/docs/bot … rrent-chat" this trigger to update any attribute.

Offline

#3 2020-09-01 12:55:18

tecnotronico
New member
Registered: 2020-08-31
Posts: 4

Re: How to collect custom attributes from button values from Bot

Hi remdex,

Thanks for your answer ...

I was using Button List response, once you told me that, I changed to Quick Reply but it is not passing the values from one trigger to the next one.

Let me show you:

1598964497_variables01.png

As you can see there, I have created two quick replay buttons, related to the same variable (TipoNegocio) where the possible assigned values are: Alquilar (rent a property) or Venta (buy a property).

Once the user does click on any of those two buttons, I execute the trigger "Tipo de Inmueble" (Type of Property) which starts sending this text:

1598964727_variables02.png

That's just an introduction to ask about the type of property based on the type of business, but, once I show that in the chat, it doesn't replace the custom attribute with the value, as you can see here:

1598964851_variables03.png

What am I doing wrong?

For your information, I'm using Live Helper Chat version 3.39.

Thanks in advance for your very appreciated support on this matter.

Dan

Last edited by tecnotronico (2020-09-01 12:56:54)

Offline

#4 2020-09-01 13:52:11

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

Re: How to collect custom attributes from button values from Bot

Well for me it works as you see from screenshot. If what you can come to discord. Perhaps there if you share logins i could test personally...

Also try to use lowercase "Store name" Recently I changed that i lowercase those to leave as user entered. Perhaps that's the case in your.

Offline

#5 2020-09-01 14:23:06

tecnotronico
New member
Registered: 2020-08-31
Posts: 4

Re: How to collect custom attributes from button values from Bot

Thanks a lot remdex ... it works now ... the problem was the uppercase letters in the Store name. As you said, it must be in lowercase.

By the way, why when you create a send message response with the quick buttons, if you just write the message in the "Enter text" box, it is shown in the chat above the buttons, but if you writte the message in the "Enter HTML" box, it is shown in the chat below the buttons??

I just want to use HTML but having the message above the buttons.

Any idea?

Dan

Last edited by tecnotronico (2020-09-01 15:03:03)

Offline

#6 2020-09-01 15:13:53

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

Re: How to collect custom attributes from button values from Bot

Just update to version from master branch. This thing html message was changed in recent updates smile

Offline

#7 2020-09-01 15:51:29

tecnotronico
New member
Registered: 2020-08-31
Posts: 4

Re: How to collect custom attributes from button values from Bot

Thanks a lot remdex ... you are an excellent developer .. Contratulations for this piece of art that your chat with bot represents and you share with us.

Offline

Board footer