Intershop Commerce Management provides two mechanisms for distributing products across channels: product sharing and product syndication.
Product Sharing
With product sharing, sales or partner organizations can distribute large numbers of master products to sales channels ("outbound product sharing"). The products are not copied to the target channels but remain in the parent organization's master repository.
Generally, all deriving channels share the master data, regardless of their hierarchy. Channels can, however, choose to activate all or only a selected set of the shared master products ("inbound product sharing").
Channels that share master products can still add new products or change attributes of a master product by overriding the entire product. When changing a master product attribute, a new channel product is created with a reference to the master product (which serves as a look-up fallback). Note, however, that shared product variations, bundles and retail sets cannot be modified.
Intershop recommends to use product sharing for distributing large numbers of products, assuming only little changes to the data in the channels.
Product Syndication
With product syndication, sales channels can derive master products from parent sales or partner organizations. In a mass data operation, the master products are actually copied to the channel repositories.
Product syndication requires the mapping of attributes (standard product attributes, catalog assignments, prices, etc.) of the original source product into attributes of a target product (offer). Specific rules control how attributes of the original (source) product are mapped into attributes of the target product. Upon syndicating, hence, attributes can be changed.
Intershop recommends to use product syndication for distributing products across channels if the product data is expected to be changed in the channels.
Which product distribution mechanism to apply depends on the intended business scenario, with particular respect to the number of products and their attributes, the channel structure, the expected channel-specific data changes, etc. In the context of a sizing estimation, for example, Intershop can evaluate this question and, consequently, recommend either sharing or syndication.
Note
Product sharing and product syndication cannot be used in parallel in the same channel. If sharing is enabled for a channel, products cannot be syndicated to this channel. If, in turn, products are syndicated to a channel, products cannot be shared with this channel.
This document introduces product sharing concepts.
This glossary describes the main terminology used in this document:
Term | Description |
---|---|
Base product | This is a product residing in the domain of its creation. Each channel can create base products (either manually or using import or copy operations). Base products of master repositories or partner channel repositories can be shared to dependent business or consumer channels. Base products of business or consumer channels are local to this channel. |
Derived product | A derived product in a business or consumer channel holds all changes made to this product if it was shared from a master repository or partner channel repository. |
Product view | This is a helper that implements the product interface and performs the lookup fallback from the derived product to the base product (note that a derived product may not exist in case of an unchanged base product). |
Product set | A product set contains information which products are shared. It supports global definitions, like “all products” as well as fine-grained product assignments. |
Sharing group | Synonym for “Product set” used in the user interface. |
The figure below represents the overview of the product sharing architecture in combination with the product syndication alternative:
Product sharing always starts in the master repository or partner channel repository. You have to choose the channels the products are shared with. Product syndication, in contrast, is always defined inside the channel you want to fill with products.
The red arrows pointing upwards illustrate syndication. The green arrows pointing downwards illustrate sharing. For example the products in the master repository of the Partner organization 1 are copied (syndicated) from the main sales organization. The partner organization may define its own local products, too. The products in the sales channel repository of Partner organization 2 are shared from various places – from the master repository of the partner organization as well as from the repositories in the main sales organization.
In the context of one sales channel only one of both mechanisms is allowed - sharing or syndication. If there is no sharing relation between the current sales channel and a master repository (or partner channel repository), then it is possible to use the syndication/synchronization mechanism to get product copies in this sales channel. Otherwise, it is possible to additionally apply sharing filters (inbound product sharing) to select which of all shared products will be visible in this sales channel.
A technically justified limitation is that syndication and sharing cannot be used together for distributing product data to the same target repository. Only one of the two approaches should be chosen.
A simple rule of thumb is that sharing should be used whenever it is possible. This is the preferred way to distribute products across channels simply because it is much more resource effective. Nevertheless, there are certain situations in which syndication might be preferred. This section complements the previous and gives hints when and what to use.
Syndication is preferred when:
Sharing is preferred when:
Outbound product sharing is the process of selection of the target channels and the products to be shared with these channels performed at the source (master, partner channel) repository. The sharing direction is from the source repository to several target repositories. This process shares selected (or all) products of the source domain with the channels selected as target domains.
The following main tasks are involved in the outbound product sharing mechanism:
The picture below shows the workflow of outbound product sharing:
Sales or partner organizations select the channels with which they intend to share product data. Generally, the assigned channels are intended to just reuse the original master product data.
They can, however, still add new products or apply some channel-specific changes to master products (except for shared product variations,bundles and retail sets).
An un-assignment of a channel with which the product data is shared removes the shared products from the channel.
Nevertheless, modifications applied to the shared products are maintained, i.e., re-establishing the sharing relation with the same products automatically restores previous modifications.
For every sharing relation, i.e., for every assigned channel, the parent organization defines the scope of products to be shared. The available options are: nothing, all, or by sharing group.
Option | Description |
---|---|
Share nothing | No products are shared with the assigned channels. |
Share all products | All products contained in the master product repository are shared with the assigned channels. |
Share products by sharing groups | The products grouped in a sharing group are shared with the assigned channels. |
The sharing group provides capabilities to assign target channels and to select products to be shared into the added target channels based on:
The picture below represents the user interactions that are possible to be done in the context of creating and maintaining sharing groups and their channel and product assignments.
The Intershop Commerce Management application offers the capability to select between rule-based product selection by manufacturer/category and manual (search/browse) selection of products.
The rule-based selection uses manufacturer/manufacturer alias and/or category assignment as rules for product selection, i.e., products which have manufacturer X as attribute will be assigned to the sharing group, products which have category ABC as category assignment will be assigned to the sharing group.
According to the selected manufacturers and categories the product set assignments are made. A job Update Rule Based Sharing Groups is created in domain SLDSystem that will update the assignments regularly.
Manufacturer aliases provide a comfortable way to group sharing products based on the respective manufacturer.
Using aliases, organizations can specify new manufacturer names intended to represent one or more actual manufacturers. This eases the handling of multiple manufacturers that, based on their offering, could be grouped, or, e.g., manufacturers that appear in more than one spelling.
Manufacturers assigned to a manufacturer alias cannot longer individually be retrieved in sharing groups but only with their common alias name.
The manual selection of products or the assignment of products via Search/Browse is done in two ways: select desired products directly or select a desired category with products (currently the selection of products by category is not supported by DBInit but the same functionality is supported by DBInit for rule-based product selection).
Assign By Search opens the product list view, displaying all products in the repository that are currently not assigned to the sharing group. The simple search or advanced search is used to find the products you intend to add to the sharing group.
Assign by Browse opens the list of available catalogs. To browse specific catalog categories, select the radio button for the catalog and click Next.Click the category names to view the sub-categories until you have found the intended category or product list.
At the Channels tab of the sharing group a channels can be assigned.
Basically, multiple channels can be assigned to one sharing group and multiple sharing groups can be assigned to one channel.
If a product sharing group is deleted or unshared, the according product assignments are removed. All data in DERIVEDPRODUCT, DERIVEDPRODUCTCOSTPRICE and DERIVEDPRODUCTLISTPRICE is cleared.
If a product sharing group is disabled, all product assignments are kept. They are just not visible in the Commerce Management application and/or the storefront. All data in DERIVEDPRODUCT, DERIVEDPRODUCTCOSTPRICE and DERIVEDPRODUCTLISTPRICE is preserved.
The product list view and product detail view contain further information about product sharing. The product list view of a repository that shares products to other channels contains an additional status icon if the product is shared to another repository.
The Sharing tab of the product detail view shows all channels sharing this product and related information.
Inbound product sharing is the process of selecting certain products shared from another (source) repository to be activated for current channel (which is the target domain of the sharing relation). By default, the inbound product sharing accepts/selects all shared products as active/visible in the current channel. Additionally, specific products is possible to be selected for activation. In this case, only the activated products by this inbound product set are visible in the channel. The sharing direction is from the target repository to the source repository. This mechanism activates selected (or all) products of the source domain for the current channel.
The following main tasks are involved in the inbound product sharing mechanism:
The picture below shows the workflow of inbound product sharing:
The inbound product sharing gives the receiver of shared products the ability to select all or a set of incoming products for further usage.
Activate all shared products option - assigns all shared master products to the channel repository.
Activate selected shared products option - displays the list of all available shared master products that are currently inactive, and below the list of currently active products. You can either browse through the list or perform a search to narrow the choice.
The product list view of the target channel shows appropriate status icons if the product was shared from another repository.
The Changes tab of the product detail view shows current differences between the shared product and the base product.
As mentioned above the contained products in the shared variation masters and product bundles may not be changed in the target repositories. It is also impossible to change on the target channels the product-category assignments and product links that were shared from another repository. The assignments and the links are visible but read-only.
These restrictions does not apply for the locally created assignments and links.
The sharing procedure consists of the following high level steps:
The term Sharing Group is used in the UI and it is the synonym of a Product Set. Product sets are defined for a given domain. They are extensible objects. We distinguish three types of product sets:
all
is set for this product set. Target channels assigned to this product set will share all products of the source domain.nothing
is set for this product set. The product set has no product set assignments. Target domains assigned to this product set will share no products of the source domain. This product set was introduced for easier administration in the Commerce Management application. It is used to build a sharing relation if someone decides to share products to a target channel later. Currently no products are shared, but it will be impossible to syndicate products to that target channel (syndication and sharing at the same time is not allowed for the same channel).ruleBased
flag defines how products are selected. If ruleBased is used then a rule-based product selection is made, or an explicit selection.There are two other important boolean attributes that are defined in the interface ProductSet
:
inbound
flag is set when Activate selected shared products option is applied.active
flag is indicating if the product set is enabled (active) or disabled (inactive).The following class diagram shows the ProductSet
and related classes:
The class com.intershop.beehive.xcs.internal.productset.ProductSharingHelper
can be used to determine if a domain shares products from another repository. The product sharing helper has three important methods:
isEnabled:
Returns true
if the domain shares products from other domainsgetDomains:
Returns a collection of domains which products are entirely visible in the given domainall
is set.getProductSets:
Returns all product sets with explicit product assignments (no all products product sets)The product sharing helper also implements the interface com.intershop.beehive.core.capi.query.processor.QueryParameterHandler
. This makes it possible to use the product sharing helper in query files as a pre-processing rule in queries. The following code shows an according usage.
<query> <parameters> <parameter name="Domain" type="com.intershop.beehive.core.capi.domain.Domain" optional="false"/> </parameters> <processor name="OracleSQL"> <processor-preprocessing output="Sharing" input="Domain" processing="ProductSharingHelper"/> </processor> <template type="countedobjects"> SELECT productid, count(productid) over() as ROWCOUNT FROM deletedproduct WHERE <template-if condition="Sharing:Enabled"> domainid IN (<template-loop alias="Domain" iterator="Sharing:Domains"> <loop-statement><template-variable value="Domain:UUID"/></loop-statement><loop-separator>,</loop-separator></template-loop>) <if-else/> domainid = <template-variable value="Domain:UUID"/> </template-if> </template> </query>
A usage in Java sources looks as follows:
ProductSharingHelper sharing = new ProductSharingHelper(domain); if (sharing.isEnabled()) { // do something }
A pipelet com.intershop.beehive.xcs.pipelet.productset.CreateProductSharingHelper
needs to be executed if a check for shared products for a given domain is needed in a pipeline. Sample usage can be seen below:
A derived product in a business or consumer channel holds all changes made to this product if it was shared from a master repository or partner channel repository.
The class DerivedProductPO
holds channel specific changes of products, i.e., if a product has been changed in the channel in a way that specific attributes of ProductPO
are getting a new value or any custom attribute is added or changed then a new instance of DerivedProductPO
is created that holds these changes. The primary key of the class consists of the ID of the base product and the domain ID of the channel where the product was derived.
On the picture above ProductPO
derives from the abstract class XMLExtensibleObjectPO
implementing the interface ExtensibleObject
, but providing another database design. While, the DerivedProductPO
derives from ORMObject
, because of its special primary key.
A transient class that implements the interface Product
performs all lookups using the required fallbacks. The implementation class is named ProductViewImpl
:
ProductViewImpl
uses the following fallback when getting a product (the searches must perform the same fallback in database queries):
All product queries need to return instances of the product view instead of plain products. That means all related queries require changes accordingly. The query framework will get a new result mapping type named “provider” which allows passing the provider name that is responsible to create the product view. The provider that returns product view instances is named ProductViewProvider.
The ProductViewProvider requires the UUID and the domain UUID. It is registered like any other provider instance and can change in custom projects. For more information about how to register and replace an existing provider implementation refer to Concept - Dependency Injection and ObjectGraphs and the corresponding cookbooks.
All query files that search products use the sub-query GetSharedProductsByAdvancedSearch.query
. This implements the lookup of shared products by domains or product sets. There are a couple of other places in the Java code where a similar sub-select is used. The related queries need an additional filter condition, which checks if all products are part of the inbound set if there exists one. See the second EXISTS
clause of the following query:
WHERE ( ( p.domainid IN (<SharingDomains>) OR EXISTS ( SELECT 1 FROM productsetassignment psa JOIN productset ps ON (psa.productsetuuid=ps.uuid) WHERE p.uuid=psa.productUUID AND p.domainid=ps.domainid AND psa.productsetuuid IN (<OutboundProductSetIDs>) ) ) AND ( EXISTS ( SELECT 1 FROM productsetassignment psa WHERE p.uuid=psa.productUUID AND psa.productsetuuid = <InboundProductSetID> ) OR ( p.domainid = <ProductDomainID> ) ) )
The job Update Rule Based Sharing Groups is used to refresh the assignments for rule based product sets. It is scheduled in SLDSystem domain and gets all rule based sharing groups and updates the product assignments based on the updated rules.
The main properties of this job are documented, e.g., here: Reference - Intershop 7.6 Jobs.
Note
Please note, there exists multiple lists for pre-configured jobs - one for each minor version of Intershop software.
database/GeneralContextIndex
database/LocalizedXMLAttributeContextIndex
database/XMLAttributeContextIndex
intershop.cartridges.ctx_table.<table>=<query>
ProductViewImpl
by configuring an own provider in:resources/<cartridge>/objectgraph/objectgraph.properties: global.overrideModules=com.customer.application.intershop.extensions.MyCartridgeOverrideModule
ProductViewProvider
to your own provider implementation.ProductViewImpl
and overwriting according queries.