Custom Field Design
It’s common to extend an e-commerce entity with additional fields. The commercetools uses
Type to define a set of fields for a custom field.
Entities that have custom fields attached include
The custom fields can be quried by predicate.
Type has an array of the resource Ids and an array of
FieldDefinition. The key fields are:
key: an identifier string.
resourceTypeIds: an array of IDs of the resources that can be customized with this type.
fieldDefinition: an array of
FieldDefinition describes the type and constraints meta-info of a field. It has fhe following meta-fields:
inputHint: specify a
MultiLinehint for a string field.
FieldType is similar to
AttributeType defined for
CustomFields has a reference to a
Type and an array of field values based on the type’s
FieldDefintion. It only has two fields:
type: a reference to
fields: values based on the array of