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

You are not logged in.

Announcement

#1 2020-07-14 18:52:28

FEX1980
Member
Registered: 2020-04-08
Posts: 58

How to collect a custom attribute and use it with a api

Hello i am triying to use a custom atributte in the chat and after that use it to call a REST api, I can get the attributte perfectly because I am seyying it on the operators chat, But I dond way I can use it like a REST parameter?

Is this possible?

Thanks in advance.

Offline

#2 2020-07-14 18:58:19

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

Re: How to collect a custom attribute and use it with a api

Offline

#3 2020-07-14 19:10:41

FEX1980
Member
Registered: 2020-04-08
Posts: 58

Re: How to collect a custom attribute and use it with a api

Can Is use for example {{lhc.add.order_number}} in Rest Api trigeer method?

Offline

#4 2020-07-14 19:12:14

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

Re: How to collect a custom attribute and use it with a api

I’m not sure about what part you are talking exactly. Paste a screenshot.

Offline

#5 2020-07-17 13:37:41

rogeriomayer
Member
Registered: 2020-07-03
Posts: 12

Re: How to collect a custom attribute and use it with a api

Hello FEX1980, did you solve the problem?
I am also not able to use custom variables.
If so how did you do it?

Thank you.

Offline

#6 2020-07-17 14:21:47

FEX1980
Member
Registered: 2020-04-08
Posts: 58

Re: How to collect a custom attribute and use it with a api

Yes, It's pretty easy you only need to change how to call the variable you only need to change your variable name for exampe if your varibale name is number you has tu us it in the rest api call {{lhc.add.number}}, that is all

Offline

#7 2020-07-17 16:55:02

rogeriomayer
Member
Registered: 2020-07-03
Posts: 12

Re: How to collect a custom attribute and use it with a api

I created a simple REST AP that returns the headers. When trying to pass a variable in the header my return was like this
{"key": "meyKey", "value": "{{lhc.add.order_number}}"} did not get the variable's value. Where can my mistake be? Can you pass an example?
Thank you very much.

Offline

#8 2020-07-17 16:57:37

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

Re: How to collect a custom attribute and use it with a api

Look, what variables to extract from rest api you define in your rest api calls. Later these are available as {content_1} {content_2 and so on. So you use these in triggers themself.

And just watch youtube videos i have prepared...

Offline

#9 2020-07-17 17:17:40

rogeriomayer
Member
Registered: 2020-07-03
Posts: 12

Re: How to collect a custom attribute and use it with a api

I've watched the videos, tried in many ways but I really don't know the point I'm missing. Whenever I try to get the value of the variable it never brings the value always returns "{{lhc.add.variablename}}".

Thank you very much for your help.

Offline

#10 2020-07-17 17:21:18

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

Re: How to collect a custom attribute and use it with a api

1. Is this variable set in lhc itself it's additional variable. Do you see it in the chat?
2. Where are you trying to bring it rest api call? trigger or where?

Offline

#11 2020-07-17 19:30:00

FEX1980
Member
Registered: 2020-04-08
Posts: 58

Re: How to collect a custom attribute and use it with a api

I didn't use the variable in the header i am using it on the address like a new param

Offline

Board footer