Stop dialogflow from sending a response - javascript

Is there a way to stop dialogflow from replying any of the responses added in the dialogflow console using the nodejs SDK?
I have created a few intents, which have each their own responses. Now I want to add a sort of handover functionality through a fulfillment webhook.
Basically it should work like this: when the user asks for a human to chat, the API stores the session and any new call should check if the session is marked as "waiting for human". If it is, then no reply should be send by dialogflow any longer. In this way, the human can chat without interruptions. If the session is not marked, then a the regular responses should be sent. So here's the question: how can I avoid dialogflow from sending any of the responses without moving the responses to the API?
Thank you in advance

Related

Is it possible to store the facebook page post in cloud firestore?

I wanted to know is it possible to store the Facebook page post whenever a new post is created I wanted to store in a Firestore. like I will provide an endpoint and then whenever a new post is posted then it's response will be sent on that endpoint so i can easily store the posts in the Firestone. because i wanted to automate the comment reply to the users.
Webhooks are what you are looking for.
https://developers.facebook.com/docs/graph-api/webhooks
Webhooks allows you to receive real-time HTTP notifications of changes to specific objects in the Facebook Social Graph. For example, we could send you a notification when any of your app Users change their email address or whenever they comment on your Facebook Page. This prevents you from having to query the Graph API for changes to objects that may or may not have happened, and helps you avoid reaching your rate limit.

How to integrate a chatbot webhook with a web-based chat window?

I want to develop a web-based chat conversation. I have a Dialogflow webhook that is up and running and that can be easily integrated with, say, facebook messenger or whatsapp, thanks to the functionalities of Dialogflow itself.
Now, say I want to have a web-based chat plugin that I want to interact with said Dialogflow webhook. How does that work, in terms of setup? There are things I know I need, I would like your help to identify things that are still missing and to help me put them all together (conceptually).
I need something to make the chat conversation look pretty; I was hoping there would be some chat plugin online to style messages but the things I could find are always more complicated than that and have functionalities for you to set messages for the plugin to send automatically and things like that.
I need something that is triggered when the user sends a message; when the user sends a message I need to send it to Dialogflow in order to have it fulfilled. Can this be done directly from JS? Or do I have to send some request to my server, which will then call Dialogflow and return the user message?
Is this all I need? I am sorry if this question is too confusing or broad, I'll be glad to give further clarifications as needed.
I think you need this.
https://cloud.google.com/dialogflow/docs/quick/api#detect-intent-text-nodejs
When you use the API for interactions, your service interacts directly with the end-user. For each conversational turn, your service sends end-user expressions to Dialogflow by calling the detectIntent or streamingDetectIntent method of the Sessions type. Dialogflow responds with information about the matched intent, the action, the parameters, and the response defined for the intent. Your service performs actions as needed (for example, database queries or external API calls) and sends a message to the end-user.
It just API interaction with your chat client, you can design the way you want.

Dialogflow Send message without user intent

Looking to find a way to make dialogflow send a message to the user every x minutes,
without any intent or user action required.
is there a way to do this? maybe making a custom event?
If someoneone could explain if this is possible that be great.
im also using nodejs for my bot.
No, this isn't possible. Dialogflow is designed for conversational exchanges.
Dialogflow is a NLP engine, It's designed to respond to the user input(either a text input, or an event request).
One way to do resolve this issue is, from the Client side run a thread that will send event request asynchronously after every x minutes, and the bot will reply with a message.
Visit https://dialogflow.com/docs/events/custom-events for more information.
Please reply if you need any more information/example on this.
As #Prisoner said it isn't possible to do with dialogflow itself but you can look into assistant push notifications where you can get permission from user to send notifications and if user allow then you can send notification periodically. You can find more in docs.

Is there any way to return a response from XMPP after sending a message?

When I send a message to a XMPP openfire user, I need a response of the particular user's activity. Like if he/she saw the message or not, typing a message for me or not etc. I am using Monitoring Service plugin of openfire, so I can get all chat history from there, i need to know about receiver activity about that particular message or conversation.
Now I am using strophe.js to handle all my requests and responses in my web page.
Is there any way with their plugins(like strophe) to make this..?
Can any one help me to solve this problem, i am new to XMPP openfire server.
thanks,
biswajit
XEP-0184: Message Delivery Receipts - http://xmpp.org/extensions/xep-0184.html
XEP-0085: Chat State Notifications - http://xmpp.org/extensions/xep-0085.html

It is possible to send a message to a specific user (selective push notification) using nowjs and node.js

I have a group a users, all connected to a single server, and I want to send a message from one user to another user, with the receiving user not having to accept any sort of a request from the originating message. So I am trying to use nowjs for this, where I would simply broadcast the msg meant for a specific user, and only the required user would accept it. In short I need to send something like a selective push notification. Do you think this approach of broadcasting is a good idea, as I think I will have max 300 users at once, and if not do have any others suggestions how I can implement this. Thanks in advance.

Categories

Resources