Entities
Words within phrases could have different meanings or values and these are stored in Entities. Dialogflow provides a number of built-in Entities with pre-existing values for things like countries, states, cities, currencies, dates, and more. The user input value is automatically stored in a Dialogflow parameter. A Manychat Custom User Field name that matches a Dialogflow Parameter name means that Janis will store the values you capture with Dialogflow in Manychat. You can populate customer profiles, and use these values to create intelligent conditional responses.
When you add a training phrase to a Dialogflow Intent, it may automatically trigger an Entity, or you can just highlight the word and select an Entity from a list. In this example, just mentioning any country in a training phrase will trigger Dialogflow's built-in @sys.geo-country Entity and create a Parameter in your Dialogflow Intent. A Parameter Name is is the equivalent to a Custom User Field in Manychat.
As long as your Custom User Field name matches the Parameter Name in Dialogflow, the value will automatically get stored in Manychat. If you have already have a Custom User Field in Manychat, just click the Parameter name and you can edit it to match.
In short, Parameters get created in Dialogflow when your training phrases trigger Entities and Parameter Values automatically get stored as Custom User Field values in Manychat when the Parameter name matches your Custom User Field name. Quite simplly, you can use Dialogflow to understand words inside of phrases and use the values to build more intelligent responses in Manychat.
Create your own Custom Entities
You can also create your own Entities. For example, if you have bot that helps users find a job, you might create an Entity and list out all of the types of jobs you can help the user find. When users ask if you have a type of job opening and it's listed as a value in your Entity, you can respond that you can help them find a specific job. If you click into the Entities tab in Dialogflow you can create your own Entities so you can trigger them when adding phrases to Intents.
In this example, a custom Entity was created called job-types and it contains a list of different jobs. If a user is looking for a job, they might say "I'm looking for an accounting job in New York", and if "accounting" is a value in an Entity, it will automatically trigger the Entity when you add the phrase to the Intent.
You'll want to add similar words as values and group them into an Entity and also add synonyms for each value. You might not only have an Entity for different types of jobs, but an Entity for the word "Jobs" itself which can mean different things.
If you create an Intent for job searching and you add phrases you can see how the phrase will trigger the Entities you create.
Assume that we edited the Paramter Name (click the Parameter name in the Parameters table to edit it) to match a Custom User Field name, then as long as the Custom User Field matches your Parameter name in Dialogflow, the values will get stored in Manychat.
Most of the Custom User Fields (You can only save Dialogflow Parameter values to Custom User Fields, not Bot Fields) will be text fields in Manychat, but Janis will convert some of Dialogflow's built-in Entities into various data types in Manychat. Here are some built-in Dialogflow Entities that you trigger and data will be saved in a format that Manychat can work with.
@sys.date-time | Will extract both the date and time in a phrase (i.e. Thursday at 2pm). Create a Custom User Field in Manychat that is a date/time field and that will automatically store the data in Manychat's preferred format. |
@sys.date | Will extract a date in a phrase. This can be ambiguous (i.e. "tonight", or "in 2 weeks" ) or specific like "May 5th", or "Christmas Day". Create a Custom User Field that is a date-type field. |
@sys.number | Will extract a number from a phrase. Create a Custom User Field that is a number-type field to store numbers so you can do numeric conditions in your Flows such as calculations. |
Any Other Entities | If you create Entities or use other Dialogflow built-in Entities like Country and City, save the Parameter values to text-based Custom User Fields |
More Resources
Here are more resources that will help you understand what you can do with Dialogflow Entities and Manychat: