[Premium]{class="badge positive" title="Consulte qué se incluye en Target Premium."}
Atributos de entidad entity-attributes
En esta página: Conozca qué atributos de entidad pasan la información de producto o contenido a Adobe Target Recommendations y cómo definirlos.
Use los atributos de entidad para pasar la información de producto o contenido a Adobe Target Recommendations, donde se puede mostrar en diseños y usar en reglas de inclusión, colecciones y exclusiones. Las entidades son los artículos que desea recomendar, como productos, contenido (artículos, presentaciones de diapositivas, imágenes, películas y programas de televisión), ofertas de empleo, restaurantes, etc. Recommendations envía productId o productPurchasedId (denominados entity.id en el código) que se usan en los algoritmos.
Tenga en cuenta lo siguiente:
entity.iddebe coincidir conproductPurchasedIdenviado a la página de confirmación de pedido y conproductIdusado en Adobe Analytics informes de producto.- Los valores de atributo de entidad que pase a Recommendations caducan pasados 61 días. Adobe recomienda pasar el valor más reciente de cada atributo de entidad a Recommendations al menos una vez al mes para cada elemento del catálogo.
La mayoría de los parámetros predefinidos solo aceptan un valor único. Los valores nuevos sobrescriben a los antiguos. El parámetro categoryId es la excepción (consulte entity.categoryId).
En general, el mbox de información de visualización tiene el siguiente aspecto si usa at.js 1.x con mboxCreate. Todos los atributos de parámetros de entidad distinguen entre mayúsculas y minúsculas.
Si usa at.js 2.x, mboxCreate (como se usa en el ejemplo siguiente) ya no es compatible. Para pasar información de producto o contenido a Recommendations mediante at.js 2.x, use targetPageParams. Para ver un ejemplo, vea Planificar e implementar Recommendations.
| code language-javascript |
|---|
|
pageUrl y thumbnailUrl en lugar de las direcciones URL absolutas, porque las recomendaciones reciben los datos que se han enviado desde todos los entornos del sitio. El uso de direcciones URL relativas evita los vínculos predeterminados de un servidor de ensayo o desarrollo.Si el mbox está en una página de producto, puede incluir el ID del producto y el ID de la categoría. El algoritmo seleccionado determina qué se muestra. El ID del producto se utiliza para algoritmos de afinidad y el ID de la categoría para algoritmos de categoría.
Variables disponibles
En la tabla siguiente se enumeran las variables disponibles. Las subsecciones después de la tabla proporcionan más información sobre las variables que la necesitan.
entity.id'entity.id=67833'entity.name'entity.name=Giants& vs& Rockies& 5/12'entity.categoryId'entity.categoryId=womens:sweaters'entity.brand'entity.brand=brandxyz'entity.pageUrl'entity.pageUrl=baseball/giants-tix/giantsvrockies5.12.2000-67833'entity.thumbnailUrl'entity.thumbnailUrl=baseball/giants-tix/giants-136px.gif'entity.messageentity.message para definir información adicional que se mostrará con el producto en la plantilla.'entity.message=Family special'entity.inventory'entity.inventory=1'entity.value'entity.value=15.99'entity.margin'entity.margin=1.00'entity.custom'entity.secondary=Rockies'entity.event.detailsOnly'entity.event.detailsOnly=true'entity.id entity-id
El identificador alfanumérico debe ser el mismo en todos los Adobe Experience Cloud productos que se usen, incluido Analytics, para que los distintos productos reconozcan el artículo y compartan los datos sobre él.
Los valores de entity.id deben no contener espacios, barras diagonales, el símbolo &, signos de interrogación, símbolos de porcentaje, comas u otros caracteres de puntuación que requieran codificación URL cuando se pasan en una llamada de API REST. Se permiten guiones y guiones bajos. Incluida puntuación no válida en un valor entity.id hace que algunas funciones de Recommendations fallen.
entity.categoryId entity-category-id
El valor entity.categoryId puede incluir varias categorías, como una subsección de rebecas (por ejemplo, womens, womens:sweaters, womens:sweaters:cardigans). Las categorías múltiples deben separarse con comas. Los nuevos valores de categoryId no sobrescriben los valores existentes, sino que, en su lugar, se anexan durante la actualización de la entidad. El valor categoryId está limitado a 250 caracteres.
categoryId al mbox utilizado para mostrar esa recomendación en particular. El valor de categoryId debe coincidir exactamente con el valor de entity.categoryId pasado en la página Detalles del producto.Ejemplos:
- Ejemplo de página Detalles del producto:
womens,womens:sweaters,womens:sweaters:cardigans - Ejemplo de suéters de página de categoría:
womens:sweaters - Ejemplo de página de categoría Cardigans:
womens:sweaters:cardigans
Para las recomendaciones basadas en categorías, una coma separa el valor de categoría. Los valores separados por comas pasan a ser categorías. También puede definir subcategorías con otro separador, como los dos puntos (:), para separar las subcategorías dentro del valor de categoría.
Por ejemplo, en el código siguiente, la categoría Mujer se divide en varias subcategorías:
mboxCreate('mboxName', 'entity.id=343942-32', 'entity.categoryId= Womens, Womens:Outerwear, Womens:Outerwear:Jackets, Womens:Outerwear:Jackets:Parka, Womens:Outerwear:Jackets:Caban', 'entity.thumbnailUrl=...', 'entity.message=...');
Para la entrega de mbox, se utiliza el nombre de atributo más largo para la clave. Si hay un empate, se utiliza el último atributo. En el ejemplo anterior, la clave de categoría es Womens:Outerwear:Jackets:Caban.
entity.inventory entity-inventory
Administración de atributos de inventario vacío: Para la entrega, si tiene una regla de inclusión, una regla de recopilación o una configuración de criterios con entity.inventory > 0 o entity.inventory = 0 y el producto no tiene inventario establecido, Target evalúa este valor como TRUE e incluye productos donde no se ha establecido el inventario. Como resultado, los productos con inventario no establecido se muestran en los resultados de la recomendación.
Igualmente, si tiene una regla de exclusión global con entity.inventory = 0 y entity.inventory no está establecido, Target evalúa esta regla como TRUE y excluye el producto.
entity.inventory = 0, la búsqueda de productos no muestra los productos sin valor de inventario establecido.entidad.personalizada entity-custom
Puede definir hasta 100 variables personalizadas. Puede especificar el nombre de los atributos no utilizados para cada atributo personalizado. Por ejemplo, puede crear un atributo personalizado denominado entity.genre para definir un libro o una película. Un vendedor de entradas puede crear atributos del lugar de celebración para un actor secundario, como un equipo visitante en un evento deportivo o un acto de apertura en un concierto.
Restricciones:
- No se pueden usar nombres de atributos de entidad predefinidos para atributos de entidad personalizados.
- El atributo
entity.environmentse reserva para el sistema y no se puede usar en atributos de entidad personalizados. Se omiten los intentos de pasarentity.environmentusandotargetPageParams, fuente o API.
Ejemplos:
'entity.venue=AT&T Park'
'entity.secondary=Rockies'
Los atributos de entidad personalizados admiten varios valores. Consulte Atributos de entidad personalizados para límites de caracteres y valores.
Ejemplo: 'entity.secondary=["band1", "band2"]'
Los atributos de entidad personalizados de varios valores requieren matrices JSON válidas. Para obtener información de sintaxis correcta, vea Atributos de entidad personalizados.
entity.event.detailsOnly entity-event-details-only
Utilice este parámetro para evitar que una llamada de mbox incremente los contadores de datos de comportamiento de un algoritmo.
En los ejemplos siguientes, la primera llamada de mbox actualiza el catálogo y los datos de comportamiento. La segunda llamada de mbox actualiza solo el catálogo.
mboxCreate('myMbox', 'profile.geo.city = new york', 'profile.geo.state = new york', 'entity.id = 123', 'entity.inventory = 4' )
mboxCreate('myMbox', 'profile.geo.city = new york', 'profile.geo.state = new york', 'entity.id = 123', 'entity.inventory = 4', 'entity.event.detailsOnly=true' )
This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
- TL;DR: Entity attributes pass product or content information to Adobe Target Recommendations, and the page lists the available variables and how to define each one.
Intents:
- Pass product or content information to Recommendations with entity attributes.
- Find which entity variables are available, whether each accepts a single value or multiple values, and an example of each.
- Define
entity.id,entity.categoryId, andentity.inventorycorrectly. - Define custom entity attributes.
- Prevent an mbox call from incrementing behavioral data counters for an algorithm with
entity.event.detailsOnly.
Glossary:
- Entity: an item you want to recommend, such as a product, content (articles, slide shows, images, movies, and television shows), a job listing, or a restaurant.
entity.id: the name in the code of theproductIdorproductPurchasedIdthat Recommendations sends and that is used in the algorithms.- Custom entity attribute (product-specific): an
entity.custom variable that provides additional information about the item. entity.event.detailsOnly: a parameter that prevents an mbox call from incrementing behavioral data counters for an algorithm.
Guardrails:
entity.idmust match theproductPurchasedIdsent to the order confirmation page and theproductIdused in Adobe Analytics product reports.- Entity attribute values that you pass to Recommendations expire after 61 days.
- All entity parameter attributes are case-sensitive.
- Most predefined parameters accept a single value only, with new values overwriting old values. The
categoryIdparameter is the exception. entity.idis required and accepts a single value only. Its values must not contain spaces, slashes, ampersands, question marks, percentage symbols, commas, or other punctuation characters that require URL encoding when passed in a REST API call. Hyphens and underscores are allowed. Including invalid punctuation in anentity.idvalue causes some Recommendations functionality to fail.entity.categoryIdaccepts a comma-delimited list of categories. NewcategoryIdvalues do not overwrite existing values but are appended during entity update. ThecategoryIdvalue is limited to 250 characters.- To show a recommendation based on a category in a Category page, only one
categoryIdcan be passed into the mbox used to display that particular recommendation, and its value must match exactly the value ofentity.categoryIdpassed on the Product Detail page. entity.inventoryrequires an integer or long value.entity.value: only the decimal format is supported (for example, 15.99). The comma format (15,99) is not supported.- You can define up to 100 custom variables. You cannot use predefined entity attribute names for custom entity attributes.
- The attribute
entity.environmentis reserved by the system and cannot be used for custom entity attributes. Attempts to passentity.environmentusingtargetPageParams, feed, or API are ignored. - Multi-value custom entity attributes (JSON array) require valid JSON arrays.
Applicability:
- at.js 1.x with
mboxCreate: the display information mbox looks like the example on the page. - at.js 2.x:
mboxCreateis no longer supported. To pass product or content information to Recommendations, usetargetPageParams.
Terminology:
- Canonical name: entity attributes (variant: entity parameter attributes)
- Canonical name: Adobe Target Recommendations (variant: Recommendations)
- Synonyms: “
productIdorproductPurchasedId” = “entity.id” (the page says the former is referred to asentity.idin the code)
FAQ:
- How long do entity attribute values last? Entity attribute values that you pass to Recommendations expire after 61 days.
- Which entity variable is required?
entity.idis required and accepts a single value only. - How many custom variables can I define? You can define up to 100 custom variables, and you can specify any unused attribute name for each custom attribute.
- Can I use
entity.environmentas a custom entity attribute? No.entity.environmentis reserved by the system, and attempts to pass it usingtargetPageParams, feed, or API are ignored. - What does
entity.event.detailsOnlydo? It prevents an mbox call from incrementing behavioral data counters for an algorithm. - What happens to products with
entity.inventorynot set in delivery? If an inclusion rule, collection rule, or criteria setting usesentity.inventory> 0 orentity.inventory= 0, Target evaluates the value to TRUE and includes the products where the inventory is not set.
Troubleshooting:
- Known issue: Product Search is inconsistent with delivery for inventory value attributes that are not set. For example, for a rule with
entity.inventory= 0, Product Search does not display products where the inventory value is not set.
Examples:
- Example of an mbox that passes entity attributes: an
mboxCreate('productPage', ...)call withentity.id,entity.name,entity.categoryId,entity.pageUrl,entity.venue,entity.secondary,entity.thumbnailUrl,entity.message,entity.value, andentity.inventory(for at.js 1.x). - Category values for
entity.categoryId: a Product Detail page passeswomens,womens:sweaters,womens:sweaters:cardigans; a Category page for Sweaters passeswomens:sweaters; a Category page for Cardigans passeswomens:sweaters:cardigans. - Subcategories in
entity.categoryId: a colon (:) can separate subcategories within the category value, as inWomens, Womens:Outerwear, Womens:Outerwear:Jackets, Womens:Outerwear:Jackets:Parka, Womens:Outerwear:Jackets:Caban. - Custom entity attributes:
entity.genrecan define a book or movie. A ticket vendor can create attributes for an event venue and for a secondary performer, such as a visiting team in a sporting event or an opening act in a concert (for example,'entity.secondary=Rockies'). A multi-value example is'entity.secondary=["band1", "band2"]'. entity.event.detailsOnly: withmboxCreate('myMbox', ..., 'entity.id = 123', 'entity.inventory = 4'), the mbox call updates the catalog and behavioral data. With'entity.event.detailsOnly=true'added, the mbox call updates only the catalog.- Product page mbox: if the mbox is on a product page, you can include both the product ID and category ID. The selected algorithm determines which displays: the product ID is used for affinity algorithms and the category ID is used for category algorithms.
Best practices:
- Adobe recommends that you pass the latest value of each entity attribute to Recommendations at least once per month for each item in your catalog.
- Relative URLs are preferred for
pageUrlandthumbnailUrlrather than absolute URLs because recommendations receive data being sent from all environments on your site. Using relative URLs avoids hardcoded links to a staging or development server.
Related pages:
- For character and value limits of custom entity attributes: Custom entity attributes (c-recommendations/c-products/custom-entity-attributes.md)
- For correct syntax of multi-value custom entity attributes (valid JSON arrays): Custom entity attributes (c-recommendations/c-products/custom-entity-attributes.md)
Personas:
- developer: Can pass product or content information to Recommendations with entity attributes such as
entity.id,entity.categoryId,entity.inventoryandentity.value. Can define up to 100 custom variables. The page states that entity attribute values that you pass to Recommendations expire after 61 days. Where: “Guardrails”.
Onboarding:
- Level: Intermediate, Experienced
- First minimal step: If you use at.js 2.x, pass product or content information to Recommendations with targetPageParams.
- Next: For character and value limits of custom entity attributes: Custom entity attributes (c-recommendations/c-products/custom-entity-attributes.md)