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

You are not logged in.

Announcement

#1 2021-02-11 15:39:36

karlitoxz
Member
Registered: 2021-02-10
Posts: 16

data from API rest to custom var

I have a rest api that returns data from a client, how can I update a variable through a trigger: example:
1613057450_lhc_002.jpg

in the trigger:
1613057857_lhc_003.jpg

I have tried updating the variable from the trigger, but have not been successful.


Thanks, your application is great.

Offline

#2 2021-02-11 15:47:43

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

Re: data from API rest to custom var

See this sample how I set custom vars here
https://doc.livehelperchat.com/docs/bot … out-coding

Offline

#3 2021-02-12 18:59:56

karlitoxz
Member
Registered: 2021-02-10
Posts: 16

Re: data from API rest to custom var

Ok, thanks I have already been able to store the variables data. Since I can see them in the backend:
1613156002_lhc_003.jpg
The variable is declared like this:
1613156239_lhc_005.jpg
But when printing the variable it does not show me anything. and tried in many ways.
1613156136_lhc_004.jpg

--------------------//-----------
I am very sorry for the inconvenience, this project is for a company, we are doing tests for its implementation, and then make a commercial offer. about various developments that we would need on this software.

Offline

#4 2021-02-12 19:03:58

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

Re: data from API rest to custom var

Offline

#5 2021-02-12 20:10:11

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

Re: data from API rest to custom var

In your case it should be {lhc.var.deuda}

Offline

#6 2021-02-16 17:44:23

karlitoxz
Member
Registered: 2021-02-10
Posts: 16

Re: data from API rest to custom var

:-) Ok thanks, it works perfect.

Another question, in a bot, in a trigger of type "Execute action" can you expect or validate the upload of a file?

Offline

#7 2021-02-16 17:46:32

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

Re: data from API rest to custom var

At the moment there is no api to work with files. So you would need either make or just use bbcode in text messages to format a links to files.

Offline

#8 2021-02-16 18:06:41

karlitoxz
Member
Registered: 2021-02-10
Posts: 16

Re: data from API rest to custom var

ok, i think i asked wrong; with nothing to do with an API. In a trigger of type "execute action", I could expect a user to upload a file to me, and not expect text; validator with regex.
for example:
"For success visitor message has to contain one of these words"
/(?!.*********?:jpg|pdf|doc)$).*/

Could this ever work or am I doing something totally wrong.

Offline

#9 2021-02-16 18:14:33

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

Re: data from API rest to custom var

I understand what you want, but there is no response type to work with files. Unless you make one or hire me to make one big_smile

Offline

#10 2021-02-16 19:10:41

karlitoxz
Member
Registered: 2021-02-10
Posts: 16

Re: data from API rest to custom var

Please send me the email of my profile, how much could this first adjustment cost?

Offline

#11 2021-02-16 19:26:49

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

Re: data from API rest to custom var

I'll send tomorrow.

Offline

#12 2021-02-16 20:14:39

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

Re: data from API rest to custom var

Just wrote an e-mail

Offline

#13 2021-02-24 15:29:25

alternativas
New member
Registered: 2021-02-23
Posts: 2

Re: data from API rest to custom var

Hola karlitoxz.

Te pregunto, ¿ofreces el servicio de implementar in API rest en LCH.?

Quedo atento.

Gracias!

Offline

Board footer