The product sync domain model

Version:

This section describes the domain model that represents the product objects where the following three assertions hold true:

  • The domain model primarily serves as DTO objects for transferring information between the external commerce system and Sitecore.
  • The domain model contains the minimum required information as contracts and is typically extended, when integrated with a specific commerce system.
  • The domain model is used when a Sitecore developer wants to synchronize product data with the external commerce system or product data is pushed into Sitecore from the external commerce system

The following class diagram shows the domain model.

03000016.png
Note

The domain model consists of abstract classes that make up the contracts with the external system. The contracts are defined as abstract classes instead of interfaces to allow the model to be easily extended later if needed. This follow the best practice guidelines defined in the book Framework Design Guidelines.

Default implementation of the contracts are delivered as part of Connect. If an actual Connect provider with an external commerce system contains more functionality that provided by default, the implementation can be replaced. All instantiation of actual classes will be handled through dependency injection.

Class: Product

The product class is responsible for representing a product or any variant of it, hence a variant is a product in this model.

NameTypeDescription
ExternalIdStringUnique identifier for the product in the commerce system. This can be used to get a reference to the product using the commerce system's native API.
SitecoreItemIdStringReturns the Sitecore ID
NameStringName of the product
ShortDescriptionStringThe short description of the product.
FullDescriptionStringThe full description of the product.
ProductTypeProductTypeA reference to the product type
ManufacturersManufacturerReference to the manufacturers
ClassificationGroupsIReadOnlyCollectionReference to the associated classifications and categories
SpecificationsProductSpecificationsCollection of specifications set directly on the product
VariantSpecificationsProductVariantSpecificationsList of references to specifications that tells the variants apart and which potentially can be selectable to the visitor
ResourcesIReadOnlyCollectionReference to the associated resources
DivisionsIReadOnlyCollectionReference to the associated divisions
RelationTypesIReadOnlyCollectionReference to the related products
CreatedDateTimeDate of creation
UpdatedDateTimeDate of last update

Class: ProductSpecification

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
SitecoreItemIdStringRepresents the Sitecore ID.
GroupString
KeyString
ValueString
CreatedDateTime
UpdatedDateTime

Class: ProductSpecifications

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
SitecoreItemIdStringRepresents the Sitecore ID.
SpecificationsIReadOnlyCollection
CreatedDateTime
UpdatedDateTime

Class: ProductClassification

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
ExternalParentIdString
SitecoreItemIdStringRepresents the Sitecore ID.
NameString
DescriptionString
SpecificationsProductSpecifications
CreatedDateTime
Updated

Class: ProductType

NameTypeDescription
ExternalIdstringUnique identifier used to identify the item in an external system.
SitecoreItemIdstringRepresents the Sitecore ID.
ProductTypeIdString
DescriptionString
SpecificationsProductSpecifications
CreatedDateTime
UpdatedDateTime

Class: ProductManufacturer

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
SitecoreItemIdStringRepresents the Sitecore ID.
NameString
DescriptionString
WebSiteUrlString
ProductTypesIReadOnlyCollection
CreatedDateTime
UpdatedDateTime

Class: ProductClassificationGroup

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
SitecoreItemIdStringRepresents the Sitecore ID.
NameString
DescriptionString
ClassificationsIReadOnlyCollection
CreatedDateTime
UpdatedName

Class: ProductVariantSpecifications

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
SitecoreItemIdStringRepresents the Sitecore ID.
SpecificationsIReadOnlyCollection
CreatedDateTime
UpdatedDateTime

Class: ProductResource

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
SitecoreItemIdStringRepresents the Sitecore ID.
CreatedDateTime
UpdatedDateTime

Class: Division

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
SitecoreItemIdStringRepresents the Sitecore ID.
NameString
SubDivisionsIReadOnlyCollection
CreatedDateTime
UpdatedDateTime

Class: ProductRelation

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
SitecoreItemIdStringRepresents the Sitecore ID.
ProductProduct
ReferredProductProduct
CreatedDateTime
UpdatedDateTime

Class: ProductRelationType

NameTypeDescription
ExternalIdStringUnique identifier used to identify the item in an external system.
SitecoreItemIdStringRepresents the Sitecore ID.
NameString
RelationsIReadOnlyCollection
CreatedDateTime
UpdatedDateTime
If you have suggestions for improving this article, let us know!