1. Commerce Core

Commerce entity

Version:

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:

PropertyDescription
NamespaceThe first part of the entity’s unique identifier (string).
IdIts unique identifier (string).
Note

Sitecore recommends that you do not use the GUID as part of the ID of custom entities.

NameName of the entity (string).
Note

As a general rule, we recommend that you use alphanumeric characters only in entity name strings.

FriendlyIdHuman readable instance of the unique identifier (string).
DisplayNameDisplayable name of the entity (Localized).
DateCreatedDate and time the entity was created, automatically updated (DateTime).
DescriptionDescription of entity (Localized).
DateUpdatedDate and time the entity was updated, automatically updated (DateTime).
PoliciesList of policies applicable to this entity (List).
ComponentsList of components applicable to this entity (List).
ListMembershipsDelimited list of lists names (string).
SortOrderThe order this item is sorted (string).
IsDeletedFlag to signify that the item is deleted (Bool).
IsPersistedFlag to signify that the item is persisted (Bool).
DateDeletedDate and time that the entity was deleted (DateTime).
If you have suggestions for improving this article, let us know!