Pipelines for methods

Current version: 9.1

In the Sitecore.Commerce.Carts.config file, you can set your processors into pipelines to inject business logic.

The following table contains some examples of pipelines in the configuration file of Connect:

Pipeline

Description

getCarts

This pipeline searches for all carts that match some specific criteria. The carts are managed by the commerce system. This pipeline reads cart data from the commerce system and converts that data into Connect format.

createOrResumeCart

This pipeline:

  • Initiates the creation of a shopping cart.

  • Loads persisted, abandoned carts, if present.

  • Calls the resumeCart pipeline to resume a loaded cart.

  • Calls the createCart pipeline to create a cart if no cart was found in the previous steps.

createCart

This pipeline:

  • Is internally used by the createOrResumeCart pipeline if the existing cart was not found and should be created.

  • Creates a cart with the minimal number of required fields.

  • Moves a visitor/contact to the initial state in the engagement plan.

  • Saves a cart to the storage and triggers the CartCreate event.

resumeCart

This pipeline:

  • Is internally used by the createOrResumeCart pipeline if a cart was loaded and should be resumed.

  • Sets the initial state to the loaded cart, moves a visitor/contact to the initial state in the engagement plan.

  • Saves a cart to the storage and triggers the CartResume event.

loadCart

This pipeline:

  • Gets a cart object that matches a specified criteria.

  • Reads data for a cart that is managed by the commerce system.

  • Reads the cart data from the commerce system and converts that data into the Connect format.

saveCart

This pipeline saves the cart object to an external system and in the Sitecore EA state.

addCartLines

This pipeline adds a new line to the shopping cart and records a corresponding page event in DMS.

This happens when a product is added to the cart.

removeCartLines

This pipeline removes cart lines from a cart.

updateCartLines

This pipeline updates lines on a cart.

deleteCart

This pipeline:

  • Deletes a cart permanently.

  • When the cart is deleted, it triggers the event in DMS to indicate that the cart is deleted.

updateCart

This pipeline:

  • Passes an updated cart to the external commerce system.

  • Triggers an event in DMS to indicate that the cart is being updated.

lockCart

This pipeline sets the cart to a locked state and prevents any modifications.

unlockCart

This pipeline sets the cart to an unlocked state.

getCartTotal

This pipeline:

  • Gets the totals object that matches the specified criteria.

  • Is responsible for reading pricing data from a commerce system.

  • Converts the contents of a Connect cart into a format that the commerce system can work with.

  • Sends a request to the commerce system to calculate the totals, and converts the output into the proper Connect format.

getProductPrices

This pipeline:

  • Gets the price object that matches the specified criteria.

  • Reads the pricing data from a commerce system.

  • Requests the product pricing information from the commerce system and converts the output into the proper Connect format.

Do you have some feedback for us?

If you have suggestions for improving this article,