---
title: "Pipelines for methods"
slug: "pipelines-for-methods"
abstract: ""
---
# Pipelines for methods

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:<br><br><ul><li>Initiates the creation of a shopping cart.</li><li>Loads persisted, abandoned carts, if present.</li><li>Calls the `resumeCart` pipeline to resume a loaded cart.</li><li>Calls the `createCart` pipeline to create a cart if no cart was found in the previous steps.</li></ul> |
| `createCart` | This pipeline:<br><br><ul><li>Is internally used by the `createOrResumeCart` pipeline if the existing cart was not found and should be created.</li><li>Creates a cart with the minimal number of required fields.</li><li>Moves a visitor/contact to the initial state in the engagement plan.</li><li>Saves a cart to the storage and triggers the `CartCreate` event.</li></ul> |
| `resumeCart` | This pipeline:<br><br><ul><li>Is internally used by the `createOrResumeCart` pipeline if a cart was loaded and should be resumed.</li><li>Sets the initial state to the loaded cart, moves a visitor/contact to the initial state in the engagement plan.</li><li>Saves a cart to the storage and triggers the `CartResume` event.</li></ul> |
| `loadCart` | This pipeline:<br><br><ul><li>Gets a cart object that matches a specified criteria.</li><li>Reads data for a cart that is managed by the commerce system.</li><li>Reads the cart data from the commerce system and converts that data into the Connect format.</li></ul> |
| `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.<br><br>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:<br><br><ul><li>Deletes a cart permanently.</li><li>When the cart is deleted, it triggers the event in DMS to indicate that the cart is deleted.</li></ul> |
| `updateCart` | This pipeline:<br><br><ul><li>Passes an updated cart to the external commerce system.</li><li>Triggers an event in DMS to indicate that the cart is being updated.</li></ul> |
| `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:<br><br><ul><li>Gets the totals object that matches the specified criteria.</li><li>Is responsible for reading pricing data from a commerce system.</li><li>Converts the contents of a Connect cart into a format that the commerce system can work with.</li><li>Sends a request to the commerce system to calculate the totals, and converts the output into the proper Connect format.</li></ul> |
| `getProductPrices` | This pipeline:<br><br><ul><li>Gets the price object that matches the specified criteria.</li><li>Reads the pricing data from a commerce system.</li><li>Requests the product pricing information from the commerce system and converts the output into the proper Connect format.</li></ul> |