except for google assistant app, all of my integrations are responding with static default response instead of custom fulfillment that i hosted on my server. i already checked request and response json from dialogflow to my server, they are fine... when i make request from skype, the response from my server does have the custom fulfillment message but instead the skype is showing static response for skype that i wrote i the default text message tab for my intent. please let me know what i need to do. thanks
Expected Conversation through (Skype) User: some words in english Agent(From Fulfillment): English, this is response is for english
Actual Conversation i am getting: User: some words in english Agent(from dialogflow static text response): Hello.. i am default response from skype
Note this is only happening in facebook messenger, skype(these are the only integrations i've enabled) but not on dialogflow simulator and actions on google simulator.
I think this problem is from dialogflow end because both facebook messenger and skype produce the same behavior
const express = require('express')
const bodyParser = require('body-parser')
const {dialogflow,
Permission,
Suggestions,
Carousel,
BrowseCarouselItem,
BrowseCarousel,
Image,}= require('actions-on-google')
const request = require('request')
const dialogflowapp = dialogflow()
const app = express()
app.use(bodyParser.json())
app.set('port', (process.env.PORT || 5000))
const LANGUAGE_INTENT = 'Languages';
const LANGUAGE_TYPE_ENTITY = 'LanguageType';
dialogflowapp.intent(LANGUAGE_INTENT, (conv) => {
const quote_type = conv.parameters[LANGUAGE_TYPE_ENTITY].toLowerCase();
if (quote_type === "telugu") {
conv.ask("Telugu, This response is for telugu");
} else if (quote_type === "english") {
conv.ask("English, this is response is for english");
} else if (quote_type === "hindi") {
conv.ask("Hindi, this response is for Hindi");
} else {
conv.ask("Cann't understand bro");
}
});
dialogflowapp.catch((conv, error) => {
console.error(error);
conv.ask('Something went wrong!');
});
app.post('/webhook',(req,res, next)=>{
console.log(req.body);
next();
}, dialogflowapp);
app.listen(app.get('port'), function () {
console.log('* Webhook service is listening on port:' + app.get('port'))
The issue is that you're using the actions-on-google library for fulfillment, which only creates results that are valid on the Google Assistant.
If you want to send back a reply that is valid for other Dialogflow integrations, you will need to use the dialogflow-fulfillment library.