Algunos productos y funciones están en proceso de cambiar de nombre. Las funciones de flujo y de la guía generativa también se migrarán a una sola consola consolidada. Consulta los detalles.
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Puedes crear entidades personalizadas para los datos de coincidencia específicos de tu agente.
Por ejemplo, podrías definir un tipo de entidad vegetable (verdura) que detecte coincidencias con los tipos de verduras que se pueden comprar mediante un agente de supermercado.
Crea entidades personalizadas
Para crear una entidad personalizada, haz lo siguiente:
Los nombres visibles de los tipos de entidades personalizadas son únicos para cada agente.
Además, deben comenzar con una letra y pueden contener lo siguiente: A-Z, a-z, 0-9, _ (guion bajo), - (guion).
Los valores de referencia y sinónimo de entidad no tienen esa limitación.
Importa y exporta entidades personalizadas
Puedes importar y exportar entidades para compartirlas entre agentes.
Una de las opciones de formato de exportación es el paquete Json, que es un archivo zip que contiene una jerarquía de directorios y archivos JSON.
A continuación, se describe la estructura del directorio:
entityTypes: Este directorio contiene tus tipos de entidades.
<entity type name>: Existe uno o más de estos directorios, y los nombres de los directorios corresponden a los nombres visibles de los tipos de entidades.
entities: Este directorio contiene archivos de entrada de entidades.
<language tag>.json: Existe uno o más de estos archivos, y los nombres de los archivos corresponden a etiquetas de idioma.
Cada archivo contiene entradas de entidades específicas para cada idioma.
<excludedPhrases>: Este directorio contiene archivos de frases excluidas.
<language tag>.json: Existe uno o más de estos archivos, y los nombres de los archivos corresponden a etiquetas de idioma.
Cada archivo contiene exclusiones de frases específicas para cada idioma.
<entity type name>.json: Este nombre de archivo corresponde a un nombre visible de tipo de entidad.
El archivo contiene datos específicos del tipo de entidad que no se encuentran en otros archivos.
Cuando importes tipos de entidades, es posible que haya conflictos de combinación si el nombre visible de un tipo de entidad en tu agente existente coincide con el de un tipo de entidad importado.
Puedes controlar el comportamiento de combinación cuando los nombres visibles de los tipos de entidades coinciden. Para ello, selecciona una de las siguientes opciones:
Reemplazar tipos de entidades existentes: Un tipo de entidad importado reemplaza cualquier tipo de entidad con el mismo nombre en tu agente existente.
Combinar con tipos de entidades existentes: Las entradas de entidad de un tipo de entidad importado se agregan al tipo de entidad existente.
Si existen las mismas entradas de entidades, no se duplicarán y se combinarán los sinónimos que se encuentren debajo de ellas.
Cambiar el nombre y, luego, importar como nuevos tipos de entidades:
Se cambia el nombre del tipo de entidad importado agregando "_1" al nombre visible.
Omitir los tipos de entidades: El tipo de entidad existente no se modifica y se ignora el tipo de entidad importado.
Sigue estos pasos para exportar tipos de entidades:
Selecciona el comportamiento de la fuente y la combinación.
Haz clic en Enviar.
Importa entradas de entidades
Puedes importar entradas de entidad a un tipo de entidad existente.
El formato de archivo que se usa para importar entradas de entidades es el mismo que el que se usa para importar tipos de entidades. Sin embargo, el archivo de importación solo puede contener 1 tipo de entidad, y todas las entradas que se encuentren en él se importarán al tipo de entidad seleccionado.
Si existen las mismas entradas de entidades, no se duplicarán y se combinarán los sinónimos que se encuentren debajo de ellas.
Sigue estos pasos para importar entradas de entidades para un tipo de entidad:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eCustom entities can be created to match data specific to your agent, such as defining a \u003ccode\u003evegetable\u003c/code\u003e entity for a grocery store agent.\u003c/p\u003e\n"],["\u003cp\u003eEntities should be defined before adding training phrases to intents, though they can be manually annotated afterward if necessary.\u003c/p\u003e\n"],["\u003cp\u003eThe Dialogflow CX console or the \u003ccode\u003eEntityType\u003c/code\u003e API's \u003ccode\u003ecreate\u003c/code\u003e method can be used to create custom entities by providing entity data.\u003c/p\u003e\n"],["\u003cp\u003eCustom entities can be exported and imported in various formats, including JSON packages, which facilitates sharing across agents.\u003c/p\u003e\n"],["\u003cp\u003eWhen importing entities, merge conflicts can occur, and you can decide whether to replace, merge, rename, or skip existing entity types based on display name matches.\u003c/p\u003e\n"]]],[],null,["# Custom entities\n\nYou can create custom entities for matching data specific to your agent.\nFor example, you could define a `vegetable` entity type\nthat can match the types of vegetables\navailable for purchase with a grocery store agent.\n| **Note:** When building your agent, it's best to define your entities prior to adding [training phrases](/dialogflow/cx/docs/concept/intent#tp) to your intents. The console will automatically annotate your training phrases with existing entities. However, if you create entities after training phrases, you can manually annotate the phrases.\n\nCreate custom entities\n----------------------\n\nTo create a custom entity: \n\n### Console\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Select the **Manage** tab.\n5. Click **Entity Types**.\n6. Click **Create**.\n7. Enter entity data.\n8. Click **Save**.\n\n### API\n\nUse the `EntityType`'s `create` method.\n\n\nGo to the EntityType API reference \n**Select a protocol and version for the EntityType reference:**\n\nClose\n\n\u003cbr /\u003e\n\nLimitations\n-----------\n\nThe following limitations apply:\n\n- Custom entity type display names are unique for each agent. Entity type display names should start with a letter and can contain the following: `A-Z`, `a-z`, `0-9`, `_` (underscore), `-` (dash). Entity reference and synonym values have no such limitation.\n\nExport and import custom entities\n---------------------------------\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nYou can export and import entities for sharing across agents.\n\nOne of the export format options is Json package,\nwhich is a zip file that contains a hierarchy\nof directories and JSON files.\nThe following describes the directory structure:\n\n- `entityTypes`: This directory contains your entity types.\n - `\u003centity type name\u003e`: One or more of these directories exist, and the directory names correspond to entity type display names.\n - `entities`: This directory contains entity entry files.\n - `\u003clanguage tag\u003e.json`: One or more of these files exist, and the file names correspond to language tags. Each file contains language-specific entity entries.\n - `\u003cexcludedPhrases\u003e`: This directory contains [excluded phrase](/dialogflow/cx/docs/concept/entity-options#exclusion) files.\n - `\u003clanguage tag\u003e.json`: One or more of these files exist, and the file names correspond to language tags. Each file contains language-specific phrase exclusions.\n - `\u003centity type name\u003e.json`: This filename corresponds to an entity type display name. The file contains entity-type-specific data not found in other files.\n\nFor example: \n\n```\nfolder entityTypes\n ⤷ folder Entity Type A\n ⤷ folder entities\n ⤷ insert_drive_file en.json\n ⤷ insert_drive_file en-gb.json\n ⤷ insert_drive_file en-ca.json\n ⤷ folder excludedPhrases\n ⤷ insert_drive_file en.json\n ⤷ insert_drive_file en-gb.json\n ⤷ insert_drive_file en-ca.json\n ⤷ insert_drive_file Entity Type A.json\n ⤷ folder Entity Type B\n ⤷ folder entities\n ⤷ insert_drive_file en.json\n ⤷ insert_drive_file en-gb.json\n ⤷ insert_drive_file en-ca.json\n ⤷ folder excludedPhrases\n ⤷ insert_drive_file en.json\n ⤷ insert_drive_file en-gb.json\n ⤷ insert_drive_file en-ca.json\n ⤷ insert_drive_file Entity Type B.json\n```\n\nWhen importing entity types,\nthere may be merge conflicts when the display name of an\nentity type in your existing agent matches that of an imported entity type.\nYou can control the merge behavior when entity type display names match\nby selecting one of the following:\n\n- **Replace existing entity types**: An imported entity type overwrites any same-named entity type in your existing agent.\n- **Merge with existing entity types**: The entity entries of an imported entity type are added to the existing entity type. If the same entity entries exist, they won't be duplicated, and the synonyms under them will be merged.\n- **Rename and import as new entity types**: The imported entity type is renamed by appending \"_1\" to the display name.\n- **Skip the entity types**: The existing entity type remains unchanged, and the imported entity type is ignored.\n\nTo export entity types: \n\n### Console\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Select the **Manage** tab.\n5. Click **Entity Types**.\n6. Select all the entity types you want to export.\n7. Click **Export selected entity**.\n8. Select the format and destination.\n9. Click **Submit**.\n\nTo import entity types: \n\n### Console\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Select the **Manage** tab.\n5. Click **Entity Types**.\n6. Click **Import**.\n7. Select the source and merge behavior.\n8. Click **Submit**.\n\nImport entity entries\n---------------------\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nYou can import entity entries to an existing entity type.\n\nThe file format used for importing entity entries is the same as the format\nused for importing entity types. However, the import file can only contain 1\nentity type and all the entries under it will be imported to the selected entity\ntype.\nIf the same entity entries exist, they won't be duplicated,\nand the synonyms under them will be merged.\n\nTo import entity entries for an entity type: \n\n### Console\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Select the **Manage** tab.\n5. Click **Entity Types**.\n6. Select an entity.\n7. Click **Import to entity**.\n8. Select a file.\n9. Click **Submit**."]]