Inventory policies

Version: 10.0

The Commerce Engine encompasses extensible services that enable you to customize commerce functionality.

Note

Do not extend or inherit from out-of-the-box policies; instead, create your own. You can change the values in a policy by modifying the PolicySet JSON or the Environment JSON, depending on where the policy is defined and then re-running Bootstrap.

The Sitecore.Commerce.Plugin.Inventory defines the following policies.

GlobalInventoryPolicy

The GlobalInventoryPolicy defines global inventory settings, for example for stock level, and adjusting stock levels with orders. The following table lists and describes the properties and default values of the GlobalInventoryPolicy:

Property

Default value

Description

CheckStockLevel

false

Note

This property is not currently used.

SubtractStockOnOrder

true

Note

This property is not currently used.

DefaultAllocationDateAvailable

DateTimeOffset.MinValue

Note

This property is not currently used.

RetryInventoryUpdatesOnCheckout

true

When set to true (default), a mechanism is activated to retry inventory updates when multiple API request occur concurrently to avoid concurrency errors.

MaxInventorySetLength

50

Indicates the maximum number characters a an inventory can set name can contain, for example when a business user creates an inventory set in the Inventory dashboard.

LoggingPolicy

The LoggingPolicy policy contains the following properties:

Note

The LoggingPolicy policy is not currently used.

Property

Default value

Description

LogInventoryItemFromContext

false

Not used.

LogGetDefaultInventoryItem

false

Not used.

KnownInventoryActionsPolicy

The KnownInventoryActionsPolicy policy defines the names (in string format) of inventory entity view actions used in the Inventory dashboard, in the Sitecore XC Business Tools.

Note

The properties of the KnownInventoryActionsPolicy are used by the Sitecore Business Tools UI and should not be changed.

Property

Default value

AddInventorySet { get; set; }

AddInventorySet

EditInventorySet { get; set; }

EditInventorySet

RemoveInventorySet { get; set; }

RemoveInventorySet

ValidateInventorySetCanBeRemoved { get; set; }

(ValidateInventorySetCanBeRemoved

AssociateSellableItemToInventorySet { get; set; }

AssociateSellableItemToInventorySet

DisassociateSellableItemFromInventorySet { get; set; }

DisassociateSellableItemFromInventorySet

EditSellableItemInventory { get; set; }

EditSellableItemInventory

TransferInventory { get; set; }

TransferInventory

AssociateCatalog { get; set; }

AssociateCatalog

DisassociateCatalog { get; set; }

DisassociateCatalog

PaginateInventorySellableItemList { get; set; }

PaginateInventorySellableItemList

PaginateInventorySetList { get; set; }

PaginateInventorySetList

PaginateInventorySetCatalogs { get; set; }

PaginateInventorySetCatalogs

PaginateSellableItemInventorySets { get; set; }

PaginateSellableItemInventorySets

KnownInventoryViewsPolicy

The KnownInventoryViewsPolicy policy defines the inventory views displayed in the Inventory dashboard, in the Sitecore XC Business Tools.

Note

The properties of the KnownInventoryViewsPolicy are used by the Sitecore Business Tools UI and should not be changed.

Property

Default value

InventoryDashboard { get; set; }

InventoryDashboard

InventorySets { get; set; }

InventorySets

InventorySetCatalogs { get; set; }

InventorySetCatalogs

InventorySetCatalogs { get; set; }

InventorySetCatalogs

InventorySetSellableItems { get; set; }

SellableItemInventorySets

AssociateSellableItem { get; set; }

AssociateSellableItem

EditInventory { get; set; }

EditInventory

TransferInventory { get; set; } 

TransferInventory

Master { get; set; }

Master

Details { get; set; }

Details

Summary { get; set; }

Summary

Back-orderability policies

The Sitecore.Commerce.Plugin.Backorderable plugin implements the configuration policies.

Note

Backorder functionality provided by the Sitecore.Commerce.Plugin.Backorderable plugin is not fully implemented in this release.

AvailabilityBackOrderedPolicy

The AvailabilityBackOrderedPolicy policy is used to temporarily store information about the back-order availability of a product during the processing of an order.

Note

The AvailabilityBackOrderedPolicy policy is not meant as a configuration policy. It stores information that comes from an InventoryInformation.BackorderableComponent. It is also used as a flag by the DelayedAvailability plugin during order processing to determine which lines of an order are on backorder.

The AvailabilityBackOrderedPolicy policy provides the following configuration properties:

Property

Default value

Description

BackorderLimit

0

The maximum number of a sellable item a customer can purchase if it is out of stock in that inventory set.

QuantityOrdered

0

Allows blocks processing orders know the number of backorders already placed against a sellable item or one of its variants, to make sure that the backorder limit is not exceeded.

Note

This property is not currently used.

AvailabilityDate

DateTimeOffset.UtcNow

The date when a backordered sellable item becomes available in an inventory set. The date and time are set to the current Coordinated Universal Time (UTC) date and time. The offset time is Zero.

GlobalBackorderablePolicy

The GlobalBackorderablePolicy policy provides the following configuration properties:

Property

Default value

Description

 BackorderableAvailabilityExpires

3

Represents the number of days the result from a backorder availability check is considered valid (without re-checking). The value of this property is assigned by ItemAvailabilityComponent.AvailabilityExpires.

KnownBackorderableListsPolicy

The KnownBackorderableListsPolicy policy provides the following property:

Property

Default value

Description

 BackOrders

BackOrders

Sets the name of the list that contains backorders.

KnownBackorderableOrderStatusPolicy

The KnownBackorderableOrderStatusPolicy policy provides the following configuration properties:

Property

Default Value

Description

Backorderable

Backorderable

The status name of items that can be backordered and that are added to the list of backorders (KnownBackorderableListsPolicy).

Pre-orderability policies

The Sitecore.Commerce.Plugin.Preorderable plugin implements the configuration policies.

Note

Preorder functionality provided by the Sitecore.Commerce.Plugin.Backorderable plugin is not fully implemented in this release.

AvailabilityPreOrderedPolicy

The AvailabilityPreOrderedPolicy policy provides the following configuration properties:

Property

Default value

Description

AvailabilityDate

DateTimeOffset.UtcNow

The date a sellable item is available for preorder from that inventory set. The date and time are set to the current Coordinated Universal Time (UTC) date and time. The offset time is Zero.

QuantityOrdered

0

Allows blocks processing orders know the number of preorders already placed against a sellable item or one of its variants, to make sure that the preorder limit is not exceeded.

This property is not currently used.

PreOrderLimit

0

The amount of sellable items a customer can preorder from that inventory set.

CanOrderOn

DateTimeOffset.UtcNow

Note

This property is not currently used.

GlobalPreorderablePolicy

The GlobalBackorderablePolicy policy provides the following configuration properties:

Property

Default value

Description

 PreorderableAvailabilityExpires

3

Represents the number of days the result from the preorder availability check is considered valid (without re-checking).

KnownPreorderableListsPolicy

The KnownBackorderableListsPolicy policy provides the following configuration properties:

Property

Default value

Description

PreOrders

PreOrders

Sets the name of the list that contains preorders.

KnownPreorderableOrderStatusPolicy

The KnownPreorderableOrderStatusPolicy policy provides the following configuration properties:

Property

Default value

Description

Preorderable

Preorderable

The status name of items that can be preordered and that are added to the list of preorders.

Do you have some feedback for us?

If you have suggestions for improving this article,