Broadleaf Microservices
  • v1.0.0-latest-prod

Personalization Types

Asset

Property Type Description

applicationid?

string

The application ID that this asset is associated with. Used for resolving assets.

tenantId

string

The tenant ID that this asset is associated with. Used for resolving assets.

type

string

Describes the general type of the asset. This is used to determine how to render the asset on the frontend. For example, if the type is IMAGE, then the frontend will know to render it in an <img/> tag.

Example values: IMAGE, VIDEO, EMBED, PDF, WORD, AUDIO, CSV, EXCEL, TEXT, UNKNOWN

provider

string

The name of the provider that is hosting the asset. For assets hosted by the asset service itself, this should be BROADLEAF.

url

string

The location used to resolve this asset. If the provider is equal to BROADLEAF, then this will be a relative URL such as /icon.png. For other providers, this will be the fully qualified URL such as https://www.youtube.com/watch?v=abcdefg. Note that embedCode and this field can never both have values.

contentUrl

string

A fully resolved content URL path that can be used to directly fetch the binary data of an asset. If the provider is BROADLEAF, the content URL will be the result of prepending the server-property-configured contentUrlPrefix to the url. For other providers, the content URL will just be a duplication of the original url.

Note: since the content resolver endpoint requires context information to properly locate the asset, the content URL will have request parameters containing tenant information appended to it.

embededCode?

string

If and only if type is EMBED, this field holds the HTML to embed. Note that url and this field can never both have values.

altText?

string

Text that corresponds to the HTML alt attribute that should be used when this asset is rendered in a browser. This is used as an alternative for screen-readers and as an SEO enhancement describing the asset.

title?

string

Text that corresponds to the HTML title attribute that should be used when this asset is rendered in a browser. This is used as a tooltip or caption.

tags

Array<string>

Descriptive or identifying labels.

Tags can be used to provide a means of designating special purposes for the asset grouping otherwise related assets such as "banners" provide a label for some other, arbitrary purpose

[key: string]

unknown

ContentItem

Property Type Description

id?

string

Unique identifier for the member of the list. Primarily used to match translations.

name

string

A unique name for the Content Item.

activeStartDate

string

Defines the beginning time for which this Content Item is active. If both the active start date and the activeEndDate are null, this Content Item is considered to always be active.

activeEndDate?

string

Defines the ending time for which this Content Item is active. If the activeStartDate is not null, but the active end date is, the Content Item is considered to be active forever, starting on the start date.

displayRule

string

The rule string used to check if this Content Item is applicable.

priority

number

The priority that an item has in relation to other items.

type

string

Describes what kind of content this item will hold. Example Values: - IMAGE - HTML - TEXT

content?

string

The actual content for this Content Item. This could be anything that is representable as a string (i.e. HTML).

asset

Asset

Represents a relationship between a ContentItem and an asset. The binary data of the asset is generally managed by an external service like the asset service. This simply represents an association to that asset.

[key: string]

unknown

PersonalizationClientCallOptions

extends ClientCallOptions

The PersonalizationClient supports additional call configuration properties to support TargetContext

Property Type Description

targeterContext?

TargeterContext

Provide Targeter Context to filter result

TargeterContext

Property Type Description

locale?

string

The locale used in the context.

attributes?

Record<string, unknown>

Additional, unspecified attributes.

[key: string]

unknown