I'm currently testing dialogflow to get to know it a bit more.
Within Google Dialogflow, I have created 2 Carousel cards, named "City" and "Country". The item titles also have "City" and "Country".
I also created 2 Intents named "_City" and _Country. Intent "_City" contains the name "City" as a Training phrases (without any Action and Parameter). Intent "_Country" contains the "Country" as a Training phrases.
If I test the flow on Google Assistant (on actions.google.com or the Google Assistant app on my smart devices), I touched the City Carousel Card and it responds with "City".
I expected that the Intent "_City" with pick this up, but instead, Google Assistant response with "I do not understand". The same with the "Country" card.
Does somebody know how an Intent will pick up the response of a Carousel card?
If I use a basic card and add some Suggestion Chips, Google Assistant will pick up the response and the Intent will handle it correct.
A carousel response behaves slightly different from other responses. It is not going to be the same as text. Rather, you need to handle the actions_intent_OPTION event in Dialogflow and pass that to your fulfillment.
app.intent('Carousel - OPTION', (conv, params, option) => {
const SELECTED_ITEM_RESPONSES = {
'SELECTION_KEY_ONE': 'You selected the first item',
'SELECTION_KEY_GOOGLE_HOME': 'You selected the Google Home!',
'SELECTION_KEY_GOOGLE_PIXEL': 'You selected the Google Pixel!',
};
conv.ask(SELECTED_ITEM_RESPONSES[option]);
conv.ask('Which response would you like to see next?');
});
Related
We are trying to implement chatbot using Google dialog flow. Created 2 intents (movies & purchases) as below.
And created 2 Entities (Movies & Purchases as below).
When I tested it with 'I cannot watch my purchased movie', it is detecting 'movies' intent and it is detecting only one entity 'movies'. It is not detecting 'purchases' entity even though the word 'purchased' is in the user entered text.
Can any one please let me know how to make sure that dialog flow detects all the entities present in the user entered text and also why it is detecting 'movies' intent as 'purchases' intent also have the training phrases that can match the user entered text.
In the image of your conversation in Dialogflow it shows that Dialogflow matched the user phrase to the movie intent. In your movie intent setup you have setup only 1 parameter,
movies. Dialogflow will only recognize one entity because you have setup the intent to only look for 1 entity.
If you want the movie intent to be able to recognize both entities you should add a phrase that contains both a movies and a purchase intent and make sure both entities are available in the Actions and Parameters section of your intent.
Here is a quick example that detects a gender and an age category entity.
I am trying to create a pizza ordering bot and also it allow the user to modify the order like "Add item" , "remove item" and modify the quantity of the existing order.
My order was taken successful, but I am unable to call modify intent based on the user utterances.
I also want the email ID from the device or any other unique ID to recognize the user.(Using dialog-flow fulfillment's).
Flow:
Step 1: welcome intent => then ordering pizza intent (ask for type/quantity/toppings) => then order confirm intent.
Step 2: User says "confirm order" it will display order and confirmed. At this session "update-Order", "add-item", "remove-item" these three context will be active. Based on the user utterance the intent will called. But its not working it went to default fallback intent. When I say modify order it's not going to update-order intent
I have an intent that is triggering the fulfillment logic which based on the extracted entities and intent name should decide which text and which custom payload should be returned to the client. Example:
intent A(to fulfillment): I want to buy some eggs(entity)
fulfillment:
if we_have_eggs_in_store
go to intent A
else
go to intent B
intent A: How many eggs you want?
intent B: We currently don't have any eggs in our store...
constraints:
1. I don't want to store the response text in the fulfillment
2. I want to pass custom payload back to the client
Is this possible to achieve with the Dialogflow?
I have a certain Intent set-up on Google Dialogflow which matches employee leave-status by a very specific single-word keyword. For example, if the user types "Submitted", it shows that the description stating leave has been in submitted status.
However, when the exact same keyword is selected from a List View of Google Assistant, dialogflow is not able to match the intent.
How is it possible that the same keyword does not match Intent when clicked from a List View, but the same query works in Plain Text?
When a list item(or carousel card) is tapped, it generates an event which will hit your webhook, unlike the simple text message.
1st way (if your webhook handling the response)
So you need to handle it in your code.
Generally, it should have intent as actions_intent_OPTION. from there you need to segregate it.
2nd way (if your code is not handling the response)
In this way, your intent must be able to handle actions_intent_OPTION event generated by the list(or carousel).
for that, your intent need to add the event as shown in below image (Basically it tells the dialogflow that whenever the actions_intent_OPTION events triggered, this intent it capable to handle it, but currently in your case no intent matches the description and it's going to Default Fallback Intent)
So whenever the list item tapped it can handle the flow.
For more refer this documentation.
I have created a chatbot using dialogflow using four intents and I am passing contexts form one intent to another intents .
welcome intent
GetName intent
GetEmail intent
GetDOB intent
I wanted to know how to call fallback intent if user entered wrong name. It should call GetNameFallback intent , for wrong email it should call GetEmailFallback intent. For wrong DOB it should call GetDOBFallback intent.
For each specific intent it should call its specific Fallback intents
Here is the list of contexts I am passing:
(welcome intent) - output context : awaiting_name
(GetName intent ) input context : awaiting_name and output context : awaiting_email
(GetEmail intent ) input context : awaiting_email and output context : awaiting_dob
(GetDOB intent ) input context : awaiting_dob
From the Dialogflow docs: "When you create an agent, the Default Fallback Intent is automatically configured with a variety of static text responses, like "I didn't get that. Can you say it again?" and "Sorry, what was that?" This intent is matched when your user's input does not match any other intent; in other words, it's a kind of catch-all for any unrecognized user input.
For example, say that your agent has only one custom intent named weather that recognizes user input like "What is the weather today?" or "Forecast tomorrow". If a user speaking to your agent says "I like the color purple", your Default Fallback Intent is matched because the agent isn't able to match the input to the weather intent."
Based on that information, you might try training your agent to match an incorrect name / email to an intent like Fallback Intent - Name or Fallback Intent - Email, where those intents reprompt the user for the name again.
Without seeing your fulfillment code, it's hard to say for sure whether or not this strategy will work. If you update your question to include your current fulfillment code, you might get a more relevant answer.