Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Hello everybody! I have the following situation, I have a menu
1 For products
2 for services
Today when the customer types 1 I capture through "collect custom attribute" number 1, I would like to transform this value into "products" to be able to pass it to "Sub URL" in "Rest API Calls" without forcing the user to type "products"
Thank you
Offline
Hi, welcome in the live helper chat forum.
The developer can be busy and take time to reply here.
You can always look at the official documentation or you can even find more support option in my forum signature.
PeopleInside - Live helper chat - free limited forum support!
For commercial support or GitHub [see FAQ here]
If you want to support this open source project, just donate [see support page]
Something wrong with the forum? [contact a superhero]
Offline
you can access any url from chat even in sub url field. https://doc.livehelperchat.com/docs/bot … -variables
You need those
```
{{lhc.add.<additional variable key/identifier>}} - these values you are passing additionaly. It's either Field identifier from Start a chat form settings > Custom fields or if you are passing manually it's name attribute. If you put Field identifier value as gender in Start a chat form settings > Custom fields. In Rest API Call you can access this field like {{lhc.add.gender}}
{{lhc.var.<chat variable key>}} - these values can be set using extensions etc. It's data is taken by json_decode function from chat_variables column value. This column stores JSON as {<key> : <value>,..}. Usually in this column extensions stores their own data.
```
Offline
Guys, I think I expressed myself wrong.
I have a menu where the customer must type 1 for option 1, 2 for option 2.
1 - Car
2 - Motorcycle
When I use the Collect custom attribute component it captures everything OK, including it sends what the customer typed, example. 1 or 2, what I need is to somehow modify the number 1 that he typed for car and the number two that would be motorcycle, because that's how the destination API understands, car or motorcycle and I didn't want to have to force the client driving car or motorcycle.
So what I need is to change the heat from
{lhc.add.type} = 1 to = car
{lhc.add.type} = 2 for motorcycle
without the customer having to type anything more than 1 or 2.
Thanks
Offline
I ques you can have on visitor text another trigger to be executed which would check is it 1 or 2.
So if condition is matched and it's 1 exeute one request if 2 execute another or just set another variable. like type_api etc
https://doc.livehelperchat.com/docs/bot … conditions
Offline