Dialogflow query working in console but not when you use embedded url - dialogflow-es

I have made a query flow in dialogflow and it has four intent and in the last intent it uses a webhook to get data from server side and displays the result. It is trained automatically and works perfectly in dialogflow console returning response and query answer. The issue is it does not work when I use embedded url. It fails to recognize the name intent and asks (Can you repeat again or fallback intent). I've removed all intents and made query again, there is no similar name intents. Yet it works well in console and not in embedded url.
For the webhook part I've used node.js service.
Please help in this issue.

By 'embedded url' if you mean Dialogflow Web Demo (DWD), you should keep in mind that DWD can be used only for simple text messages. It does not support messages from webhook or even rich responses. However, if you steel need a web widget to embed your bot to your webpage you either create your own or you should use third party solutions (like Kommunicate). Here's the link regarding the limitations of DWD.

Related

Do we need webhook when our server is interacting with dialogflow?

We are implementing our customized chatbot using dialog flow. When user enters any text, our javascript code sends this text to our python server and the server interacts with google dialog flow and server gets complete response. I just have couple of questions as below.
When server gets the response from dialog flow, it will process the
response and sends some response to UI. Do we still need to have
fulfillment enabled as our server is getting response? Basically if
server is interacting with dialog flow and getting response, what is
the use of webhook?
Is there anyway to enforce the dialog flow intents require at least
one of entities? I went through Can I make Dialogflow intents require atleast one of the trained entities? which says to enable webhook fulfillment for that intent and if no entities were provided, re prompt the user for at least one of a list of entities. So in my case, if webhook is not needed, do I need to do it in the server once server receives response or is there anyway dialog flow will automatically enforce the condition with out server taking the responsibility?
In your case, no, you don't need to use webhook fulfillment.
You may still wish to use it, however, if you want to separate business logic (which would be in the webhook) from UI/UX logic (which would be in your python server and in the javascript client). But there is no requirement that you separate things this way.
Similarly, you can use your python code to enforce "at least one of" the parameters matching - you're moving that logic from the webhook into your existing server.
Either way, this is a bit kludgy. One alternative if you have different entity types is to have multiple Intents, one for each possible type, and to mark the parameter as required. This way the Intent will only match if the parameter is provided. If you then need to report each of these Intents as the "same" Intent, you can add that logic to your python code.

How to use custom payload in dialogflow to create quick replies on web integration

I am currently trying to add functionality to my chatbot by allowing it to have quick replies (buttons for the user to click on) when certain questions are raised by the user. However, the implementation on web is not as straightforward as FB messenger/telegram where quick replies can just be keyed in.
After some research it seems like using the custom payload option when selecting a response on dialogflow seems to be the only viable option but I have no idea on the type of code/ format that should be input.

Connecting Alexa to my own NodeJS back-end

I'm back again with a question about NLP. I made my own back-end, which on one side can connect to websites, the Google Assistant and Facebook Messenger, and on the other end to Dialogflow. On the side, is logs interactions and does some other database stuff.
Now, I'm trying to connect this back-end to Alexa. I made a project which calls my endpoint. This project has one intent, which has a paramater which should get the raw user input, send it to my back-end, process it, parse and send the response to get back. I feel like there is not a real way to collect and send the raw user input, so I can process it myself (on Dialogflow) instead of using the Amazon way of mapping intents and such.
I know Dialogflow can export to Alexa, but this is not an option for me. I really hope one of you can point me in the right direction.
I just need a way to collect the raw user input, and respond in an Alexa accepted response format.
For Actions on Google for example, I'm using a Custom Project Action Package.
Thanks a lot in advace!
To accept or get any user input, you can use sys.any in google assistant and AMAZON.SearchQuery in AMAZON ALEXA.
In Alexa, You have to add the carrier phrase to use AMAZON.SearchQuery. You can't combine any other slot with AMAZON.SearchQuery.
So there are also some limitations. I hope this answer will help you.

Why Dialogflow doesn't work as expected for **alpha/beta** testers?

I am working on dialogflow and actions on Google for Google assistant integration. I have been working on it from last few months, I created dialogflow agent made required changes and setting in actions on Google as well. I used to test each and every day after implementing new features to my app (using Webhook) and found everything well before submitting to apha/beta approval. After completing my work with the app, I just submitted it for alpha/beta approval to Google and they approved it. At this point I just sent the opt in link(provided by actions on Google for alpha users for testing purpose) to the alpha testers. But unfortunately nothing is working as expected. After analyzing I found that all the parameters are always empty in the webhook request sent from dialogflow and intent didn't match as expected. But for me (developer or owner) it works fine, I mean to say alpha/beta versions are not working. The parameters should have the values of matched entity synonyms that have been added/loaded to dialogflow dynamically via dialogflow V2 APIs. It is working fine with owner account or developer account, But not with alpha/beta release.
While checking via postman if the entities gets loaded to dialogflow or not i found entities were loaded successfully to dialogflow with the same dialoflow V2 api, But due some reasons webhook request always sends empty strings for parameters.
Can any one have any idea why is this happening, And what is the solution for this issue?
Thanks in advance.
I have faced the same issue. And I found that my google actions are in deploying state and I have tried to test it with an opt-in link. But After a few hours, it is deployed properly and my custom google actions worked fine. And you also need to do alpha testing enabled in your mobile from an opt-in link.

How to create a chatbot with facebook messenger like templates

I'm trying to create a chatbot for use in a chat app I've created. I basically need the chatbot to send me replies that have message templates like in facebook messenger. For example, If I type in "what's the weather like", I want my chatbot's reply to look like facebook's media template, linked here: Media Template
Does anyone have any tutorials or links I can follow?
Thank you in advance.
Cheers!
Usavaully work flow of chat application as follows,
Message providers(Facebook, twitter,slack etc..) receives messages from user
Message is sent to the configured endpoint(your webserver) according to the settings provided in the face book developer page reference
In the webserver you classify the intent prepares the response according to the request and sends the responses back.
So in the 3rd point web server you give responses based on the platform you are responding to reference, since in your case it's your own platform you need to design your own UI based on the response format or you can use some predefined html templates.
I hope answer gave some direction to work on.

Resources