I've been studying Dialogflow and have now started studying Actions on Google with the desire to build assistant actions. As I read about the system data types found in the Actions on Google Actions Builder I seem to see only a few types:
while when I look in Dialogflow and look at System Entities I seem to see many more than those exposed by Actions on Google.
Currently, I have a need to recognize a person's name. An example phrase would be:
I'd like to book the class taught by
Brandon
In Dialogflow, I'd define the intent parameter as being of @sys.person
. I don't seem to have that option in Actions on Google and would appear to have to build my own data type.
Is there a reason that the rich set of system defined data types for Dialogflow aren't exposed for Actions on Google using the Actions Builder? What is the recommended approach to define a type that would otherwise be a system type in Dialogflow?
The biggest reason, likely, is that they were either sparsely used or too complicated to be effective. For example, @sys.person
is documented as
Common given names, last names or their combinations
(Emphasis mine.) But there are plenty of people with "uncommon" names, that would not be captured, so it is not actually useful in a number of cases. A surprisingly large number of cases in reality.
Under Actions Builder, you can create a custom type that either enumerates the possible values (which would be best for your example) or free-form text. (Or combine the two.)
If you are concerned with needing to update your Action with new names, it may make sense to make a generic type and then have the values for that type updated at runtime. This can make for a much more dynamic and flexible Action.