dialogflow-fulfillment-nodejs icon indicating copy to clipboard operation
dialogflow-fulfillment-nodejs copied to clipboard

Multiple messages not supported with payloads

Open vmkrish opened this issue 7 years ago • 20 comments

When using a payload with the V2 agent, only the payload gets sent on platforms that support multiple message responses (eg, Facebook).

Eg,:

    agent.add(new Text({'text': 'hello', 'platform': 'FACEBOOK'}))
    agent.add(new Payload('FACEBOOK', {...})

will only send the payload, as opposed to both 'hello' and the payload

vmkrish avatar Apr 24 '18 01:04 vmkrish

Currently the library supports a payload or other response types but not both at the same time. I'll leave this open as a feature request

mattcarrollcode avatar May 29 '18 17:05 mattcarrollcode

Came across this issue today. Would be great to have a update that allowed for this please

McGern avatar Jun 06 '18 16:06 McGern

If multiple messages are supported using Dialogflow UI, then why not using library. Is there any alternate way or trick to do so?

Ashwin-Kapes avatar Jun 16 '18 10:06 Ashwin-Kapes

This should be fixed by #113

stevenbeck avatar Sep 11 '18 19:09 stevenbeck

Same issue here, so #113 was merged but not deployed yet?

secato avatar Sep 19 '18 19:09 secato

@stevenbeck unfortunately #113 didn't fix this (at least for Facebook Messenger) Please check #146

jdpt0 avatar Oct 08 '18 01:10 jdpt0

#113 Still didn't fix this on Facebook Messenger. If there is Payload in response along with others, will display only Payload.

puuga avatar Oct 08 '18 02:10 puuga

confirm about this issue . if mix message and payload it will response only payload type

parnus01 avatar Oct 26 '18 04:10 parnus01

As some you may have noticed, Facebook integration supports messages or a payload, not both.

#173 fixes the Payload.sendAsMessage option to support this.

stevenbeck avatar Oct 30 '18 23:10 stevenbeck

Thanks @stevenbeck, can confirm this is now fixed. Just make sure to use:

agent.add(new Payload(agent.FACEBOOK, payload, {sendAsMessage: true}));

jdpt0 avatar Oct 31 '18 03:10 jdpt0

I've updated package to dialogflow-fulfillment@^0.6.1

Event after adding {sendAsMessage: true} , only payload is shown.

Is there anything else to modify?

Ashwin-Kapes avatar Dec 01 '18 14:12 Ashwin-Kapes

@Ashwin-Kapes dialogflow-fulfillment@^0.6.1 does not include fixes from #173. Although it's already merged, you'll need to wait until package is bumped to 0.6.2 and published to be available on npm.

In the meantime, just clone from the latest commit here, and you can send text + payload like:

agent.add( new Text('Hello there') );   // or just agent.add('hello');
agent.add( new Payload(agent.FACEBOOK, payload, {sendAsMessage:true}) );

I tested with current latest commit (aaade16) and it does work, Text + Payload.

maganap avatar Dec 18 '18 14:12 maganap

@Ashwin-Kapes dialogflow-fulfillment@^0.6.1 does not include fixes from #173. Although it's already merged, you'll need to wait until package is bumped to 0.6.2 and published to be available on npm.

In the meantime, just clone from the latest commit here, and you can send text + payload like:

agent.add( new Text('Hello there') );   // or just agent.add('hello');
agent.add( new Payload(agent.FACEBOOK, payload, {sendAsMessage:true}) );

I tested with current latest commit (aaade16) and it does work, Text + Payload.

i tested latest commit (c36cf9c), same in telegram, multiple payload not work error result Payload response for TELEGRAM already defined.

derit avatar Jan 21 '19 08:01 derit

Any updates to this issue? I am still unable to send two custom payloads, e.g.

agent.add(new Payload(agent.FACEBOOK, payload1, {sendAsMessage: true}));
agent.add(new Payload(agent.FACEBOOK, payload2, {sendAsMessage: true}));

I'm still unable to send two custom payloads for Telegram, are there any fixes for this? Thanks

agent.add(new Payload(agent.TELEGRAM, payload1, {sendAsMessage: true}));
agent.add(new Payload(agent.TELEGRAM, payload2, {sendAsMessage: true}));

tyylynette avatar Feb 22 '20 03:02 tyylynette

are there any fixes for this? Thanks

j4iro avatar Aug 26 '20 15:08 j4iro

any update on this issue?

jawwadturabi avatar Oct 02 '20 21:10 jawwadturabi

any update on this issue?

nguyendn avatar Jan 27 '21 19:01 nguyendn

any updates?

anasvp444 avatar Mar 05 '21 09:03 anasvp444

Lol, it's been 3 years to wait for this feature

chunkhai96 avatar Apr 02 '21 04:04 chunkhai96