The Storefront pipelines

Abstract

Overview of the pipelines used in SXA Storefront. Pipelines define a sequence of processors that implement a function and these ones are specific to SXA Storefront.

Pipelines define a sequence of processors that implement a function. In other words, a pipeline is a series of steps that implement an operation. Each step has its own operations and the sequence of the steps matters as the processors are run in order. Custom processors can be injected and existing processors can easily be replaced to alter the default functionality and behavior.

Storefront interacts with SXA pipelines as well as Connect pipelines. The ones described in the following table are specific to SXA Storefront.

Pipeline

Description

commerce.getRecommendedProducts

Used to evaluate the recommended products based on the arguments passed to it. The pipeline is executed in two different contexts when rendering recommendations:

  • when sending email messages in a marketing automation campaign

  • on the live storefront site

By default, this pipeline contains four processors:

  • FromOrder - uses the OrderId from the Email Experience Manager (EXM) campaign query string (in other words, from the campaign custom values) to retrieve the products list from the recommended products provider.

  • FromQuery - goes to the Products query field from the rendering data source item and uses the search manager to run a query against the index to retrieve a list of items.

  • FromLastOrder - retrieves the contact’s last order ID and passes it to the recommended products provider.

  • FromSearchScope - retrieves the fallback scope ID and executes the query defined for the scope to determine the products to recommend. For email campaigns, the fallback is the query in the email data source.

The pipeline argument object type is GetRecommendedProductArgs. Available properties are:

  • IsRecommendedProductsReady

  • MaxNumberOfRecommendedProducts

  • ProductsQuery

  • RecommendedProductsIdList

  • RelationshipFieldName

  • Success

newCxaSiteCreated

Used when you create a new site in the Content Editor. By default, it contains one processor:

  • QueueDomainCreatedEvent - propagates the security domain created event to all other roles and creates the domain.

The pipeline argument object type is NewCxaSiteCreatedArgs. Available properties are:

  • DomainName

  • LocallyManaged

By default, it contains one processor:

  • QueueDomainCreatedEvent - used to propagate the security domain created event DomainCreatedEvent to all other roles and to make sure that the security domain is created on all available roles. There is an event handler DomainCreatedEventHandler that is listening to this event and that reacts on all the roles.