Concept - Product Approval 7.7

1 Introduction

The Product Approval feature allows products that meet the quality requirements (e.g., completeness of product information, images etc.) of the merchant to be reviewed and approved before publishing to the eCommerce site.

The key features that have been introduced are:

  • Product Approval is available on channel level
  • Preference for enabling/disabling the Product Approval feature
  • Two access privileges are involved in the product approval process
  • The following product approval statuses are available: Edit, In Review, Approved
  • Improvement of the Advanced Product Search in order to search for products in defined Product Approval status
  • Product Approval Status Job
  • Product Approval in the Search Indexes
  • Product Approval Status Widget

1.1 References

2 Business Overview

2.1 Available Statuses

StatusDescription
Edit

The initial status of the product when the product approval is enabled

Product Import and the creation of a new product sets the approval status to Edit

In Review  A product approval status that shows that the product data has been modified
Approved

A product approval status that shows that the product data modifications has been accepted

2.2 Product Approval User Roles

Intershop provides two access privileges that are involved in the product approval process - Product Approver and Catalog and Product Manager.

2.2.1 Product Approver

The Product Approver is responsible for managing and approving of the product data. It has the rights to set the approval status of the product data to Аpproved or to restore it back to Еdit.

The Approver does not have the permission to change the approval status to In Review.

2.2.2 Catalog and Product Manager

The Catalog & Product Manager is responsible for the enrichment of the product data. The Catalog & Product Manager has the rights to change the approval status of the product either to Еdit or to In Review and does not have to right to approve products.

2.3 Product Approval Transitions

The access privileges that are mentioned above are visualized in the following picture:

3 Functionality

3.1 Preference

Initially Product Approval functionality is disabled and all the features connected to it are hidden. Enabling of the feature happens by a channel preference in the Preferences tab.

When the Commerce Management application user enables the Product Approval Domain Preference from the section Product Editing and Product Approval for the corresponding sales channel a job is run that sets the product approval status to all the products in the channel. When the Commerce Management application user disables the Product Approval Domain Preference, another job is started that deletes the product approval status entries in the sales channel.

3.1.1 Product Approval Preference Jobs

3.1.1.1 General Product Approval Job

The General Product Approval job is accessible in the SLDSystem domain in the System Management application.

 

This job is a non - recurring System Management application job. It is executed in all sales channels of all sales organizations and is dependent on whether the product approval preference is enabled in a sales channel. The job iterates all the products in a channel. If there is no product approval entry for a product, a new one with status Edit is created. If the product is in Approved state and there has been change either in the products' standard, custom or variation attributes, the product approval status is updated to Edit.

3.1.1.2 DomainRelatedProductApprovalStatusJob

The DomainRelatedProductApprovalStatusJob job functions exactly the same way as the General Product Approval job, but it is run only for a particular sales channel and creates the necessary records in the database only for the corresponding sales channel. While, as mentioned above, the General Product Approval job creates entries for the products in all sales channels of all sales organizations.

The DomainRelatedProductApprovalStatusJob job is accessible in the desired channel domain in the System Management application.

3.1.1.3 DomainRelatedProductApprovalStatusDeleteJob

The DomainRelatedProductApprovalStatusDeleteJob job is run when a user of the Commerce Management application disables the Product Approval feature via the Preference menu. This job deletes all the corresponding Product Approval database records for the selected sales channel.

The job is available for the according channel domain in the System Management application.

For a quick overview of all jobs, please refer to: Reference - Intershop 7.7 Jobs.

3.2 Product Approval Status in Advanced Product Search

The Advanced product search is extended in order the Commerce Management application user to be able to find products according to their approval status.

A new product approval call parameter is implemented in the following queries: GetProductsByAdvancedSearch.query and GetSharedProductsByAdvancedSearch.query

<?xml version="1.0" encoding="UTF-8"?>
<query>
<parameters>
	...
	<parameter name="Approval" type="java.lang.Integer" optional="true"/>
	...
</parameters>

A new Approval field has been added in the Product Status section of the Advanced Search in the Commerce Management application:

3.3 Product Approval in Product List Page

The Product Approval feature is available either in the product list or in the product details sections of the Commerce Management application.

In the product list it is possible to select multiple products and change their approval status at once.

As there are two roles defined for the Product Approval feature each of them can see different product approval buttons in the Commerce Management application.

3.3.1 Catalog and Product Manager

Catalog and Product Manager has the permission to see Send to review and Back to editing buttons. She can select one or many products from the product list and do the following actions:

  • Click Back to editing to set the product approval status from In Review to Edit:

The next picture shows how the Approval Status(es) of the selected products were changed to Edit:

  • Click Send to review to set the product approval status from Edit to In Review:

The next picture shows the Approval Status of the selected products has changed to In Review:

3.3.2 Product Approver

The Product Approver has the permission to see Approve and Back to editing buttons and can select one or many products from the product list and do the following actions:

  • Click Approve to set the Approval Status from In Review to Approved:

The next picture shows the Approval Status(es) of the selected products were changed to Approved:

  • Click Back to editing to set the Approval Status from Approved to Edit:

3.4 Product Approval in Product Detail Page

In the product detail page the Catalog and Product Manager and the Product Approver can manage the approval status of a single product. The approval status information and buttons are available in the General tab of the product detail page. Like in the product list, the two types of users have different permissions to see different product approval buttons.

When the approval status is changed by the Back to editing button, a pop-up window is opened asking for a reason. The Reason pop-up window is available for both user roles.

When the product approval status is set back to Edit a message will be displayed in the General tab of the product detail page. This message will contain the person who wrote the reason (who rejected the product data), the time stamp and the reason.

3.5 Hash Calculation

Product Hash calculation is used for comparing changes in product data in the Product Approval Jobs. The current product hash value is calculated applying a hash function on a concatenated string formed by product standard, variation and custom attributes. This calculation can be extended or altered by creating a new ProductBOApprovalExtension implementation and registering it in component framework to replace the standard one.

3.6 Search Indexes

Product Approval status by default is not indexed by the product search index so it is not assigned to the Indexed Attributes section of the Search Indexes in the Commerce Management application. However it is available for including in the product search index from the Available Attributes section.

In order to pass the product approval data to the product search index, a new data provider ProductApprovalDataProvider has been implemented. Currently ProductApprovalDataProvider retrieves data only for products that are with approval status Approved. Therefore only approved products will be indexed and only approved products will be displayed in the Storefront respectively.

The data provider and the Product Approval attribute are defined in the Search Index configuration file - SFProductSearch.solr.xml:

SFProductSearch.solr.xml
<dataProviders>
	...
	<dataProvider name="ProductApproval" className="com.intershop.component.product.internal.searchindex.dataprovider.ProductApprovalDataProvider" />
</dataProviders>
SFProductSearch.solr.xml
 <attributes>		
	<attribute>
    	<description>Adds a condition for approved products only</description>
   		<displayName>Product Approval</displayName>
     	<name>ApprovalStatus</name>
     	<searchable>false</searchable>
     	<standard>false</standard>
     	<dataProviderName>ProductApproval</dataProviderName>
 	</attribute>
 </attributes>

4 Technical Overview

4.1 Related Cartridges

The following cartridges contain product approval code artifacts:

CartridgeDescription
bc_product

Interfaces for product approval related extensions, repositories and business objects

Implementation of product approval related data provider and pipelets

bc_product_ormQueries, extensions, factories, business objects and product approval job
init_operationsProduct approval job configuration
sld_system_appJob for SLDSystem domain
sld_ch_consumer_pluginChannel related product approval jobs, UI related templates, pipelines and JS
sld_enterprise_appProduct approval widget and product advanced search related artifacts

4.2 Extensions

Extension IDInterfaceDescription
Approvalcom.intershop.component.product.capi.approval.ProductBOApprovalExtensionResponsible for specific operations related to the approval process of the products
ProductApprovalBORepositorycom.intershop.component.product.capi.approval.ProductApprovalBORepositoryExtensionResponsible for the life cycle of the product approval business object

4.3 Useful Pipelets and Pipelines

Pipelet nameDescription
CreateProductApprovalCreates a new ProductApprovalBO instance for the provided ProductBO
UpdateProductApprovalUpdates the provided ProductApprovalBO. Sets product data, approval status, last change reason, last change date, user ID
RemoveProductApprovalRemoves the provided ProductApprovalBO instance
GetProductApprovalRetrieves ProductApprovalBO instance for the provided ProductBO
Pipeline nameDescription
ProcessProductApprovalJob - SetProductApprovalStatus

Iterates all products for the provided DomainID, for each product checks if there is an approval status for it. If such does not exist, creates one with value Edit. If such exists with value Approved and there is

a change in its newly calculated hash, sets its approval status to Edit.

ProcessProductApprovalJob - DeleteProductApprovalStatusIterates all products for the provided DomainID, for each product checks if there is an approval status for it and if such exists, removes it.
ProcessProductApprovalJob - StartProductApprovalStatusJob

Starts Product Approval Status job with the provided job configuration parameters.

ProcessProductApproval - SendToReviewSets the approval status to In Review
ProcessProductApproval - ApproveSets the approval status to Approved
ProcessProductApproval - BackToEditingSets the approval status to Edit

5 Product Approval Status Widget

The Product Approval Status Widget displays products with the corresponding approval status. The user can select the desired status from a drop-down list:

When the Еdit status is selected, a Reason column is displayed in the widget:

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets