Extend the schema for products
If you use a custom domain model for your products in Sitecore Content Hub or have already extended the product definition, these configurations may not match your specific requirements.
To leverage Content Hub product entity definitions, the Sitecore Connect for Microsoft D365 Commerce - Content Hub connector synchronizes basic product information to reflect your D365 products within Content Hub using the following fields in the M.PCM.Product entity definition:
-
ProductName
-
ProductLabel
-
ProductNumber
-
ProductShortDescription
You must add the following additional fields to the M.PCM.Product entity for the connector to work properly:
-
D365ProductNumber
-
D365ProductId
-
D365EntityId
-
D365EntityTranslations
-
DVCColorToProduct
-
DVCSizeToProduct
-
DVCStyleToProduct
-
DVCProductCategoryToProduct
-
ProductToGalleryAsset
-
ProductGalleryAssetsInSortedOrder
These fields are tied closely to the default functionality of the connector. Manual updates to data stored in these fields are discouraged.
To extend the schema for products, you:
-
update the M.PCM.Product entity
-
add members to D365 Commerce group
-
add members to the URLMapping group
Update the M.PCM.Product entity
To update the M.PCM.Product entity:
-
In Content Hub, on the menu bar, click Manage.
-
On the Manage page, click Schema.
-
In the search box, enter M.PCM.Product and select it.
-
On the M.PCM.Product entity detail page, click New Group.
-
In the New member group dialog box, enter the following values, and click Save:
-
Name - D365Commerce
-
Label (English) - D365 Commerce
-
-
On the M.PCM.Product entity details page, click New Group.
-
In the New member group dialog box, in the Name field, enter URLMapping and, in the Label (English) field, enter URLMapping.
-
Click Save.
Add members to the D365 Commerce group
To add the D365ProductNumber member to the D365 Commerce group:
-
In the left pane, select the D365 Commerce membership group and click New member.
-
In the New member dialog, select Property.
-
From the data type list, select String and click Next.
-
For the D365ProductNumber member, enter in the following settings:
-
Name - D365ProductNumber
-
Label (English) - D365 Product Number
-
Multilanguage - Off
-
Unique - Off
-
Include in content - On
-
Include in autocomplete - On
-
Allow Updates - Off
-
Boost - Off
-
Secured - Off
-
Content type - Single line
-
-
Click Save.
-
Repeat steps 1-5 to add the following members:
Type
Name
Label
Settings
Property - String
D365ProductId
D365 Product ID
-
Multilanguage - Off
-
Unique - Off
-
Include in content - On
-
Include in autocomplete - Off
-
Allow Updates - Off
-
Boost - Off
-
Secured - Off
-
Content type - Single line
Property - String
D365EntityId
D365 Entity Id
-
Multilanguage - Off
-
Unique - Off
-
Include in content - Off
-
Include in autocomplete - Off
-
Allow Updates - Off
-
Boost - Off
-
Secured - Off
-
Content type - Single line
Property - String
D365EntityTranslations
D365 Entity Translations
-
Multilanguage - Off
-
Unique - Off
-
Include in content - Off
-
Include in autocomplete - Off
-
Allow Updates - On
-
Boost - Off
-
Secured - Off
-
Content type - Single line
-
-
With the D365 Commerce membership group selected, click New member.
-
In the New member dialog, next to TAXONOMY, click Select.
-
In the New member dialog, on the General information tab, enter the following:
-
Name - DVCColorToProduct
-
Label (English) - Product color
-
Associated label - Products
-
Associated definition - DVC.Color
-
Cardinality - OneToMany
-
-
Click the Conditional tab and, from the list, select M.PCM.Product.IsVariant, and click Add.
NoteIf you do not see M.PCM.Product.IsVariant as an option, go to the schema and, in the Enable/Disable dialog box, click the Variants switch to make it active (On).
-
Click the Advanced tab and then click Allow updates to make it active (On).
-
Click Save.
To add the ProductGalleryAssetsInSortedOrder member to the URLMapping group:
-
In the left pane, select the URLMapping membership group, and click New member.
-
In the New member dialog box, select Property.
-
From the data type list, select String, and click Next.
-
Enter in the following settings:
-
Name - ProductGalleryAssetsInSortedOrder
-
Label (English) - Product Gallery Assets in Sorted Order
-
Multilanguage - Off
-
Unique - Off
-
Include in content- On
-
Include in autocomplete - Off
-
Allow Updates - (On)
-
Boost - Off
-
Secured - Off
-
Content type - Multi-line.
-
-
Click Save.
To add DVCStyleToProduct to the D365 Commerce group:
-
With the D365 Commerce membership group selected in the left pane, click New member.
-
In the New member dialog, next to TAXONOMY, click Select, and click Next.
-
In the New member dialog, on the General information tab, enter the following information:
-
Name - DVCStyleToProduct
-
Label (English) - Product style
-
Associated label - Products
-
Associated definition - DVC.Style
-
Cardinality - OneToMany.
-
-
Click the Conditional tab and, from the list, select M.PCM.Product.IsVariant, and click Add.
-
Click the Advanced tab and then click the Allow updates switch to make it active (On).
-
Click Save.
-
Repeat steps 1-6 to add a new member using the following values:
Type
Name
Label
Settings
Relation
DVCSizeToProduct
Product size
-
Associated label - Products
-
Associated definition - DVC.Size
-
Cardinality - OneToMany
-
-
On the DVCSizeToProduct detail page, from the list, select M.PCM.Product.IsVariant, and click Add.
-
Click the Advanced tab, click the Allow updates switch to make it active, and then click Save.
-
Click Apply changes to confirm your update.
To add the ProductToGalleryAsset relation to the URLMapping group:
-
With the URLMapping membership group selected in the left pane, click New member.
-
In the New member dialog box, select RELATION, and click Next.
-
In the New member dialog box, on the General information tab, enter the following settings:
-
Name - ProductToGalleryAssets
-
Label (English) - Gallery Assets
-
Associated label - Product Gallery
-
Associated definition - M.Asset
-
Cardinality - ManyToMany.
-
-
Click the Advanced tab and then click the following switches to make them active (On):
-
Content Copied
-
Completion Copied
-
Allow navigation
-
Inherits security
-
Allow updates
-
-
Click Save.
-
Click Apply changes to confirm your update.