Newer Version Available
Let us know so we can improve!
Abstract base class. An item is something in a site or app that users can view or otherwise engage with. Typical examples are products, articles, and blogs. Marketing Cloud Personalization tracks descriptive fields and user activity against items. This activity can be used to build reports and to promote relevant items to users.
All fields are optional unless otherwise stated. Send optional fields only if they’re relevant to the transaction (for instance, LineItem.item.price) or if they aren’t already included with web activity in the same dataset.
1public abstract class Item
2extends java.lang.ObjectDirect known subclasses:
Also refer to:
| Field | Description | Modifier and Type |
|---|---|---|
description | Overview text about the item. | java.lang.String |
expiration | If set, this item will be expired/unavailable on or after this time. | java.util.Date |
id | The item’s ID. Required. | java.lang.String |
imageUrl | Fully qualified URL for the image representing this item. | java.lang.String |
location | Location related to this item. | Location |
name | Name of a Product, Category, or Tag. | java.lang.String |
numRatings | Total number of ratings given to this item. | java.lang.Integer |
promotionState | An optional promotion state that modifies how items are selected and ordered for promotion. | java.lang.String |
published | If set, this item is published or made available on or after this time. | java.util.Date |
rating | Overall score for the item. | java.lang.Double |
tags | Additional descriptive tags about an item such as Brand for products or Author and Keywords for articles. | java.util.List<Tag> |
url | Link to this item. | java.lang.String |
1@NonNull
2public String idRequired. Uniquely identifies an Item. The ID of a category must also identify its parents, separated by pipe (|) characters. If a category has the ID “parent” and another category is the child of the first, the child’s ID might be parent|child.
1@Nullable
2public String nameName of a Product, Category, or Tag. This name serves as the title for an Article or Blog.
1@Nullable
2public String descriptionOverview text about the item.
1@Nullable
2public String urlLink to this item.
1@Nullable
2public String imageUrlFully qualified URL for the image representing this item.
1@Nullable
2public Location locationLocation related to this item.
1@Nullable
2public List<Tag> tagsAdditional descriptive tags about an item such as Brand for products or Author and Keywords for articles.
See Also
1@Nullable
2public Double ratingOverall score for the item.
1@Nullable
2@IntRange(from=0L)
3public Integer numRatingsTotal number of ratings given to this item.
1@Nullable
2public String promotionStateAn optional promotion state that modifies how items are selected and ordered for promotion. For a list of allowed values and meanings, see PromotionState.
1@Nullable
2public Date publishedIf set, this item is published or made available on or after this time. Unpublished items are excluded from promotion campaigns.
1@Nullable
2public Date expirationIf set, this item will be expired/unavailable on or after this time. Expired items are excluded from promotion campaigns.
| Method | Modifier and Type |
|---|---|
fromJSONString(java.lang.String jsonString) | static Item |
getItemType() | abstract String |
1public static Item fromJSONString(java.lang.String jsonString)1public abstract String getItemType()Newer Version Available