1. Commerce Core

Commerce Core overview

Version:

The following table describes the concepts of Commerce Core:

ConceptDescription
ActivityAn internal construct that wraps a specific set of work for activity tracking, for example, for reporting and performance. The solution implements this as a CommandActivity all commands are wrapped in an activity to enable performance reporting on the command.

A TrackActivityPipelineis executed when the activity is complete, which enables a plugin to take action.

An example of an activity is to monitor performance of an action against an SLA and report actions outside the SLA, or to generate an alert.
ApprovalBasic approval commands and pipelines to facilitate a basic approval process. Approvals are used by pricing and promotions to seek the approval of changes before implementing.
AuthenticationThe ability to authenticate a call to the service API using bearer tokens.
BootstrapCommands and pipelines to support bootstrapping the solution. The BootstrapPipeline loads environment configurations from the wwwroot/data/environments folder into the SitecoreCommerce_Global database. After bootstrapping, those environment configurations do not need to be present. Any subsequent environment configuration is retrieved from the database during normal runtime operations.
CachingCommands and pipelines to support in-memory caching. This provides the ability to have environment-specific caching, to specify cache priorities, and to clear the cache. Caching functionality, in turn, leverages the Sitecore.Framework.Caching functionality for the actual caching.
CommandBasic structure for supporting the concept of commands. A command acts like the API in a task-driven API.
ComponentBasic structure for supporting compositional extensibility, including the component class and various base components.
ContextA call-level context called CommerceContext, which is initialized when a call enters the service and is carried throughout the service call. The CommerceContext provides an object cache, messaging, headers, and other core call-level information.
ControllerBasic controllers that make core functionality available through the Service API.
ConverterCustom JSON converters for the Service API.
EntityCommands, policies, and pipelines to support reading and writing commerce entities. A CommerceEntity is a core artifact designed to directly represent a business concept, which is stored as a single unit in a persistent storage. Entities have identifiers and can be retrieved through the Service API.
EnvironmentCommerce environments provide the ability to have separately configurable pools of data and service functionality that run together in a single-service instance. Environments can share the same persistent store as other environments or be separated into their own exclusive persistent store.
EventBasic infrastructure to support events and event-driven actions.
ExceptionBasic CommerceException base class.
GlobalizationCommands and their pipelines to support globalization, including support for multicurrency and localization.
ListCommands and pipelines to support basic list functionality, including basic list management. Use ManagedLists to track lists of entities either based on their state or based on activities that need to be performed on them. Lists are used to provide organizational structure and to support business processes.
LocationCommands and pipelines to support locations, for example, retrieving supported countries and country information.
LoggingSupport for core logging using SeriLog and to specify logging using Microsoft Application Insights.
MediaCore classes to support media types and policies, including a GlobalImagePolicy and an image class.
MinionCommands and pipelines to support minions including the MinionBoss and RunMinion pipelines, and the policies to support configuring minions in the environment configuration.
ModelBasic core models, which are POCO classes that are reusable inside entities and components. Models can be used to present data as part of a command response, in the models collection.

Models are listed in the Sitecore.Commerce.Documentation.chm (in the SDK folder) on the Model class page.
NodeA node is a running instance of the Service API. Core pipelines, blocks, and policies that enable basic node functionality.
PerformanceCommands and policies to support tracking and integrating with performance counters for commands.
PipelineCore commands and models to support pipeline functionality. Pipelines, in turn, leverage the Sitecore.Framework.Pipelines infrastructure.
PluginCore support for the Commerce pluggable extensibility.
PolicyA named, versionable and variable set of data that can be used as facts within behaviors to influence behavioral outcomes. This provides an auditable mechanism for viewing, simulating, and changing core decision criteria that might be used by business processes or other policy-driven behavior. Various plugins have specialized policies to add additional facts to existing policies and/or new policies, or to implement new concepts, such as dynamic pricing.

Policy characteristics include:

  • Centralized policy store using abstract entity storage.
  • Worker processes only need a link to the policy store to bootstrap.
  • Single point of truth for policies.
  • Publish workflow without moving data.
  • Policies are heavily cached and rarely change.
  • Policies can have attached rules to deliver personalized policies.


Policies are listed in the Sitecore.Commerce.Documentation.chm (in the SDK folder) on the Policy class page.
ProviderCore interfaces for an EntityProvider and an IndexProvider. The concept of a provider is avoided because any plugin could potentially be a provider. This is only used by the FileSystemProvider, which enables reading a CommerceEntity from the file system.
ServiceApiCore models and policies to enable the basic Service API.
TransactionCore functionality to support transactionality in the solution.
If you have suggestions for improving this article, let us know!