Commerce entity

Current version: 9.2

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

Namespace

The first part of the entity’s unique identifier (string).

Id

Its unique identifier (string).

Name

Name of the entity (string).

Note

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

FriendlyId

Human readable instance of the unique identifier (string).

DisplayName

Displayable name of the entity (Localized<String>).

DateCreated

Date and time the entity was created, automatically updated (DateTime).

Description

Description of entity (Localized<String>).

DateUpdated

Date and time the entity was updated, automatically updated (DateTime).

Policies

List of policies applicable to this entity (List<Policy>).

Components

List of components applicable to this entity (List<Component>).

ListMemberships

Delimited list of lists names (string).

SortOrder

The order this item is sorted (string).

IsDeleted

Flag to signify that the item is deleted (Bool).

IsPersisted

Flag to signify that the item is persisted (Bool).

DateDeleted

Date and time that the entity was deleted (DateTime).

Do you have some feedback for us?

If you have suggestions for improving this article,