Extend Storefront Next with Features

Enable built-in extensions to add more features to your storefront with the Storefront Next extension framework. You can also build custom extensions to reuse across multiple storefronts or distribute to multiple customers. Independent Software Vendors (ISVs) build extensions that customers install in their storefronts. Implementers apply extensions to multiple customers.

If you plan to use a customization only once, customize your storefront code instead of building an extension.

All extensions are defined in /src/extensions/config.json in the retail app.

The built-in extensions that are available and enabled by default for your storefront include:

  • Store Locator: Enables a shopper to find a store based on a given location.
  • Buy Online Pickup In Store: Enables a shopper to order online and pick up their order at a physical store. Requires the Store Locator extension to be installed.
  • Multiship: Enables shoppers to ship items to multiple different addresses in a single order.
  • (Demo) Buy Now Pay Later: Renders an inline installment message and a payment-schedule modal on the PDP. Ships with mock fixtures; replace the bodies of the API functions to integrate a real provider, such as PayPal, Klarna, and Affirm.
  • (Demo) Customer Preferences: Enables shoppers to manage interests and shopping preferences from their account page.
  • (Demo) Ratings & Reviews: Renders customer reviews on the Product Detail Page (PDP), the rating summary on the cart-item modal, and the per-line rate-and-review CTA on order detail. Includes prototyped fixtures. Replace the bodies of the API functions to integrate a real provider, such as Bazaarvoice, PowerReviews, Yotpo, and Trustpilot.
  • (Demo) Product Content: Renders three PDP surfaces backed by editorial or CMS-style content. The PDF surfaces include a returns and warranty card with a ‘View Policies’ modal, an ‘Ask assistant’ FAQ, and the merchant-customizable collapsible sections (Materials, Usage Instructions, Care Instructions, and Specifications). Includes prototyped fixtures. Replace the bodies of the API functions to integrate a real CMS, PIM, or Page Designer-backed content service.
  • (Demo) Shipping & Delivery: Renders estimated delivery information on the PDP and provides a zip-code shipping estimator for the Buy Online Pickup In Store delivery flow. Includes prototyped fixtures. Replace the API function bodies to integrate a real shipping provider.

All the demo extensions aren’t connected to data sources. Modify these extensions to connect them to third-party services.

When you create a storefront with the pnpm dlx @salesforce/storefront-next-dev create-storefront command, choose which extensions to enable and disable. To enable an extension after the storefront is created, use the pnpm dlx @salesforce/storefront-next-dev extensions install command. To disable an extension, use the pnpm sfnext extensions remove command. For a command reference, see Command-Line Interface (CLI) Reference.

Build a custom extension to add more features or reusable components to your storefront. For example, add UI widgets, backend integrations, or business logic add-ons. To build an extension, follow the instructions in Extensions Directory. This file is at /src/extensions/README.md in your local retail app folder.