Skip to content
Content customizations

Enrichment

This topic introduces you to enrichmentAdditional contextual content shown around commerce experiences to improve a shopper’s page experience. for product pages in your storefront. You will learn how to add content blocksEdge Delivery Services blocks used for non-commerce page content and layout, such as cards, columns, headers, and footers. above or below a commerce block (or any other block).

Before you can use enrichment functionality, you must complete the following setup steps:

Configure query.yaml to generate enrichment.json

Section titled “Configure query.yaml to generate enrichment.json”

The enrichment.json file is automatically generated by the system when you configure your query.yaml file properly. You do not need to manually create this file.

Configure your helix-query.yaml or the query.yaml pushed to your Helix site config to include the enrichment index configuration.

version: 1
indices:
enrichment:
target: /enrichment/enrichment.json
include:
- '**/enrichment/**'
properties:
title:
select: head > meta[property="og:title"]
value: |
attribute(el, 'content')
products:
select: head > meta[name="enrichment-products"]
values: |
match(attribute(el, 'content'), '([^,]+)')
categories:
select: head > meta[name="enrichment-categories"]
values: |
match(attribute(el, 'content'), '([^,]+)')
positions:
select: head > meta[name="enrichment-positions"]
values: |
match(attribute(el, 'content'), '([^,]+)')

Choose the correct location for your query.yaml

Section titled “Choose the correct location for your query.yaml”

You have two options for where to place your query.yaml configuration:

Option 1: Site-specific configuration (Recommended for Helix 5)

  • Configure at: https://admin.hlx.page/config/[ORG]/sites/[SITE]/content/query.yaml
  • This is the recommended approach for new Helix 5 projects
  • Each site has its own independent configuration to prevent conflicts between different sites

Option 2: GitHub-based configuration

  • Place as helix-query.yaml in your GitHub repository
  • This configuration will be shared among all sites using the same code reference
  • Suitable for multi-site deployments with shared configuration

After completing the above steps, verify that your enrichment setup is working by:

  1. Test enrichment functionality: Create enrichment content and test it on a product page
  2. Check browser console: Look for any JavaScript errors that might prevent enrichment from loading

The enrichment system uses specific metadata tags in your enrichment content documents to determine when and where content should appear. Based on the query.yaml configuration, the following metadata properties are supported:

Metadata Tag Purpose Example
enrichment-productsComma-separated list of product SKUs SKU-001, SKU-002, SKU-003
enrichment-categoriesComma-separated list of category IDs watches, electronics, accessories
enrichment-positionsComma-separated list of positions above, below, header, footer

When creating enrichment content, add these metadata tags to the document’s frontmatter:

---
title: "Special Watch Promotion"
enrichment-products: "WATCH-001, WATCH-002"
enrichment-categories: "watches, accessories"
enrichment-positions: "below"
---

The following steps show you how to enrich a commerce block by placing content blocks above or below it. This content positioningThe placement order of content blocks and commerce blocks on a page, including above/below relationships. pattern uses an enrichment block to control where supporting content appears. The following example shows the default product-details document with a simple product recommendation block below it.

Add enrichment blocks

Add enrichment blocks

Open the document that contains the commerce block you want to enrich. In the boilerplate starter content, open the products/default to see an example of a product recommendation block below the product details block.

Add a normal headings, text, images or content blocks above or below the commerce block in the document. You can copy content blocks (tables) from the AEM Sidekick Library and paste them into the document.

Use AEM Sidekick to preview and publish the changes to see the content above or below the commerce block.

Universal Editor preserves enrichment block wrappers so they remain visible and authorable. You can edit enrichment block properties directly in the visual editor. On the published storefront, the wrapper loads enrichment content and then removes itself, leaving the page layout unchanged.

Enrichment blocks are used to add content above or below commerce blocks based on product and category numbers. The following steps show you how to enrich a commerce block by placing an enrichment block above or below it.

Add enrichment blocks

Add enrichment blocks

In your content folder, add a new document to the enrichment folder. You can duplicate the product-banner document and rename it. Then add the content you want to display below the commerce block.

Change the metadata values for the enrichment content to match the product SKUs or product categories for which you want your content to appear.

Use AEM Sidekick to preview and publish the changes to see the content above or below the commerce block.

If enrichment functionality is not working as expected, follow these troubleshooting steps:

Enrichments not appearing on product pages

  • Check browser console: Look for JavaScript errors that might prevent enrichment from loading
  • Verify query.yaml configuration: Ensure the enrichment target is properly configured in your query.yaml file
  • Check content structure: Ensure enrichment content follows the correct document structure
  • Content not published: Verify that enrichment content documents are properly published

Enrichment content not displaying

  • Metadata mismatch: Ensure the enrichment-products and enrichment-categories metadata values match your actual product SKUs and category IDs
  • Missing metadata: Verify that enrichment content documents include the required metadata tags (enrichment-products, enrichment-categories, enrichment-positions)
  • Content not published: Use AEM Sidekick to preview and publish enrichment content
  • Document structure: Verify that enrichment content follows the correct table structure
  • Query.yaml configuration: Ensure the enrichment index is properly configured with the correct include pattern ('**/enrichment/**')
  1. Check browser console: Open developer tools and look for JavaScript errors
  2. Verify query.yaml configuration: Check your site’s query.yaml configuration at https://admin.hlx.page/config/[your-site]/content/query.yaml
  3. Confirm enrichment target: Ensure the enrichment target is properly configured (lines 34-54 in the boilerplate example)
  4. Test with boilerplate: Compare your setup with the AEM boilerplate repository

If you continue to experience issues:

  1. Check the AEM boilerplate repository for reference implementations
  2. Review the default-query.yaml configuration
  3. Contact Adobe Commerce support with specific error messages from your browser console

In this topic, you learned how to enrich drop-in components by adding Edge Delivery Services content and enrichment blocks above and below commerce blocks (powered by drop-in components). You also learned about the prerequisite setup steps and troubleshooting common issues.