Show / Hide Table of Contents

    SEO mapping developer information

    Design

    Model

    The SEO mapping build process uses the catalog post processing mechanism to process the products (more information can be found here).

    The BuildSeoMappingsProcessor uses the SeoMappingBuilder to build up the list of SEO mappings of the product catalog by passing each product item to the builder. After processing all products the SEO mappings are saved using the IMappingStorage<SeoAttribute>. The latter calls the pipeline named mercury.seo.savedata for saving the data.

    Build SEO mappings sequence diagram

    Build SEO mappings

    The SeoMappingBuilder instantiates the SeoMappingMerger with the initial SEO mappings which are retrieved from the IMappingStorage<SeoAttribute>. The reason for this is, because the previous generated values need to be maintained. The SeoMappingMerger will return the resulting complete list of SEO mappings.

    The SeoMappingBuilder will map each ProductItemContainer to a list of ProductWithVariant objects and retrieves the SEO mappings of these objects from the SeoMapper. The SEO mappings will be passed to the SeoMappingMerger for merging which contains business logic to process duplicate mappings etc.

    The SeoMapper is responsible for translating catalog field values to SEO values. The catalog fields which are required for translation can be configured. A format string for the product URL segment and prefix for SEO values can be configured as well. See Configuration SEO mapping for more information about configuration settings.

    Build SEO mappings class diagram

    Build SEO mappings

    Configuration

    The process for the generation of the SEO mappings is configured in the catalogPostProcessor configuration section. For more information, see the catalog post processing article.

    Extension points

    Pipelines

    The following pipelines are offered as extension points for customization:

    • mercury.seo.savedata
    • mercury.seo.getdata

    mercury.seo.savedata

    This pipeline saves the SEO mappings.

    Mercury provides a processor for saving the SEO mappings to the Sitecore media library and is located in the namespace Mercury.Foundation.Seo.Catalog.Pipelines.SaveData.Seo.

    mercury.seo.getdata

    This pipeline retrieves the SEO mappings.

    Mercury provides a processor for retrieving the SEO mappings from the Sitecore media library and is located in the namespace Mercury.Foundation.Seo.Catalog.Pipelines.GetData.Seo.

    Configure scheduler

    Mercury provides Command items for the catalog post processing job so this can be scheduled. The SEO mapping catalog post processing jobs can be scheduled as follow:

    • Create a schedule item in Sitecore
    • Configure the schedule item
      • Command: /sitecore/system/Tasks/Commands/Mercury SEO Catalog/RebuildSeoMappingCommand
      • Items: The website root
      • Schedule: Schedule when task should run

    References

    Catalog post processing
    Configuration SEO mapping

    Advanced
    • Improve this Doc
    Back to top Copyright © 2015-2018 Aviva Solutions
    Generated by DocFX