Class Item

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. Generally, optional fields should only be sent if they are specific to this transaction (e.g. LineItem.item.price) or if they aren’t already being sent along with web activity on the same dataset.

1public abstract class Item
2extends java.lang.Object

Direct known subclasses:

Also refer to:

Fields 

FieldDescriptionModifier and Type
descriptionOverview text about the item.java.lang.String
expirationIf set, this item will be expired/unavailable on or after this time.java.util.Date
id The item’s ID. Required.java.lang.String
imageUrlFully-qualified URL for the image representing this item.java.lang.String
locationLocation related to this item.Location
nameName of a Product, Category or Tag.java.lang.String
numRatingsTotal number of ratings given to this item.java.lang.Integer
promotionStateAn optional promotion state that modifies how items will be selected and ordered for promotion.java.lang.String
publishedIf set, this item will be published/available on or after this time.java.util.Date
ratingOverall score for the item.java.lang.Double
tagsAdditional descriptive tags about an item such as Brand for products or Author and Keywords for articles.java.util.List<Tag>
urlLink to this item.java.lang.String

id 

1@NonNull
2public java.lang.String id

Required. 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”.

name 

1@NonNull
2public java.lang.String name

Name of a Product, Category or Tag. This serves as the title for an Article or Blog.

description 

1@NonNull
2public java.lang.String description

Overview text about the item.

url 

1@NonNull
2public java.lang.String url

Link to this item.

imageUrl 

1@NonNull
2public java.lang.String imageUrl

Fully-qualified URL for the image representing this item.

location 

1@NonNull
2public Location location

Location related to this item.

tags 

1@NonNull
2public java.util.List<Tag> tags

Additional descriptive tags about an item such as Brand for products or Author and Keywords for articles.

See Also

rating 

1@NonNull
2public java.lang.Double rating

Overall score for the item.

numRatings 

1@NonNull
2public java.lang.Integer numRatings

Total number of ratings given to this item.

promotionState 

1@NonNull
2public java.lang.String promotionState

An optional promotion state that modifies how items will be selected and ordered for promotion. For a list of allowed values and meanings, see PromotionState.

published 

1@NonNull
2public java.util.Date published

If set, this item will be published/available on or after this time. Unpublished items will be excluded from promotion campaigns.

expiration 

1@NonNull
2public java.util.Date expiration

If set, this item will be expired/unavailable on or after this time. Expired items will be excluded from promotion campaigns.

Methods 

MethodModifier and Type
fromJSONString(java.lang.String jsonString)static Item

fromJSONObject 

1@Nullable
2public static Item fromJSONString(@NonNull
3                                            java.lang.String jsonString)