*Entity types* are used to control how data from end-user input is extracted.

<br />

Dialogflow CX provides predefined
[system entities](https://docs.cloud.google.com/dialogflow/cx/docs/concept/entity-system)
that can match many common types of data.
For example, there are system entities for matching dates,
times, colors, email addresses, and so on.
You can also create your own
[custom entities](https://docs.cloud.google.com/dialogflow/cx/docs/concept/entity-custom)
for matching custom data.
For example,
you could define a vegetable entity
that can match the types of vegetables available
for purchase with a grocery store agent.

## Entity terminology

The term *entity* is used in this documentation and in the Dialogflow CX console
to describe the general concept of entities.
When discussing entity details,
it's important to understand more specific terms:

- **Entity type** :
  Defines the type of information you want to extract from user input.
  For example, *vegetable* could be the display name of an entity type.
  Clicking **Create** from the **Entity Types** section
  of the Dialogflow CX console creates an *entity type* .
  When using the API,
  the term *entity type* refers to the `EntityType` type.


  <button class="devsite-dialog-button cloud-button cloud-button--primary" style="display: block; padding: 10px; margin-top: 10px; margin-bottom: 10px;" data-modal-dialog-id="cx-agent-reference-dialog-EntityType">Go to the EntityType API reference</button>

  **Select a protocol and version for the EntityType reference:**

  | Protocol | V3 | V3beta1 |
  |---|---|---|
  | REST | [EntityType resource](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.entityTypes) | [EntityType resource](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/projects.locations.agents.entityTypes) |
  | RPC | [EntityType interface](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#google.cloud.dialogflow.cx.v3.EntityTypes) | [EntityType interface](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3beta1#google.cloud.dialogflow.cx.v3beta1.EntityTypes) |
  | C++ | [EntityTypesClient](https://googleapis.dev/cpp/google-cloud-dialogflow_cx/latest/classgoogle_1_1cloud_1_1dialogflow__cx_1_1EntityTypesClient.html) | Not available |
  | C# | [EntityTypesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.EntityTypesClient) | Not available |
  | Go | [EntityTypesClient](https://docs.cloud.google.com/go/docs/reference/cloud.google.com/go/dialogflow/latest/cx/apiv3#cloud_google_com_go_dialogflow_cx_apiv3_EntityTypesClient) | Not available |
  | Java | [EntityTypesClient](https://docs.cloud.google.com/java/docs/reference/google-cloud-dialogflow-cx/latest/com.google.cloud.dialogflow.cx.v3.EntityTypesClient) | [EntityTypesClient](https://docs.cloud.google.com/java/docs/reference/google-cloud-dialogflow-cx/latest/com.google.cloud.dialogflow.cx.v3beta1.EntityTypesClient) |
  | Node.js | [EntityTypesClient](https://googleapis.dev/nodejs/dialogflow-cx/latest/v3.EntityTypesClient.html) | [EntityTypesClient](https://googleapis.dev/nodejs/dialogflow-cx/latest/v3beta1.EntityTypesClient.html) |
  | PHP | Not available | Not available |
  | Python | [EntityTypesClient](https://docs.cloud.google.com/python/docs/reference/dialogflow-cx/latest/google.cloud.dialogflowcx_v3.services.entity_types.EntityTypesClient) | [EntityTypesClient](https://docs.cloud.google.com/python/docs/reference/dialogflow-cx/latest/google.cloud.dialogflowcx_v3beta1.services.entity_types.EntityTypesClient) |
  | Ruby | Not available | Not available |

  <button class="devsite-dialog-close">Close</button>

  <br />

- **(Optional) Description**: Describes the purpose of the entity type, for
  example "This entity is triggered when the user mentions a vegetable". If
  you intend to use AI generation to auto-generate reference value synonyms,
  this field will be used by the model to produce higher-quality results.

- **Entity entry** :
  For each entity type, there can be many *entity entries* . Each entity entry
  provides a set of words or phrases that are considered equivalent, a
  *reference value* in the first column and one or more *synonyms* to that
  reference value in the second column. For example, if *vegetable* is an
  entity type, you could define these entity entries:

  | Reference value | Synonyms |
  |---|---|
  | scallion | scallion, green onion |
  | bell pepper | bell pepper, sweet pepper |
  | carrot | carrot |
  | potato | potato, tater, tuber |

  Instead of entering entity entries and synonyms manually, you can select
  the **Auto-generate __ syonyms per entity** checkbox when you create a new
  entity entry. The default value is 3 synonyms. The AI will generate synonyms
  based on the reference value and entity type description and enter them in
  the table. Please note that the synonyms list must also include the
  original reference value in order to produce a match to that value.

  When editing an entity type from the Dialogflow CX console, each row of the
  display is an *entity entry* . When using the API,
  the term *entity entry* refers to the
  `Entity` type (`EntityType.Entity` or `EntityType_Entity`
  for some client library languages).
- **Entity reference value and synonyms** :
  Some entity entries have multiple words or phrases
  that are considered equivalent,
  like the *scallion* in previous example.
  For these entity entries, you provide one *reference value*
  and one or more *synonyms*.