dialogflow-esdialogflow-es-fulfillment

Dialogflow fulfillment doesn't work after intent is already mapped


I just started learning dialogflow, and I am following the instruction here to make fulfillment on intent. However I can't make it work even though it seem to be correct, what am I doing wrong?

I create the buy-car intent with webhook enabled:

enter image description here

Fulfillment is enabled and the intent is already mapped:

enter image description here

  function BuyCar(agent) {
    agent.add(`Sure I can help you with that`);
    agent.add(`Web hook response`);
    agent.end("");
  }
  
  let intentMap = new Map();
  intentMap.set('Default Welcome Intent', welcome);
  intentMap.set('Default Fallback Intent', fallback);
  intentMap.set('Buy-Car', BuyCar);
  agent.handleRequest(intentMap);

No response thought:

enter image description here

In diagnostics, it gave this error for fulfillment:

enter image description here

What am I doing wrong?

The following error also appear in log, what does it mean?

enter image description here


Solution

  • The error is caused by testing multi line responses in the Web Demo provided by Dialogflow console. The Web Demo is limited to "single text responses" only. See Web Demo limitations for reference.

    If the responses are multi line or have rich messages, a possible workaround is to execute testing in the "test console" located at the right side of the Dialogflow console or try using a different integration like the Dialogflow Messenger.