[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[],[],null,["# Entities\n\nThis page introduces *entities*, ways of capturing varied user behavior depending on multiple brands or products on a single enterprise site, as well as how and why they can be used.\n\nFor most use cases, entities are not needed for Vertex AI Search for commerce. However,\nretailers who serve multiple brands or regions from a single product\ncatalog can get better results if they use entities.\n\nOverview\n--------\n\nSetting up multiple entities in your project is a way to take into consideration\ndifferent behavior and preferences of shoppers who are in different regions or\ncountries or who shop at differently branded sites that belong to your\nenterprise.\n\nExample use case: two countries\n-------------------------------\n\nA retailer, Example Organization, has a web presence in both the US and Canada.\n\nExample Organization wants to serve browse and search results and autocomplete\nsuggestions that take into account differences between the shoppers in the two\ncountries. And so, Example Organization designates two entities: `org_us` and\n`org_ca`.\n\nUser events are tagged with an entity value, depending on which website the\nshopper visited (`.com` or `ca`). When a shopper makes a search request, the\nentity value is included in the request.\n\nThe two countries have important but different holidays in July. With entities\nset up, when shoppers search the Example Organization site for `July`,\nAmerican shoppers are served Fourth of July themed items first and Canadian\nshoppers receive items themed for Canada Day.\n\nSimilarly, recommendations for Canadian shoppers are more likely to show Canada\nDay items than Fourth of July items.\n\nExample use case: an acquisition\n--------------------------------\n\nEnterprise Example Organization recently acquired Startup Example Organization.\nThe catalogs have been combined but the Startup brand and website is being\nkept because it has a loyal following.\n\nThe enterprise creates an entity, `startup`, to tag user events originating from\nthe Startup site. This allows the search, browse, autocomplete, and\nrecommendation suggestions that are served to the Startup site to take into\naccount the preferences of the Startup site's shoppers.\n\nMultiple projects or multiple entities?\n---------------------------------------\n\nWhen you set up Vertex AI Search for commerce, you can use different projects or different\nentities in the same project to get different suggestions for your different\nshopper populations.\n\nFor some applications, separate projects are required. For other applications,\nsetting up entities is the better solution.\n\nUse **entities** when you have:\n\n- A fully or partially shared catalog between the entities\n\n- One or more of the following:\n\n - Multiple brands in the same country or language area---for example, you have\n your original brand and an acquired brand, `google_home` and `nest`.\n\n - Multiple regions in the same country---for example, `enterprise_east` and\n `enterprise_west`.\n\n - One brand but in multiple countries with the same language---for example,\n `brand_us` and `brand_ca`.\n\nUse **separate projects** instead of entities when you have:\n\n- Catalogs that cannot be combined or catalogs that, if combined, have little or no overlap.\n\n- Entities that require different languages.\n Only one language is allowed per project.\n\nUser events and entities\n------------------------\n\nTo take advantage of the entities feature, add the entity field to your\nuser events.\n\n- **For search and autocomplete:** include the [`entity`](/retail/docs/reference/rest/v2/projects.locations.catalogs.userEvents#UserEvent.FIELDS.entity) field\n in user events of type `search`.\n\n Including the entity field in other user event types can be helpful\n for troubleshooting but does not affect the quality of the search or\n autocomplete responses.\n- **For recommendations:** include the entity field in as many types of user\n event as you can.\n\nTypically, it takes 30 to 90 days of user event data before the entity feature\nreturns optimal suggestions.\n\nIf an entity is missing from a request, the request makes no assumption about the\nentity in the result. You'll get an average result that is based on user events\nwith and without the entity specified.\n\nSearch and entities\n-------------------\n\nTo get search or browse results that take into account the entity:\n\n1. Include the [`entity`](/retail/docs/reference/rest/v2/projects.locations.catalogs.userEvents#UserEvent.FIELDS.entity) field in your search user events\n (`eventType=\"search\"`).\n For an example, see the complete object example for the\n [Search](/retail/docs/user-events#search) user event.\n\n2. Add the `entity` field to your search request. For information about how to\n make search requests, see [Get search results](/retail/docs/search-basic).\n\nAutocomplete and entities\n-------------------------\n\nTo get autocomplete results that take into account the entity:\n\n- Follow the instructions in [Auto-learning dataset](/retail/docs/completion-overview#generated-completion-dataset) and [Suggestion filtered by entity](/retail/docs/completion-overview#entity).\n\nRecommendations and entities\n----------------------------\n\nAfter you have added the [`entity`](/retail/docs/reference/rest/v2/projects.locations.catalogs.userEvents#UserEvent.FIELDS.entity) field to your user events, no\nfurther action is required to take advantage of entities for recommendations.\nThis is because the entity value is part of the user event, which, in turn, is\nincluded in the call to the [predict](/retail/docs/reference/rest/v2/projects.locations.catalogs.placements/predict) method."]]