Dialogflow - Business Hours if open or closed - dialogflow-es

I am trying to set the bot to where it will tell users if the business is opened or closed if asked the questions in the intent.
I have training phrases such as: "when do you close, are you open tomorrow, what time do you open tomorrow morning, are you open now, what are your business hours."
I was thinking that there would need to be code in the Fulfillment section that lists the business hours/days so the bot will essentially "scan" it and then spit back the answer to a user. I can't seem to find a tutorial on something that seems to be so basic.
This bot is just a basic bot using Dialogflow Messenger Integration.

Instead of using Fulfillment, you can create an Entity and then create an Intent that uses the entity you just created.
In your case, the entity I created is to have a synonym for the word "close", "open" and "business hours". You may try and create your own based on my sample entity below by following this creation of custom entities documentation.
Next is to create an intent that uses the created entity on the above sample.
On my sample, I used the training phrases you provided on your post. This will automatically detect the entity we earlier defined because we used the words "open", "close", and "business hours" in the training phrases.
Last is to configure the Responses and use the value of theentity we created as a response.
You may refer to this creation of custom intent documentation for complete reference.
Below is the final Dialogflow Messenger Integration sample.

Related

How to handle Dialogflow list response

I am developing an app for Google Assistant using Dialogflow (using Dialogflow online interface, without any external server).
I have a list of products. Each product has an intent which is trained with its product name.
For example if I say "Product 1" the assistant will show me some information about "Product 1".
I also made an intent which lists all the products you can browse. As a response it shows a Google Assistant "List" which displays the names of all the items.
But when I click one of the items, it will type its name("Product 1") but the item name is not recognized and I got the fallback intent.
I though lists could work like suggestion chips but it looks like answers are interpreted differently.
By looking for examples I could only find examples using Dialogflow API from code (https://actions-on-google.github.io/actions-on-google-nodejs/classes/conversation_helper.list.html), and it seems that list answers are handled with a special type of intent.
Is there a way to handle list response directly from Dialogflow online interface ?
It does not handle the List or Carousel interfaces the same way it handles the suggestion chips. As you note - they trigger a special Event, which you're expected to create an Intent for.
There are a number of reasons for this, but one good one is that these tend to be fairly dynamic (they're meant to represent things like search results), so having to manage these with a Session Entity might be more difficult.
You can use the Dialogflow Inline Editor to handle them. This is essentially the same as using a fulfillment server - however Dialogflow handles most of the server management for you.

Can give DialogFlow based chat-bot a name

I would like to give my dialogflow based chat-bot a name, so that when I type Mels it would recognize that I am referring to it. Is there any way to do that??
There are two ways to do it.
Explicit invocation : This way, user has to specifically ask to chat with your chatbot. For example, my chatbot name is "SukhiBot". If user types, "talk to SukhiBot" in GoogleAssistant, then the chatbot is started and it takes care of further conversation.
Implicit invocation : You define a intent specific for the trigger. e.g. if your chatbot is about providing bill/invoice information then you set specific intents with keywords around billing and invoicing. When Dialogflow determines the particular intent from user's text, your chatbot will be invoked. You can set this up in the following screen with Google Assistant.
By invoking your app via google assistant, you should use the invocation phrases. For instance:- "Ok Google, talk to nutrition calculator", in this phrase, nutrition calculator is your app name.
You can set your invocation phrases in the action on google console.
Some helpful resources:-
https://developers.google.com/actions/discovery/

How to clear the session between two consecutive intents?

We are using bot trees master which uses bot graph dialog for loading graph based dialogs dynamically. We have created a scenario to load multiple intents(whose intents scores are nearly matching). Now the problem I am facing is when I request for single intent , I am getting the bot response and able to enter into next intent but when I request for multiple intents bot is giving the response and when I request for another intent , bot is giving the same response of multiple intents. When bot is entering into multiple intent handler it is not clearing the session and not coming out of that handler. I have tried using session.endConversation().
To understand about bot graph dialog:
https://www.microsoft.com/developerblog/2016/11/11/extending-microsofts-bot-framework-with-graph-baseddialogs-/
Can somebody help on this. Thank you
the builder.IntentDialog() used in this project is no longer considered a best practice. Additionally, further support is not expected. Instead, you will want to use bot.Dialog() to create your dialog flows with a .triggerAction(). The trigger matches on phrases which you can set a score to. Unfortunately, it means you will need to recreate the bot-trees project to fit this new model.
You can find information on managing conversations here, including creating triggers.
If you need a more robust system, you can integrate LUIS into your project. Information regarding recognizing intents with LUIS can be found here.

How to ensure my Google Home Assistant application is not rejected?

During our testing, we were unable to complete at least one of the behaviors or actions advertised by your app. Please make sure that a user can complete all core conversational flows listed in your registration information or recommended by your app.
Thank you for submitting your assistant app for review!
During testing, your app was unable to complete a function detailed in the app’s description. The reviewer interacted with the app by saying: “how many iphones were sold in the UK?” and app replied “I didn't get that. Can you try with other question?" and left conversation.
How can I resolve the above point to approve my Google Assistant action skills?
Without seeing the code in question or the intent you think should be handling this in Dialogflow, it is pretty difficult - but we can generalize.
It sounds like you have two issues:
Your fallback intent that generated the "I didn't get that" message is closing the conversation. This means that either the "close conversation" checkbox is checked in Dialogflow, you're using the app.tell() method when you should be using app.ask() instead, or the JSON you're sending back has close conversation set to true.
You don't have an intent to handle the question about how many iPhones were sold in the UK. This could be because you just don't list anything like that as a sample phrase, or the two parameters (the one for object type and the one for location) aren't using entity types that would match.
It means that somewhere, either in your app description or in a Dialogflow intent(they have full access to see what's in your intents) you hinted that “how many iphones were sold in the UK?” would be a valid question. Try changing the description/intents to properly match the restrictions of your app.

Creating Follow Up intent in API.AI

I am trying to create a Chatbot through API.AI. Now my chatbot has a flow and it responds based on the users query. So I have created many Follow up Intents. But my follow up intents are not connecting. It is returning the same respinse for the initial question. Where did i go wrong?
Would help to see what your intent looks like. From what you're saying though, it may be that the previous question is not getting the answer its looking for so it will just continue asking it until it does. Check your entity value under action within your intent.

Resources