Create a Sitecore Content Serialization module

Abstract

How to create a Sitecore Content Serialization (SCS) module.

Sitecore Content Serialization (SCS) modules enable you to organize and separate serialized items according to their purpose and business domain. Sitecore Helix practices recommend this to reduce technical debt. Modules also allow you to segment serialized items such as demo and test items that must not be deployed to production environments.

To create an SCS module:

  1. In your project folder, create an empty module text file named <name of module>.module.json.

  2. Insert the following properties:

    {
      "namespace": "",
      "references": [""],
      "items": ""
    }

    Property

    Inclusion

    Purpose

    namespace

    Mandatory

    The namespace of the module.

    references

    Optional

    References to other modules that must be deserialized first (such as templates in a Foundation module). This property supports wildcards (for example: Foundation.*).

    items

    Optional

    Items to be serialized. Configure your item include paths here.

  3. Save the module file.

  4. In the sitecore.json file, in the modules property, add the path to your module. Alternatively, use wildcards to automatically include modules based on your solution structure:

    {
      "modules": [
        "src/*/*/*.module.json"
      ]
    }