Fulfillment actions, commands, and pipelines

Version: 10.3

The Sitecore.Commerce.Plugin.Fulfillment plugin provides the following fulfillment actions, commands, and pipelines:

Action/Command/Pipeline

Description

Api/GetCartFulfillmentOptions 

GetFulfillmentOptionsCommand 

GetCartFulfillmentOptionsPipeline

Retrieves a list of fulfillment options, with the ability to filter based on items in the Cart.

Parameters:

  • cartId: the identifier of the cart

Api/GetCartLineFulfillmentOptions

GetFulfillmentOptionsCommand

GetCartLineFulfillmentOptionsPipeline

Retrieves a list of available fulfillment options for a specific cart line.

Parameters:

  • cartId: the identifier of the cart

  • cartLineId: the identifier of the cart line

Api/GetFulfillmentMethods

GetFulfillmentMethodsCommand

GetFulfillmentMethodsPipeline

Retrieves a list of all available fulfillment methods. The IGetFulfillmentMethodsPipeline contains the following blocks:

  • The GetFulfillmentMethodsFromCacheBlock block checks the presence of the fulfillment methods in the Fulfillment cache; this cache stores fulfillment entities.

  • The GetFulfillmentMethodsBlock block checks the presence of FulfilmentMethodItems in the ItemsCollectionCache. This cache stores storefront configuration items imported from Sitecore. If the block finds the items in the cache, it adds them to the CommercePipelineExecutionContext; if it is not found, it is retrieved from Sitecore.

  • The TranslateItemsToFulfillmentMethodsBlock block transforms Sitecore items received in the GetFulfillmentMethodsBlock block into the fulfillment entities.

Parameters: none

Api/GetCartFulfillmentMethods

GetFulfillmentMethodsCommand

GetCartFulfillmentMethodsPipeline 

Retrieves a list of all available fulfillment methods for a cart, based on the populated FulfillmentComponent and the items in the cart.

Parameters:

  • cartId: the identifier of the cart

  • fulfillment: a PhysicalFulfillmentComponent (ShippingParty populated)

Api/GetCartLineFulfillmentMethods

GetFulfillmentMethodsCommand

GetCartLineFulfillmentMethodsPipeline

Retrieves a list of all available fulfillment methods for a cart line, based on the populated FulfillmentComponent and the item in the cart line.

Parameters:

  • cartId: the identifier of the cart

  • fulfillment: a PhysicalFulfillmentComponent (LineID populated with a specific Line Id, ShippingParty populated)

Api/SetCartFulfillment

SetCartFulfillmentCommand

SetCartFulfillmentPipeline

Sets a cart-level fulfillment option.

Parameters:

  • cartId: the identifier of the cart

  • fulfillment: the fulfillment option

The command:

  • validates the FulfillmentComponent

  • sets the component into the cart

  • calculates the cart

  • persists the cart

  • adds cart totals to return the models collection

Api/SetCartLineFulfillment

SetCartLinesFulfillmentCommand

SetCartLinesFulfillmentPipeline

Sets a cart line-level fulfillment option.

Parameters:

  • cartId : the identifier of the cart

  • cartLineId: the identifier of the cart line

  • fulfillment: the fulfillment option

The command:

  • validates the FulfillmentComponent

  • sets the component into the cart line

  • calculates the cart line

  • persists the cart line

  • adds the cart line totals to return the models collection

Api/Shipments

FindEntitiesInListCommand

FindEntitiesInListPipeline

Returns all shipments in the shipments list. This could be a very long list so do not use for routine processing. Instead, use the GetList functionality.

Parameters: none

The command:

  • Uses FindEntitiesInList to retrieve all of the items in the Shipments list.

Api/Shipments(id)

FindEntityCommand

FindEntityPipeline

Returns a specific shipment based on its identifier.

Parameters:

  • Id: the identifier of the shipment

The command:

  • Retrieves a specific shipment entity using the FindEntityPipeline.

Note

The following is not implemented: Api/FulfillmentOptions.

Do you have some feedback for us?

If you have suggestions for improving this article,