Working with Commerce Engine pipelines and blocks

Abstract

Guidance on how to work with the Commerce Engine pipeline framework when extending Commerce Engine functionality by creating custom plugins.

The Commerce Engine core uses a pipeline framework based on .NET Core Dependency Injection, providing support for extensibility. In a Commerce plugin, pipelines act as containers for business logic. The pipeline class itself is typically lightweight and mainly expresses the definition of the pipeline. Commerce pipelines are composed of block definitions that detail business logic. Each pipeline block defines actions to perform based on rules, conditions, and so on. You use the configure.sitecore class in your custom plugin to register your pipelines and blocks with the Commerce Engine and to configure the sequence in which to run the blocks.

Sitecore XC provides ways to help you understand what Commerce plugins exist by default, and to determine where to insert your custom pipeline or block, or to see if a newly implemented pipeline or block is running as you expect.

You can retrieve pipelines registered with the Commerce Engine using an API request in Postman, or view the running pipelines and blocks in the node configuration log.