ID mapping

By design, the remote product repository is always regarded as the main repository, which by default owns the products. That makes the ID of the products and artifacts in the external system the primary key.

In Sitecore, the IDs of the corresponding items for products and artifacts are generated by Connect instead of relying on the default Sitecore implementation, which automatically generates a new GUID for each new item created.

Using a hash algorithm, it is possible to generate a direct mapping between the IDs coming from the external system and the item IDs in Sitecore with the following benefits:

  • No need for mapping tables, which take up space.

  • Retrieving the ID of the corresponding item is very quick.

  • No need to search for the items in Sitecore if the external ID is provided.

The default implementation is based on the MD5 hash algorithm, which has the following format:

Item.ID = MD5.ComputeHash(Prefix + ExternalID);

You can also create a custom ID mapping implementation.