Commerce Core overview

Current version: 9.0

The following table describes the concepts of Commerce Core:

Concept

Description

Activity

An 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.

Approval

Basic 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.

Authentication

The ability to authenticate a call to the service API using certificates.

Bootstrap

Commands 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.

Caching

Commands 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.

Command

Basic structure for supporting the concept of commands. A command acts like the API in a task-driven API.

Component

Basic structure for supporting compositional extensibility, including the component class and various base components.

Context

A 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.

Controller

Basic controllers that make core functionality available through the Service API.

Converter

Custom JSON converters for the Service API.

Entity

Commands, 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.

Environment

Commerce 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.

Event

Basic infrastructure to support events and event-driven actions.

Exception

Basic CommerceException base class.

Globalization

Commands and their pipelines to support globalization, including support for multicurrency and localization.

List

Commands 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.

Location

Commands and pipelines to support locations, for example, retrieving supported countries and country information.

Logging

Support for core logging using SeriLog and to specify logging using Microsoft Application Insights.

Media

Core classes to support media types and policies, including a GlobalImagePolicy and an image class.

Minion

Commands and pipelines to support minions including the MinionBoss and RunMinion pipelines, and the policies to support configuring minions in the environment configuration.

Model

Basic 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.

Node

A node is a running instance of the Service API. Core pipelines, blocks, and policies that enable basic node functionality.

Performance

Commands and policies to support tracking and integrating with performance counters for commands.

Pipeline

Core commands and models to support pipeline functionality. Pipelines, in turn, leverage the Sitecore.Framework.Pipelines infrastructure.

Plugin

Core support for the Commerce pluggable extensibility.

Policy

A 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.

Provider

Core 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.

ServiceApi

Core models and policies to enable the basic Service API.

Transaction

Core functionality to support transactionality in the solution.

Do you have some feedback for us?

If you have suggestions for improving this article,