1. The Wish lists service layer

Wish lists 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 will typically be extended, when integrated with a specific commerce system.
  • The domain model is used when a Sitecore developer needs 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.

0300001C.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 follows the best practice guidelines defined in the 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 than that provided by default, the implementation can be replaced. All instantiation of actual classes will be handled through dependency injection.

Class: WishList

The WishList class is responsible for representing a wish list or any variant of it.

NameTypeDescription
ExternalIdStringUnique identifier for the wish list in the commerce system.
CustomerIdStringThe ID of the customer in the external commerce system.
IsFavoriteBoolThis is the customer’s preferred wish list.
LinesListThe line items within the wish list.
NameStringThe friendly name of the wish list.
ShopNameStringThe shop the wish list is associated with.
UserIdStringThe Sitecore user ID.

Class: WishListLine

The WishListLine class is responsible for representing a wish list line or any variant of it.

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.
QuantityunintThe quantity of product on the line item.
ProductCartProductThe product in the line item.
TotalTotalThe total cost of the line item.

Class: WishListHeader

The WishListHeader class is responsible for representing a wish list header or any variant of it. The wish list header acts as a summary of the wish list.

NameTypeDescription
ExternalIdStringUnique identifier for the wish list in the commerce system.
ShopNameStringThe shop name associated to the wish list.
NameStringThe friendly name of the wish list.
CustomerIdStringThe ID of the customer in the external commerce system.
IsFavoriteBoolIs this the user’s default wish list.
If you have suggestions for improving this article, let us know!