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

You are not logged in.

Announcement

#26 2020-05-06 15:10:37

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

Re: LHC + DialogFlow

Yes, it has to be just json_encoded string.

So your response could look like

{
"msg":"your bot response"
"meta_msg": "{\"content\":{\"quick_replies\":[{\"type\":\"button\"\,"content\":{\"name\":\"Rest API Button\",\"payload":\"rest_api_button\"}}]}}"
}

Offline

#27 2020-05-08 16:59:27

edersonbologna
Member
Registered: 2020-04-04
Posts: 33

Re: LHC + DialogFlow

Hello good afternoon. It's almost working. But the quick-response buttons are still missing. Let me show you my code and settings.
1588957048_captura_de_tela_area_de_selecao_20200508135658.jpg
1588957090_captura_de_tela_area_de_selecao_20200508135750.jpg
1588957134_captura_de_tela_area_de_selecao_20200508135827.png
Any idea?

Offline

#28 2020-05-08 17:28:53

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

Re: LHC + DialogFlow

I don't know because here all worked smile

Offline

#29 2020-05-08 17:33:27

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

Re: LHC + DialogFlow

One thing. Try to pass as array not json string.

Because this one is returned as normal array not json string.
'meta_msg' => json_decode('{"content":{"quick_replies":[{"type":"button","content":{"name":"Rest API Button","payload":"rest_api_button"}}]}}',true),

Offline

#30 2020-05-08 17:33:34

edersonbologna
Member
Registered: 2020-04-04
Posts: 33

Re: LHC + DialogFlow

Ok.

Last edited by edersonbologna (2020-05-08 17:34:35)

Offline

#31 2020-05-08 17:34:43

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

Re: LHC + DialogFlow

As stated here

echo json_encode(array(
    'meta_msg' => json_decode('{"content":{"quick_replies":[{"type":"button","content":{"name":"Rest API Button","payload":"rest_api_button"}}]}}',true)
));

Offline

#32 2020-05-08 17:35:00

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

Re: LHC + DialogFlow

Just read documentation........

Offline

#33 2020-05-08 18:05:57

edersonbologna
Member
Registered: 2020-04-04
Posts: 33

Re: LHC + DialogFlow

remdex wrote:

Just read documentation........

Hello. I read the documentation, but I got it wrong. With your help I saw what I was doing wrong, now it's working. Thank you very much, your help has been invaluable.  big_smile  big_smile  big_smile  big_smile  big_smile

Offline

#34 2020-05-08 18:11:08

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

Re: LHC + DialogFlow

Now you can create a pull request with updated documentation so others will understand easier

Offline

Board footer