Skip to content

Recommendations Quick Start

The Recommendations drop-in displays personalized product recommendations powered by Adobe Sensei, with support for various recommendation types and customizable display layouts.

Version: 1.1.1

New to drop-ins? Start with the Using drop-ins tutorial for step-by-step guidance.

Need to customize? See the Initialization page for advanced configuration options.

Getting started

The Recommendations drop-in is included in the Commerce boilerplate —no installation needed. For complete instructions on importing and using drop-ins in your blocks, see the Using drop-ins guide.

Quick reference

Import paths:

  • Initializer: import '../../scripts/initializers/recommendations.js'
  • Containers: import ContainerName from '@dropins/storefront-recommendations/containers/ContainerName.js'
  • Provider: import { render } from '@dropins/storefront-recommendations/render.js'

Package information:

  • Package: @dropins/storefront-recommendations
  • Version: 1.1.1 (verify compatibility with your Commerce instance)
  • Example container: ProductList

Example in boilerplate

The boilerplate includes working examples that use the Recommendations drop-in. Look for blocks with names like commerce-recommendations (for example, commerce-cart, commerce-checkout) in the blocks/ directory.

Quick example

This example shows the basic pattern for using the Recommendations drop-in. For complete details and advanced patterns, see the Using drop-ins guide.

// 1. Import initializer (handles all setup)
import '../../scripts/initializers/recommendations.js';
// 2. Import the container you need
import ProductList from '@dropins/storefront-recommendations/containers/ProductList.js';
// 3. Import the provider
import { render as provider } from '@dropins/storefront-recommendations/render.js';
// 4. Render in your block
export default async function decorate(block) {
await provider.render(ProductList, {
// Configuration options - see Containers page
})(block);
}

Next steps

Now that you understand the basics, explore these resources:

  • Using drop-ins - Complete guide with examples and patterns.
  • Containers - Available UI components and their configuration options.
  • Initialization - Customize initializer settings and data models.
  • API functions - Control drop-in behavior programmatically.
  • Slots - Extend containers with custom content.
  • Events - Listen to and respond to drop-in state changes.