[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.id debe coincidir con productPurchasedId enviado a la página de confirmación de pedido y con productId usado 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.

Ejemplo de un mbox que pasa atributos de entidad
code language-javascript
<div class="mboxDefault"></div><script language="JavaScript1.2">

mboxCreate('productPage',

'entity.id=67833',

'entity.name=GIANTS VS ROCKIES 5/12',

'entity.categoryId=BASEBALL, GIANTS, SF BAY AREA',

'entity.pageUrl=/help/baseball/giants-tix/giantsvrockies5.12.2000-67833',

'entity.venue=AT&T PARK',

'entity.secondary=ROCKIES',

'entity.thumbnailUrl=/help/baseball/giants-tix/giants-136px.gif',

'entity.message=FAMILY SPECIAL',

'entity.value=15.99',

'entity.inventory=1'

);

</script>
NOTE
Las direcciones URL relativas son preferibles para 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.

Variable
Valores
Descripción
Variables
entity.id
Solo valor único. Requerido.
Identifica el producto. Consulte entity.id.
'entity.id=67833'
entity.name
Solo valor único.
El nombre del producto que se muestra en el sitio web cuando se recomienda el producto.
'entity.name=Giants& vs& Rockies& 5/12'
entity.categoryId
Varios valores (lista delimitada por comas).
La categoría de la página actual. Ver entity.categoryId.
'entity.categoryId=womens:sweaters'
entity.brand
Solo valor único.
Muestra la marca de un artículo.
'entity.brand=brandxyz'
entity.pageUrl
Solo valor único.
Define la dirección URL relativa de la página donde se puede comprar el artículo.
'entity.pageUrl=baseball/giants-tix/giantsvrockies5.12.2000-67833'
entity.thumbnailUrl
Solo valor único.
Define la dirección URL relativa a la imagen en miniatura que se muestra con el artículo.
'entity.thumbnailUrl=baseball/giants-tix/giants-136px.gif'
entity.message
Solo valor único.
Un mensaje sobre el producto que se muestra en la recomendación, como “oferta” o “liquidación”. Generalmente el mensaje es más extenso que el nombre del producto. Use entity.message para definir información adicional que se mostrará con el producto en la plantilla.
'entity.message=Family&nbsp;special'
entity.inventory
Solo valor único. Requiere un valor “integer” o “long”.
Muestra el nivel de inventario del artículo. Consulte entity.inventory.
'entity.inventory=1'
entity.value
Solo valor único.
Define el precio o el valor del elemento. Solo se admite el formato decimal (por ejemplo, 15,99). No se admite el formato de coma (15,99).
'entity.value=15.99'
entity.margin
Solo valor único.
Margen de ganancia u otro valor del artículo.
'entity.margin=1.00'
entity.custom
Varios valores (matriz JSON).
Variables personalizadas que proporcionan información adicional sobre el elemento. Ver entidad.personalizada.
'entity.secondary=Rockies'
entity.event.detailsOnly
Solo valor único.
Evita que una llamada de mbox incremente los contadores de datos de comportamiento de un algoritmo. Ver 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.

NOTE
Para mostrar una recomendación basada en una categoría de una página Category, solo se puede pasar un 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.

NOTE
Problema conocido: La búsqueda de productos no es coherente con la entrega para los atributos de valor de inventario que no están establecidos. Por ejemplo, para una regla con 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.environment se reserva para el sistema y no se puede usar en atributos de entidad personalizados. Se omiten los intentos de pasar entity.environment usando targetPageParams, fuente o API.

Ejemplos:

'entity.venue=AT&T&nbsp;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",&nbsp;"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' )
AI Knowledge Reference

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, and entity.inventory correctly.
  • 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 the productId or productPurchasedId that 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.id must match the productPurchasedId sent to the order confirmation page and the productId used 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 categoryId parameter is the exception.
  • entity.id is 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 an entity.id value causes some Recommendations functionality to fail.
  • entity.categoryId accepts a comma-delimited list of categories. New categoryId values do not overwrite existing values but are appended during entity update. The categoryId value is limited to 250 characters.
  • To show a recommendation based on a category in a Category page, only one categoryId can be passed into the mbox used to display that particular recommendation, and its value must match exactly the value of entity.categoryId passed on the Product Detail page.
  • entity.inventory requires 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.environment is reserved by the system and cannot be used for custom entity attributes. Attempts to pass entity.environment using targetPageParams, 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: mboxCreate is no longer supported. To pass product or content information to Recommendations, use targetPageParams.

Terminology:

  • Canonical name: entity attributes (variant: entity parameter attributes)
  • Canonical name: Adobe Target Recommendations (variant: Recommendations)
  • Synonyms: “productId or productPurchasedId” = “entity.id” (the page says the former is referred to as entity.id in 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.id is 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.environment as a custom entity attribute? No. entity.environment is reserved by the system, and attempts to pass it using targetPageParams, feed, or API are ignored.
  • What does entity.event.detailsOnly do? It prevents an mbox call from incrementing behavioral data counters for an algorithm.
  • What happens to products with entity.inventory not set in delivery? If an inclusion rule, collection rule, or criteria setting uses entity.inventory > 0 or entity.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 with entity.id, entity.name, entity.categoryId, entity.pageUrl, entity.venue, entity.secondary, entity.thumbnailUrl, entity.message, entity.value, and entity.inventory (for at.js 1.x).
  • Category values for entity.categoryId: a Product Detail page passes womens, womens:sweaters, womens:sweaters:cardigans; a Category page for Sweaters passes womens:sweaters; a Category page for Cardigans passes womens:sweaters:cardigans.
  • Subcategories in entity.categoryId: a colon (:) can separate subcategories within the category value, as in Womens, Womens:Outerwear, Womens:Outerwear:Jackets, Womens:Outerwear:Jackets:Parka, Womens:Outerwear:Jackets:Caban.
  • Custom entity attributes: entity.genre can 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",&nbsp;"band2"]'.
  • entity.event.detailsOnly: with mboxCreate('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 pageUrl and thumbnailUrl rather 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.inventory and entity.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)
recommendation-more-help
target-help-main