Dialogflow sys.location to detect full address (?) - dialogflow-es

I cant find a why to handle this situation:
Agent: Tell me your address
User Via j.f. Kennedy, Padova
in my weebhook I would like to receive something like:
{city:"Padova", streets:"Via John Fitzgerald Kennedy"}
instead of the value of the street detect by dialogflow using sys.location:
{city:"Padova", streets:"Via j.f Kennedy"}
My goal is to have the full name of the streets in my weebhook, I read https://cloud.google.com/dialogflow-enterprise/docs/reference/system-entities but I dont find help to my problem. If its not possible handle this with diaolog flow theres another way?

as said by sid8491, in dialogflow it isn't possible, you need to use a weebhook to pass the address that you are getting from the user to an API, I had the same issue and here in France, the government has an API which list all the addresses in France. If the address isn't known, the API return a list of the most matching addresses.
Often postal compagnies have this kind of API

Related

how to get destination info(bank and card details) on stripe

Let's say I'm getting payouts information https://stripe.com/docs/api/payouts/list
I want to get the destination info, so if we take the example from the docs:
I want the details from that destination, I don't mean the specific details like the exact credit card number, but the info when going on the page itself, this one:
It's not working listing the banks accounts https://stripe.com/docs/api/customer_bank_accounts/list , I'm getting zero results when list them all
I'm using Golang library but I think this solution can be solved by others programming languages
I'm also using expandable fields but I get blank results on bank_account and card details
what is interesting however, is when debugging the page, they make request to v1/payouts/{id} with expand[]: balance_transaction and the returned data contains the bank information, but when I do it with their API, that info is not returned back
The Payout destination is expandable, meaning you can have it replaced with the full object by sending you request with expand[]=destination or for a list command data.destination.

Is there a way to show dynamic suggestion chips in dialogflow or dynamic list response?

I am trying to show stores to the user, but that stores need to be dynamic and should come from the database according to the user's current location.
User at Location1
user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location1, these are the stores near you.
Store1, Store2, Store3 (Suggestion Chips)
suppose if tomorrow the user is at a different location and ask the same question then he should be able to see other stores.
User at Location2
user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location2, these are the stores near you.
Store4, Store5, Store6 (Suggestion Chips)
I want to show these stores dynamically according to the user's location, in the form of suggestion chips, or in the form of list response.
Are you using a webhook? That would be the standard way of doing anything dynamic.
This codelab shows how to use the Dialogflow inline editor for dynamic responses.
You can use standard JavaScript to implement your decision logic and return dynamic suggestion chips.
If you want to get the users location, you need to use Permissions, there are neat helpers for that as well.
If you have more information on what you have tried so far, we can help you with more specific resources.

How do i set else case in Dialogflow intent for Google Actions

I am new in google action and I am trying to implement google action for my aquarium shop app
And I need to response for delivery available location queries
so I added available city details in Training phrases but my problem is if anyone asked with any counter name it is responding delivery is available in $geo-country but I need to replay if $geo-countery is not India then sorry, we don't provide delivery in geo-country How to do this?
Making an else case through the UI in Dialogflow isn't the easiest way. The easiest way to show different result for certain types of values would be to use fullfillments. With fullfillments you can handle the interaction of an intent through code. For small projects Dialogflow provides a code editor in which you can put an if statement that would show a different response for this intent.
An example of how to setup an intent which works with parameter input using fullfillments can be found here
Using the inline editor you can write logic that will check if user mentioned India as a parameter for your intent and then change the response to what you want.
The best way I found to create and if/ else type of response in dialogflow is by using sys:any specially if you already have an entity defined. Just create for example
Phrase: Do you deliver in Canada and mark canada with an entity so all of the values in that entity will be matched as valid delivery countries.
then create another phrase: Do you deliver in India and mark india with the sys:any entity. Indicating that any other value outside of your entity values will be a non valid parameter.
Then create two text responses. One will say yes we deliver in $parameter-name and the other will say no we dont deliver to $parameter-name
$parameter-name = the name you want to use for your variables.
Hopes this help

Dialogflow, Maps Agent - how to get lat/long?

Dialogflow offers a pre-built agent called "Maps" that helps to catch the location from user's statement. This Maps intent resolves the location and returns data such as
City name (when I search for Google, Chicago)
Business name (when I search for Chennai)
subdomain-area (when I search for "where is saidapet")
admin-area (when I search for Schaumburg)
What is the logic behind this Agent?
Is there any schema defined anywhere so that I know which field to expect for a given search?
Is it possible to get lat/long part of this response?
Appreciate any thoughts.
When you use one of these prebuilt agents, you are basically creating a new agent of your own based on a Google-provided samplete/template. Click on the intent definitions and you’ll see what parameter names they map things to. You can also change these names, add parameters, remove parameters, edit the list of example utterances, etc. What you don’t get is example fulfillment code - your on your own to do something useful with the intents Google has provided in these samples.

API.AI with google assistant - phone number capture problems

We are trying to capture a phone number. Actually many other numbers, like amounts, zip, etc. We are using Google Home.
The below urls are JSON payloads we received on the fulfillment side. The entity name is TheNumber.
One JSON is when we setup the entity as #sys.number the other JSON when it was #sys.phone-number.
https://s3.amazonaws.com/xapp-bela/gh/number-test.json
https://s3.amazonaws.com/xapp-bela/gh/phone-number-test.json
The first problem is that the google assistant is really struggling to recognize number sequences, like phone numbers or zip codes. But even when it gets it right (according to the originalRequest in the JSON payload), the entity still has the wrong value when it arrives to the fulfillment side.
I guess my question is what am I doing wrong? Is anybody seeing the same problems?
Not sure this will help since this is more about talking to the Google Home device but.... I too was having a similar issue with a long number. If you use #sys.number-sequence as part of your Intent's context, this will allow you to recite much longer numbers without the device interrupting you. In your NodeJS code, you can grab the argument for that number-sequence for use in your Google Home agent.
if (assistant.getArgument('number-sequence') != null) { <do something> }

Resources