Future Stock

Future stock is a B2B storefront feature that allows logged-in users to view the future availability of products on the product details page.

The future stock feature allows you to see the future availability of a product on the product details page. You need to be logged in to see it. When you click on the Future availability button, an accordion expands and displays a list of future availabilities for the product. If the list is not available, the following message is displayed: "The product has no future availability information".

The following is an example of the Future Availability dropdown accordion that appears in the product summary:

Requirements

The future stock feature requires SAP Commerce Cloud 2205 or newer.

Enabling Future Stock

The future stock feature can be enabled by installing the @spartacus/product feature library. For more information, see Installing Additional Composable Storefront Libraries.

CMS Components

The future stock feature is CMS driven, and consists of the FutureStockComponent CMS component.

You can configure the future stock feature by using SmartEdit to display the FutureStockComponent component in composable storefront, or you can manually add the component to a content slot using ImpEx.

If you are using the Spartacus Sample Data Extension, the FutureStockComponent component is already enabled. However, if you decide not to use the sample data extension, you can enable the component through ImpEx.

Adding the CMS Component Manually

This section describes how to add the FutureStockComponent CMS component to composable storefront using ImpEx.

$contentCatalog=powertools-spaContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]

You can create the FutureStockComponent CMS component with the following ImpEx:

INSERT_UPDATE CMSFlexComponent;$contentCV[unique=true];uid[unique=true];name;flexType;&componentRef
;;FutureStockComponent;Future Stock Component;FutureStockComponent;FutureStockComponent

You can add the FutureStockComponent CMS component to the ProductSummarySlot slot with the following ImpEx:

UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];cmsComponents(uid, $contentCV)[mode=append]
;;ProductSummarySlot;FutureStockComponent

Configuring

No special configuration is needed

Extending

No special extensibility is available for this feature.