Alguns produtos e recursos estão sendo renomeados. Os recursos de playbook generativo e de fluxo também estão sendo migrados para um único console consolidado. Confira os detalhes.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
É possível criar entidades personalizadas para dados de correspondência específicos ao seu agente.
Por exemplo, defina um tipo de entidade vegetable que corresponda aos tipos de vegetais disponíveis para compra em um agente de mercearia.
Os nomes de exibição dos tipos de entidade personalizados são exclusivos para cada agente.
Os nomes de exibição do tipo de entidade precisam começar com uma letra e podem conter o seguinte: A-Z, a-z, 0-9, _ (sublinhado), - (traço).
Os valores de referência de entidade e sinônimos não têm essa limitação.
Exportar e importar entidades personalizadas
É possível exportar e importar entidades para compartilhar entre agentes.
Uma das opções de formato de exportação é o pacote Json, que é um arquivo zip que contém uma hierarquia de diretórios e arquivos JSON.
A seguir, descrevemos a estrutura de diretórios:
entityTypes: este diretório contém seus tipos de entidade.
<entity type name>: um ou mais desses diretórios existem, e os nomes correspondem aos nomes de exibição dos tipos de entidade.
entities: esse diretório contém arquivos de entrada de entidade.
<language tag>.json: um ou mais desses arquivos existem, e os nomes correspondem a tags de idioma.
Cada arquivo contém entradas de entidades específicas do idioma.
<excludedPhrases>: esse diretório contém arquivos de
frases excluídas.
<language tag>.json: um ou mais desses arquivos existem, e os nomes correspondem a tags de idioma.
Cada arquivo contém exclusões de frases específicas de um idioma.
<entity type name>.json: esse nome de arquivo corresponde
a um nome de exibição de tipo de entidade.
O arquivo contém dados específicos do tipo de entidade
que não foram encontrados em outros arquivos.
Ao importar tipos de entidade, podem ocorrer conflitos de mesclagem quando o nome de exibição de um tipo de entidade no agente atual corresponde ao de um tipo de entidade importado.
É possível controlar o comportamento de mesclagem quando os nomes de exibição dos tipos de entidade correspondem
selecionando uma das seguintes opções:
Substituir tipos de entidades atuais: um tipo de entidade importado substitui qualquer tipo de entidade com o mesmo nome no agente atual.
Mesclar com tipos de entidades atuais:
as entradas de entidade de um tipo de entidade importado são adicionadas ao tipo de entidade
atual.
Se as mesmas entradas de entidade existirem, elas não serão duplicadas,
e os sinônimos delas serão mesclados.
Renomear e importar como novos tipos de entidade:
o tipo de entidade importado é renomeado com a adição de "_1" ao nome de exibição.
Ignorar os tipos de entidade:
o tipo de entidade atual permanece inalterado,
e o tipo de entidade importado é ignorado.
Selecione a origem e o comportamento de mesclagem.
Clique em Enviar.
Importar entradas de entidade
É possível importar entradas de entidade para um tipo de entidade atual.
O formato de arquivo usado para importar entradas de entidades é o mesmo usado para importar tipos de entidades. No entanto, o arquivo de importação só pode conter um tipo de entidade, e todas as entradas abaixo dele serão importadas para o tipo de entidade selecionado.
Se as mesmas entradas de entidade existirem, elas não serão duplicadas,
e os sinônimos delas serão mesclados.
Para importar entradas de entidade para um tipo de entidade:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-18 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**."]]