Inventory service layer

The inventory service layer provides read-only integration with inventory / stock information from an external commerce system (ECS). However, you can extend this service layer to support read-write integration if desired.

You can find all configuration for the inventory service layer n the Sitecore.Commerce.Inventory.config file. Here you will find all details for the entities, pipelines, and repositories used by the inventory system.

Note

We highly recommend that you do not modify this file when adding your ECS connector components to the pipelines, overriding entity definitions, and so on. Instead, use Sitecore configuration patching, and include all of your ECS configuration in a separate file named {ECSName}.Connectors.Inventory.config.

In the stock inventory system, there is no inheritance hierarchy for entities and all of the connect pipelines treat them as read-only entities. If you want to support updating stock information through the inventory system, you must extend the system with your own pipelines and service provider methods.

The pipelines of the inventory service layer can be divided into four categories:

  • Runtime Integration:

    • commerce.inventory.getStockInformation

    • commerce.inventory.getPreOrderableInformation

    • commerce.inventory.getBackOrderableInformation

    • commerce.inventory.getStockLocations

    • commerce.inventory.getProductStockLocations

  • Search Integration:

    • commerce.inventory.stockStatusForIndexing

  • Event Raising:

    • commerce.inventory.visitedProductStockStatus

    • commerce.inventory.productsAreBackInStock

    • commerce.carts.addCartLines

  • Products Back In Stock Engagement Plan:

    • commerce.inventory.visitorSignUpForStockNotification

    • commerce.inventory.removeVisitorFromStockNotification

    • commerce.inventory.getBackInStockInformation

Of these pipelines, only the following require integration with the ECS:

  • commerce.inventory.getStockInformation

  • commerce.inventory.stockStatusForIndexing

  • commerce.inventory.getPreOrderableInformation

  • commerce.inventory.getBackOrderableInformation

  • commerce.inventory.getBackInStockInformation

  • commerce.inventory.getStockLocations

  • commerce.inventory.getProductStockLocations

Extending the other pipelines is optional.