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:
Fulfillment is enabled and the intent is already mapped:
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:
In diagnostics, it gave this error for fulfillment:
What am I doing wrong?
The following error also appear in log, what does it mean?
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.