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

You are not logged in.

Announcement

#1 2022-03-07 11:43:42

antonellat
New member
Registered: 2022-02-16
Posts: 9

payload in trigger

Hi all,
i've a response to an api, and I want generate a list of button that the user can click.
this click goes to a trigger. I need to pass to the trigger witch button has been clicked.
I've tried like this:

On Enter HTML
{foreach=content_1}
<button id="{args.item.key}" onclick='lhinst.updateTriggerClicked()'  data-id="{msg_id}" data-payload="47" class="action-image link-trigger-button">{args.item.value}</button>
{/foreach}

data-payload="47" is the id of the trigger I want to call.
How can I pass the button's id or name to this trigger?

Thank you in advance

Offline

#2 2022-03-07 12:17:17

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

Re: payload in trigger

To send custom buttons payload etc. You should https://doc.livehelperchat.com/docs/bot/trigger-body use this response type...

Offline

#3 2022-03-10 12:17:16

antonellat
New member
Registered: 2022-02-16
Posts: 9

Re: payload in trigger

Thank you for your reply.
Now I'm able to show the button list, but my problem is detect which button of this list has been clicked into the second trigger
Could you help me please?

Offline

#4 2022-03-10 12:19:31

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

Re: payload in trigger

You can reuse Store name and value just smile
https://doc.livehelperchat.com/docs/bot … troduction

Offline

#5 2022-03-11 16:48:04

antonellat
New member
Registered: 2022-02-16
Posts: 9

Re: payload in trigger

Thank you!

Offline

Board footer