How to use Dialogflow's fulfillment code with Kommunicate

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


How to use Dialogflow's fulfillment code with Kommunicate



Sorry if this question is dumb but I don't have much experience using Javascript or Dialogflow yet. I have a Dialogflow bot that I've integrated through Kommunicate into a test website. The bot works with responses set through intents, but fulfillment code seems to not run, as any response that's set through fulfillment doesn't happen. The fulfillment is coded through the inline editor.



Here's some responses set through intents:



Intents



And here's a response set through fulfillment:



Fulfillment



Here, you can see the fulfillment response working through the Dialogflow console:



Console Response



And finally, here you can see that it doesn't work through Kommunicate, but the intent response does:



Kommunicate Response



I'm pretty sure my problem is that fulfillment code just isn't running on Kommunicate, and needs to be integrated into Kommunicate in some way that I don't know of. Does anyone know what I need to do?



Edit: I may have found the reason for this. At the bottom of the fulfillment doc it says this: "Network calls originating from your Cloud Function for Firebase to destinations outside Google's network require billing to be enabled for the underlying Google Cloud or Firebase project." Can anyone confirm that this is what I need to do before I try to convince my boss to spend money on it?





How are you connecting Kommunicate and Dialogflow?
– matthewayne
Jul 9 at 18:34




1 Answer
1



You Do not need to enable billing to use Dialogflow. Dialogflow comes with Free Edition and you can develop and test a Bot without enable billing.



Kommunicate supports Dialogflow's default response as well as custom webhook. working with default response straightforward. Enter text response or any Actionable message supported by kommunicate in Custom Payload and Kommunicate will automatically render it in chat UI.


Custom Payload



If you have enabled webhook call for the Intent, You can use fulfillmentText field to return array of text messages or fulfillmentMessages field to return Actionable message as described in Dialogflow docs.


fulfillmentText


fulfillmentMessages



Kommunicate uses these fields to determine what message will be shown in the UI. If both fields present Both will be rendered in UI. Here is an example how your webhook response look like:


{
"fulfillmentText": "render a text message from webhook",
"fulfillmentMessages": [{
// message 1 (optional)- render actionable message
"payload": {
"message": "render a Actionable message from webhook",
"platform": "kommunicate",
"metadata": {
// replace this with metadata JSON supported by kommunicate
}
}
}, {
// message 2 (optional)- render a text message
"text": {
"text": ["render array of text message from webhook"]
}
}]
}



This JSON will render messages on UI. You can customize this as per your need.



If You still not able to get it working, send your queries at hello@kommunicate.io.


hello@kommunicate.io



PS: I work for Kommunicate.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

HgJd3PxkXJPmM Mm
E5YGStxLt

Popular posts from this blog

Visual Studio Code: How to configure includePath for better IntelliSense results

Spring cloud config client Could not locate PropertySource

Makefile test if variable is not empty