Broadleaf Microservices
  • v1.0.0-latest-prod

Characteristics

Tip
Introduced in Catalog Service 2.2.0

Data Model

Characteristic Data Model
Figure 1. Characteristic Data Model

Characteristic

A Characteristic represents a property belonging to a Product Type. Characteristics define metadata regarding the property including the type of values allowed, default values to populate onto new Products when created, whether the property is configurable by customers in a shopping experience, and so on.

CharacteristicValueType

Characteristic values can be of several different types:

  • STRING

  • HTML

  • ENUM

  • DECIMAL

  • NUMBER (alias for DECIMAL)

  • INTEGER

  • DATE

  • BOOLEAN

  • VARIANT_OPTION: Indicates the Characteristic should be converted into a Variant Distinguishing Product Option on Products using the related Product Type.

The value type on the Characteristic indicates the expected field son CharacteristicValue that should be populated and limits what their valueTypes can be. In most cases, the CharacteristicValue has to have the same valueType as its parent Characteristic. However, ENUM and VARIANT_OPTION Characteristics have special rules.

If the Characteristic valueType is ENUM, then the CharacteristicValue can be any of the simple types: STRING, HTML, DECIMAL, NUMBER, INTEGER, DATE, or BOOLEAN. Moreover, each CharacteristicValue has to have a label for display and each value has to have the same type—an enum’s values can’t mix strings and numbers and dates.

If the Characteristic valueType is VARIANT_OPTION, then the CharacteristicValue be a STRING and must have a label for display. These CharacteristicValues will be converted into AttributeChoiceValues in a Product’s options.

BLC_CHARACTERISTIC

Field Description

ID

Unique row ID.

CONTEXT_ID

A system wide identifier.

NAME

A human readable name.

FIELD_NAME

A transformation of the name for use as a map key.

DESCRIPTION

A friendly description of the Characteristic if the name is not clear enough.

START_DATE

Date after which the entity is in use.

END_DATE

Date until which the entity is in use.

VALUE_TYPE

The type of value represented by this Characteristic. Default values include:

IS_CONFIGURABLE

Whether the value for the Characteristic is configurable by a customer in a shopping experience.

IS_UNIQUE

Whether the value for the Characteristic must be unique. Currently unused out of box.

IS_RULE_BUILDER_TARGET

Whether this Characteristic should be targetable in rule-builders (e.g., by Offers and Content Items).

IS_PRICING_TARGET

Whether this Characteristic should be targetable by pricing, e.g., a product’s price should change depending on the value of this characteristic.

MIN_CARDINALITY

The minimum number of values allowed for this Characteristic on a Product.

MAX_CARDINALITY

The maximum number of values allowed for this Characteristic on a Product.

IS_EXTENSIBLE

Whether the Characteristic can be extended. Currently unused out of box.

VALUE

The value(s) for this Characteristic. In most cases this defines the default value(s) and can be overridden by Admins when creating a Product. However, for ENUM and VARIANT_OPTION value types, this defines the allowed values.

IS_SHARED

Whether this Characteristic can be shared by multiple Product Types.

DISPLAY_ORDER

The display order for this Characteristic compared to others for the same Product Type.

VALIDATION_TYPE

The type of validation used for the value(s) of this Characteristic. Values include NONE and REGEX.

VALIDATION_RULE

If validation type is REGEX, then this is the regular expression.

ERROR_MESSAGE

Message to display if the value fails validation.

IS_TRANSLATABLE

Whether the value(s) of the Characteristic can be translated.

TRACKING

Application Trackable

CharacteristicValues

CharacteristicValues represent the actual values used as defaults or as the allowed values for the Characteristic when added to a Product. These can include additional information about the value such as its type, a label, display order, and so on. The Characteristic’s min and max cardinalities will determine the required number of values present on a Product.

See CharacteristicValueType for additional considerations.