Commerce entity
A commerce entity represents a core unit of persistence in the form of a POCO class that inherits from commerce entity and can extend the entity along with behavior defined based on lifecycle events of the entity or defined commands.
Commerce entities are designed to be serialized rapidly into JSON, and stored in a variety of persistent stores. This provides the ability to support rich, extensible business entities with a simplistic API enabling a wide variety of persistence options.
Leveraging a document-oriented philosophy unlocks key CMS capabilities, such as versioning, drafting, and so on.
Commerce entities:
-
Are simple inheritable base classes.
-
Usually represent a real business concept.
-
Persist as documents using serialization.
-
Are extended by composition.
-
Are extended by policy.
-
Are independently addressable using persistence.
The following table describes the properties of a commerce entity:
Property |
Description |
---|---|
|
The first part of the entity’s unique identifier (string). |
|
Its unique identifier (string). Note Sitecore recommends that you do not use the GUID as part of the ID of custom entities. |
|
Name of the entity (string). Note As a general rule, we recommend that you use alphanumeric characters only in entity name strings. |
|
Human readable instance of the unique identifier (string). |
|
Displayable name of the entity (Localized<String>). |
|
Date and time the entity was created, automatically updated (DateTime). |
|
Description of entity (Localized<String>). |
|
Date and time the entity was updated, automatically updated (DateTime). |
|
List of policies applicable to this entity (List<Policy>). |
|
List of components applicable to this entity (List<Component>). |
|
Delimited list of lists names (string). |
|
The order this item is sorted (string). |
|
Flag to signify that the item is deleted (Bool). |
|
Flag to signify that the item is persisted (Bool). |
|
Date and time that the entity was deleted (DateTime). |