Elements of the Plugin.Sample.ContentHub plugin

Current version: 10.0

The Plugin.Sample.ContentHub plugin contains the sample source code you need to build your own Content Hub to Sitecore XC extension connector.

This topic highlights some of the main elements of the plugin. For details, you can access the plugin source code in the Sitecore.Commerce.Engine.SDK ZIP package, in the Sitecore.Commerce.Engine.SDK.*.*.**\src\Plugin.Sample.ContentHub folder.


The Plugin.Sample.ContentHub plugin is compatible and tested with Sitecore Experience Commerce 10.0 and Sitecore Content Hub release 3.2.203.

For integration with any other version of Sitecore Content Hub, you must create your own plugin extensions for compatibility.


The Plugin.Sample.ContentHub plugin defines the ImportEntityCommand class. The ImportEntityCommand command is used for importing changes to a Content Hub product entity property .

The ImportEntityCommand executes the ImportEntityPipeline.


The Plugin.Sample.ContentHub sample plugin defines the following component classes:

  • ContentHubImage

  • ContentHubImagesComponent

The ContentHubImage class

The ContentHubImage class defines the following information about the asset retrieved from Content Hub DAM:

Parameter name



The URL of the image. (Uri)


The width (in pixels) of the image. (Integer)


The height (in pixels) of the image. (Integer)


The alternative information for an image if a user cannot view it. (String)


Determines whether the image is master (main) or not. (Boolean)


The related public link ID. (string)

The ContentHubImagesComponent class

The ContentHubImagesComponent class represents a list of images retrieved from Content Hub DAM.


The Plugin.Sample.ContentHub plugin defines the following model classes:

  • AssetRendition

  • Changeset

  • ConversionConfiguration

  • CroppingConfiguration

  • DeleteEntityMessage

  • EntityMessage

  • FileProperties

  • PropertyChange

  • PropertyMap

  • Ratio

  • RelationChange

  • SaveEntityMessage

  • ServiceBusMessage

  • ServiceBusMessageContext


The Plugin.Sample.ContentHub plugin defines pipelines used to import updates to PCM products and DAM assets to Sitecore XC. The following table lists the pipelines and provides a brief summary.




The main pipeline called when the Commerce Engine receives notification from the Azure Service Bus. Imports updated entities from Content Hub (using the FetchEntityBlock block).


When a PCM product is updated, this pipeline fetches the equivalent sellable item in the Commerce Engine and synchronizes changes to the entity properties or related images.


When an asset is updated, this pipeline retrieves all CMP products linked to updated assets, and then calls the ImportAssetProductEntityPipeline for each of them to synchronize changes to each correlated sellable item in the Commerce Engine.


Imports updates made to an image public link managed in DAM.


The Plugin.Sample.ContentHub plugin defines the ImportEntityArgument class, which contains information used for the import process.

EntityViews block

The GetSellableItemContentHubImagesViewBlock populates a sellable item view (in the XC Business Tools) with images information from DAM.


The Plugin.Sample.ContentHub plugin defines the following policies used to configure various aspects of the connector in the Commerce Engine:

  • AssetSynchronizationPolicy

  • AzureServiceBusPolicy

  • BizFxPolicy

  • ContentHubClientPolicy

  • ProductSynchronizationPolicy

  • SynchronizationPolicy

These policies are exposed for configuration in the Plugin.Sample.ContentHub.PolicySet.json file. The path to the file is Commerce.SDK/src/Sitecore.Commerce.Engine/wwwroot/data/Environments/PlugIn.ContentHub.PolicySet-1.0.0.json.disabled . The policies and their properties are described here.

Do you have some feedback for us?

If you have suggestions for improving this article,