Enrichment configuration
Before a content author can add enrichment content to product pages, configure your query.yaml file so the storefront can automatically generate the enrichment.json file it depends on.
Configure query.yaml to generate enrichment.json
Section titled “Configure query.yaml to generate enrichment.json”To include the enrichment index configuration, configure your helix-query.yaml or the query.yaml pushed to your Helix site config.
version: 1indices: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'), '([^,]+)')The /enrichment/enrichment.json file is generated automatically from this configuration — you don’t need to create it manually.
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 - Each site has its own independent configuration, so multiple sites don’t conflict.
Option 2: GitHub-based configuration
- Place as
helix-query.yamlin your GitHub repository. - All sites that share this codebase share this configuration, so use this option for multi-site deployments with shared configuration.
To allow your content author to add enrichment content, provide access to the storefront once enrichment.json is generated correctly.
Troubleshooting
Section titled “Troubleshooting”Enrichment content doesn’t appear on product pages
- Verify the
query.yamlconfiguration: Confirm the enrichment index is configured with the correctincludepattern ('**/enrichment/**'). - Confirm the enrichment target: Check that
target: /enrichment/enrichment.jsonis present in your configuration. - Compare against the boilerplate: Check your
query.yamlagainst the default-query.yaml in the AEM boilerplate repository. - Check the browser console: Identify JavaScript errors that prevent enrichment from loading.
If issues continue, check the AEM boilerplate repository for a reference implementation, or contact Adobe Commerce support with the specific error messages from your browser console.