Want suggestions in DialogFlow prompt statement - bots

I'm developing dialog flow chatbot, I want to give suggestions in my PROMPT question like Google gives for sign-in, how to do this?
suggestions are simple like "LEFT" and "RIGHT", such kind of static.
This is where I want to show options

This is known as a "quick reply" rich response. Unfortunately, it isn't possible to use rich responses in prompts, as these can only be text.
If you want more flexibility in the way you prompt users for more information, you can use follow-up intents and contexts to handle the logical flow of the conversation.

Related

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.

The words "not working" always trigger the default intent in Google Assistant

I have been working with Google Dialogflow to create a Google Assistant experience.
My GA Action is to Raise Support tickets and those tickets are raised in our system via API.
We ask the user to describe the Issue they are facing, We have used a fallback Intent to capture the Issue/Ticket Description(Since the reply can be any free text, is this the best way to capture free text?).
Once the user gives a description, A webhook is called and the results are sent to our backend to capture.
We have noticed that when the user uses the words "not working" as a part of the issue description, it always calls the welcome intent, instead of going to the follow up Intent. If the user describes the Issue without using those words, it works fine. Below are 2 different responses.
I personally feel that this is a bug in GA, is there any way to solve it?
I think you're doing some things wrong. I don't have enough information to understand 100% what you are doing, but I will try to give you some general advice:
A fallback intent is used to 'fall back' to this intent when a user asks something that is nowhere provided in one of your other intents. That's why your fallback intent has the 'input.unknown' set as action. It will be triggered when the user gives some input that is unknown for your application. F.e. I don't think your '(Pazo) Support Action' will provide an answer if the user asks to book a plane to Iceland, so that's when your fallback intent comes in to give an answer such as 'Sorry, I can't answer that question. Pazo is here to give you support in... What can I do for you?'
Your user can either register a complaint or raise a support ticket if I'm getting this right? I recommend you to make two seperate intents. One to handle the complaints and one to handle the support tickets.
Before developing advanced actions with a seperate webhook and a lot of logic with calling an API etc., I recommend to go through the documentation of Actions on Google:
https://developers.google.com/actions/extending-the-assistant

Dialogflow - handling inputs with multiple intents

I'm designing a helpdesk chatbot in dialogflow and currently training it with existing data from my ticketing system. What is the best practice for handling inputs that contain multiple intents? Here is an example with the intents in bold:
"Hi, my name is John Doe and I'm a first year student. I want to know where to register for classes and also reset my enterprise password. Please help."
So is the solution to ask people to keep things simple up front? I think currently dialogflow will point the user to one of the intents above, but i'm not sure how it decides which intent to match with.
You will probably have one intent for each feature that your bot offers, i.e. RegisterClass, ResetPassword etc. In that case there is no good* way to handle the case where someone asks for two things at once, your users will have to limit themselves to one request at a time. You can however use a fallback intent to explain this at runtime. This intent would be triggered if a users utterances matches none of the other intents and could give the user a quick explanation like
"Sorry, I didn't get that. Please tell me what you would like to do,
e.g. 'register a class' or 'change my password'"
This would keep a natural conversation going and alleviate the need to "train" users specifically for your agent.
*You could of course add combined intents like RegisterClassAndChangePassword, but that would become very clumsy and most likely not work reliably. You could also try to parse the request in your backend, but then you would essentially circumvent Dialogflow's core feature.

Server-side query using events or/and context?

I’m coding a bot using PHP-BotMan for complexity reasons and using Dialogflow query api to extract and manipulate the informations from the response. I saw examples and hints from people here and on dialogflow forum suggesting using context or events, some of them mixing both. What is the better way to handle this?
The flow of the application is:
user messages bot
bot queries (text or/and #event?) dialogflow
internally process a reply or return dialogflow slotfilling* request
text response bot reply user with last reply or asking to fill slot
Also, how can I be sure that a slotfilling process is finished with “actionIncomplete” only having two values, NULL or TRUE? The dialogflow query response doesn’t show wich slotfilling parameters are required or not…
Thanks for the help!!
slotfilling is when dialogflow sends a text response requesting required parameters to finish an intent, adding those replied values to the context
I was trying something similar to your scenario, here are few points i found helpful:
When Slotfitting with webhook, i can't use the "Required" params field since i have to control the input parameters via webhook (query database to provide options). Which means actionIncomplete field is not useful anymore.
I personally prefer to use context as it can add/remove params which gives you more control.
Hence the dialog was designed to use webhook to check all required params before move on to next conversation flow. and pop quick replies menu to ease and restrict possible input from users.
HTH.

Slack bot to pre-format channel responses of structured data input from user

At work we have a Slack channel where each person posts their daily scrum updates. The format is something like this:
Yesterday:
- Did something
- Did something else
Today:
- Did something
- Did something else
Blocks:
- This is blocking my progress
Now, I'm trying to find a way in which I can have this preformatted for my colleagues i.e. like placeholder text in HTML
Is there a way to achieve this in Slack?
The options I have considered so far are as seen here
1. Create a / command on Slack that would respond with this text when a user types /daily and populate the response (I'm not sure about the feasibility of this, I have only created slash commands that triggered an external process, not returned any text to Slack)
2. Create a custom application and integrate with Slack
I realize that the answer to this can be opinionated, and that that is discouraged in the community, but I'm thinking others might also have come across this issue or will, in the future, and the answer is relatively objective here, not purely subjective.
I have been developing a several Slack apps and came across similar requirements. Slack does currently not offer good options for entering structured data in my opinion, so I would recommend to rather use a HTML page with a simple form for entering the data which then automatically posts the update on Slack.
Options with pure Slack
You can use slash commands or a bot to receive the input from your user, but in both cases the user has to enter data command line style and is it not possible to use something like HTML placeholders. Your options are either to use keywords or to have a conversation between the user and the bot. The input is free text and will need to be parsed by your app.
Example for slash commands with keywords:
/daily yesterday "this and that"
/daily today "this and that"
/daily blocks "this and that"
Example for a bot conversation:
#scrumbot daily
"What is your update for yesterday?"
#scrumbot this and that
"What is your update for today"
#scrumbot this and that
etc.
I have been using both approached in my apps, but they are pretty clumsy and not very user friendly for entering larger amount of structured text.
Slack with HTML page
My recommendation would therefor be to rather use a simple HTML form to enter the text and then automatically post the result in the Slack channel. You can either use Sign-in with Slack or let the user click a generated link on Slack to connect a generated HTML page to the correct Slash user. The first offers better security, the later is more user-friendly.
Example:
/daily
"Please click *here* to enter your daily update"
Then a generated HTML page opens in the browser which allows the user to enter his data in a form. After submit the input is posted on Slack in the correct channel
Btw. the Slack team is planning to implement input field for Slack in the future, but this is currently scheduled for mid term, so I would not expect it to be available in the near future. See "Interactive messages Stage 3" on the Slack Plattform Roadmap.
Update September 2017
The Slack team have introduced a new method to enable users to enter structured data called dialogs.
Dialogs are similar to forms in HTML and allow to create modal dialog windows with multiple input field of various types (currently text, textarea, select) within Slack. They can be triggered as response to a slash command or an interactive message (buttons, menus).
The new dialog feature would now be the best choice to get structured input from the user like requested in this question.

Resources