[Premium]{class="badge positive" title="See what's included in Target Premium."}
Entity attributes entity-attributes
On this page: Learn which entity attributes pass product or content information to Adobe Target Recommendations and how to define each one.
Use entity attributes to pass product or content information to Adobe Target Recommendations, where it can be displayed in designs and used in inclusion rules, collections, and exclusions. Entities are the items you want to recommend, such as products, content (articles, slide shows, images, movies, and television shows), job listings, restaurants, and so forth. Recommendations sends the productId or productPurchasedId (referred to as entity.id in the code) that is used in the algorithms.
Consider the following:
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. 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.
Most predefined parameters accept a single value only, with new values overwriting old values. The categoryId parameter is the exception (see entity.categoryId).
In general, the display information mbox looks like the following example if you are using at.js 1.x with mboxCreate. All entity parameter attributes are case-sensitive.
If you are using at.js 2.x, mboxCreate (as used in the following example) is no longer supported. To pass product or content information to Recommendations using at.js 2.x, use targetPageParams. For an example, see Plan and implement Recommendations.
| code language-javascript |
|---|
|
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.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.
Available variables
The following table lists the available variables. Subsections after the table give more information about the variables that need it.
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 to define additional information to display with the product in the template.'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
The alphanumeric ID must be the same across all Adobe Experience Cloud products that are used, including Analytics, for the various products to recognize the item and share data about it.
The entity.id 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 entity-category-id
The entity.categoryId value can include multiple categories, such as a cardigans sub-subsection (for example, womens, womens:sweaters, womens:sweaters:cardigans). Multiple categories must be separated by commas. New categoryId values do not overwrite existing values but instead are appended during entity update. The categoryId value is limited to 250 characters.
categoryId can be passed into the mbox used to display that particular recommendation. The value of the categoryId must match exactly the value of entity.categoryId passed on the Product Detail page.Examples:
- Example Product Detail Page:
womens,womens:sweaters,womens:sweaters:cardigans - Example Category Page Sweaters:
womens:sweaters - Example Category Page Cardigans:
womens:sweaters:cardigans
For category-based recommendations, a comma separates category value. Any values separated by commas become categories. You can also define subcategories by using a different separator, such as a colon (:), to separate subcategories within the category value.
For example, in the following code the Women’s category is divided into several subcategories:
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=...');
For the mbox delivery, the longest attribute name is used for the key. If there is a tie, the last attribute is used. In the example above, the category key is Womens:Outerwear:Jackets:Caban.
entity.inventory entity-inventory
Empty inventory attribute handling: For delivery, if you have an inclusion rule, collection rule, or criteria setting with entity.inventory > 0 or entity.inventory = 0 and the product has inventory not set, Target evaluates this value to TRUE and includes products where the inventory is not set. As a result, products with inventory that is not set display in recommendation results.
Similarly, if you have a global exclusion rule with entity.inventory = 0 and entity.inventory is not set, Target evaluates this rule to be TRUE and excludes the product.
entity.inventory = 0, Product Search does not display products where the inventory value is not set.entity.custom entity-custom
You can define up to 100 custom variables. You can specify any unused attribute name for each custom attribute. For example, you can create a custom attribute called entity.genre to define a book or movie. A ticket vendor can create attributes for an event venue for a secondary performer, such as a visiting team in a sporting event or an opening act in a concert.
Restrictions:
- 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.
Examples:
'entity.venue=AT&T Park'
'entity.secondary=Rockies'
Custom entity attributes support multiple values. See Custom entity attributes for character and value limits.
Example: 'entity.secondary=["band1", "band2"]'
Multi-value custom entity attributes require valid JSON arrays. For correct syntax information, see Custom entity attributes.
entity.event.detailsOnly entity-event-details-only
Use this parameter to prevent an mbox call from incrementing behavioral data counters for an algorithm.
In the following examples, the first mbox call updates the catalog and behavioral data. The second mbox call updates only the catalog.
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)