Commerce Server Blog

Build world class ecommerce applications using Microsoft Commerce Server
  •  
  • Home
  • Advertise
  • Copyright Policy
  • Disclaimer
  • About

Design consideration for developing commerce server catalog system

ravikanth | February 20, 2010

For past few weeks, I am seeing few architecture questions in MSDN communities on how to mold catalog system to address client requirements. Catalog system is heart of the ecommerce solution and any architecture flaw can lead the application into failure. While doing some of the SME reviews to ecommerce projects, I also feel that developers might of done over architecture without knowing the strengths and weakness of catalog system. 

Catalog system contains following items.

  • Base Catalogs: Catalogs created in commerce server are base catalog.
  • Virtual Catalogs: Catalogs that are aggregated from one or more base or virtual catalogs.\
  • Catalog Sets: Grouping of one or more catalogs to target to the user is called catalog sets.
  • Categories: A category is a logical group of products or sub-categories.
  • Product/Product families: A product is a individual item in the catalog and if that product has multiple variants then it is called product family.

Microsoft has shared some of the architecture suggestions to be considered while developing CS2009 catalog system. Here are the few items which I collated from msdn site or documents published from Microsoft.

  • Supports up to 10,000 catalogs: 10,000 base catalogs, 10,000 virtual catalogs, or a combination of both base and virtual catalogs.
  • A catalog supports at least five million products. (CS has not been tested with 10,000 catalogs each containing five million products.)
  • A catalog can support up to 1,000 property definitions.
  • A virtual catalog can include content from up to 80 base catalogs.
  • A virtual catalog can include up to one million products.
  • A virtual catalog can support up to 10,000 price rules.
  • A category can support up to 10,000 products & can be nested up to five layers deep is recommended.
  • Multiple product catalogs can share a single SQL Server full-text catalog.
  • Add your own user-defined attributes at the catalog level and/or Category /Product level, as needed. Catalog attributes, such as currency, unit of weight measure, locale, and catalog name are available by default. You might want to add your own catalog attributes, for example, to store information about the vendor that supplies the products in a catalog.
  • Create separate catalogs (base or virtual) if search is to be restricted across a collection of products.
  • After you create a product, you cannot assign a different product definition to it. If you create a product based on product definition “mobile”, at a later date you cannot change the product to be based on product definition “Electronics”. You can, however, change product definition “mobile”, for example, by adding/removing a property.
  • You cannot change a data type of a property after the property is created.
  • You cannot assign a new product definition, or change a data type, after it is in use because other products or properties might be affected by the change.
  • If you need to search on a custom property, you should add an SQL index to that property.
  • Fewer catalogs are better, depending on hardware and your specific scenarios. This guideline is valid up to around 500,000 products per catalog.
  • A materialized catalog is a snapshot of a virtual catalog.
    • If the virtual catalog contains a number of base catalogs and/or the base catalogs contain a lot of products and categories then materializing the virtual catalog can result in better runtime performance.
    • If the content of the base catalogs changes frequently then materializing the virtual catalogs will mean frequent rebuilds which might offset the performance gain.
    • If the desired performance without materializing a virtual catalog meets your needs then you should not materialize the virtual catalog.
    • As a general rule of thumb : start without materializing a virtual catalog and determine based on whether  the desired performance is acceptable or not.
  • Do not add a product variant property to any properties that are being used as a Product Identifier property in a catalog. For example, if you use ModelNumber as the identifier for products in your catalog, do not create a product based on a product definition in which ModelNumber appears as a product variant property. If you do, you will not be able to identify variant information based on the product definition in that catalog.
  • Do not use the same value for product unique identifiers and variant unique identifiers. For example, you cannot assign stockkeeping unit (SKU) as the product unique identifier and the product variant unique identifier.
  • Before you import an XML catalog file, select the Validate XML file option on the Import Catalog dialog box to ensure that all data in your XML file is valid.
  • Start the full-text indexing service before you import a catalog. When a catalog is imported into catalog database, the full-text index is created at the same time.
  • If you experience poor performance when importing 100,000 to 1 million products into a base catalog, or publishing a virtual catalog of a similar size,
    run DBCC FREEPROCCACHE and sp_updatestats to improve the performance of APIs such as GetProduct and GetProductProperties:
  • If you create a .pup package that contains a materialized virtual catalog, after you unpack the virtual catalog, you must materialize the virtual catalog again.
  • Delete temporary tables from the MSCS_CatalogScratch database regularly. To improve run-time performance, the Product Catalog System uses the MSCS_CatalogScratch database to store temporary catalog tables.
  • Rebuild a virtual catalog in the following scenarios:
    • If a virtual catalog is materialized, when any data changes in the associated base catalogs.
    • If the virtual catalog is not materialized, whenever the data in the associated base catalogs changes (for example, pricing changes, and hierarchy and relationship changes).
    • You must rebuild a virtual catalog whenever you change include/exclude rules or pricing rules.
  • Do not rebuild a virtual catalog on a production server. Users will not be able to access the catalog. Only rebuild on staging server. After the catalogs are materialized, you can replicate them to you production servers.
  • Limit the number of rules in the virtual catalog. As a general rule you should rely on catalog and category level rules.

The list may be small and remaining good practices, you will learn in real time :) .

Comments
No Comments »
Categories
Commerce Server 2009, commerce server 2007
Tags
Best practices, Catalog, developing catalog system
Comments rss Comments rss
Trackback Trackback

Merchant Access to Catalog Manager

ravikanth | January 11, 2010

Recently I came across a post in MSDN communities where the query request says ‘how I can give access to the Merchants so that they can add/browse his products using catalog manager”.

The requirement is genuine and we will get such requests from customer regularly. Some of the commerce server developers think that it is not possible as the user of a role (say catalog Administrator or Editor) can able to see all catalogs in a particular site. In few some cases developers has created a separate site for their tenant/merchant to achieve this functionality. In this blog, I am explaining a simple tip which will allow access to provide multiple tenants to their catalog only.

Simple tip: You can achieve this using Authorization manager setting (Azman) and there are no changes to commerce server configuration settings.

  • As you might of aware the Azman works with windows authentication. So, whenever you get a new tenant, you should create his user Id and password in Active Directory (AD).
  • As a administrator, create a catalog for the tenant. Now if you reload catalogAuthorizationStore.xml in Azman, you can able to see new scope for the catalog.
  • Now you expand the scope and assign proper privileges to tenant AD user id.
    clip_image002
  • Now if the tenant opens the catalog manager, he can able to see only his catalogs.

Note: All operations and tasks are copied from parent to scope level and I recommend to create proper roles and task at scope level too.

In this example, I have assigned my ID to catalog editor role in – Adventure works catalog but not in “Adventure 2 works” catalog. When I open the catalog manager, I can only see adventure works catalog but not the other one (as shown in the image below).

clip_image001

For more information on Azman, refer to msdn – http://msdn.microsoft.com/en-us/library/ms914867(CS.70).aspx

Comments
3 Comments »
Categories
commerce server 2007
Tags
Azman, multi tenant
Comments rss Comments rss
Trackback Trackback

Show Silverlight Advertisements in Commerce Server

ravikanth | December 16, 2009

This blog is continuation to my blog entry “Creating custom display types in commerce server”. In my previous blog entry, I have explained how can we display adobe flash advertisements and in this blog post, I will explain how can we display silver light advertisements in commerce server. The steps are pretty simple –> Each advertisement will store template ID and the properties. Based on the template Id, commerce server loads the template structure are replace tokens with properties and file output is rendered to HTML.

image

The steps for creating silverlight display type is pretty simple.

1. Create the HTML required to render for silver light: If you are not aware of the HTML structure – open any silverlight website (silverlight.net) in your web browser, go to code behind and copy the silverlight loading object tag – as shown below

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="MinRuntimeVersion" value="3.0.40624.0" />
<param name="Source" value="ClientBin/advertisement.xap"/>
<param name="windowless" value="true" />
<param name="background" value="white" />
<a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkId=149156">
<img style="border-width:0px" alt="Install Silverlight" src="http://i1.silverlight.net/resources/images/content/misc/Install-Silverlight-611×355-HomeShowcaseSize.png?cdn_id=20091118_3" style="cursor:pointer" /></a>
</object>

2. Identify the properties that needs to get updated from Marketing manager: In this step, we will identify the tokens when are required to get input from the customer. For example, here I have identified following tokens

  • Source Param
  • Background
  • Height
  • Width

so, my template structure will become like this

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="{%Width%}" height="{%Height%}">
<param name="MinRuntimeVersion" value="3.0.40624.0" />
<param name="Source" value="{%source%}"/>
<param name="windowless" value="true" />
<param name="background" value="{%BackGround%}">
<a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkId=149156">
<img style="border-width:0px" alt="Install Silverlight" src="http://i1.silverlight.net/resources/images/content/misc/Install-Silverlight-611×355-HomeShowcaseSize.png?cdn_id=20091118_3" style="cursor:pointer" /></a>
</object>

3. Create a display template into marketing system: You can find the code block on this blog to create or modify the DisplayTemplate and the URL is http://microsoftblog.co.in/commerceserver/creating-custom-display-types-in-commerce-server/

That’s all… Now you can able to see silverlight template in your marketing system. In coming days, I will try to write a blog entry on how to show Google advertisements in commerce server.

Comments
No Comments »
Categories
Commerce Server 2009, commerce server 2007
Tags
marketing system, Templates
Comments rss Comments rss
Trackback Trackback

How Commerce Server Calculates Inventory

ravikanth | December 15, 2009

Knowing the condition of a SKU is compulsory during checkout process. The sku condition can be “In stock”, “out of stock”, “Pre-ordered”, “Back Ordered”, etc. The status calculation is based on commerce server global settings as well as settings on sku. In this post, we will learn how commerce server calculates inventory.

Commerce server inventory behavior is driven by site resources. To see inventory site resources – follow below steps.

  • Open commerce server manager.
  • Expand commerce server manager –> commerce sites –> [Your site] –> Site resources –> click on Inventory.

Two site resources setting will play key role in determining the sku condition

  1. Ignore missing SKUs: This resource is used to specify whether a missing sku can be treated as in-stock or out-of-stock. If the value is set to –1(true) then the missing sku is treated as in-stock and if the value is set to 0 (false) then the missing sku is treated as “out-of-stock”.
  2. Stock Handling: This resource is used to specify whether pre-order and back-order can be associated to a sku. If the value is set to –1(true) then the stock handling exist for SKUs(i.e., a sku can be pre-ordered or back-ordered) and if the value is set to 0 (false) then stock handling doesn’t exist for SKUs.

The below flow chart shows how commerce server calculates the inventory.

Commerce Server Inventory Calculation

In the first condition, we will check whether a product catalog is mapped to an inventory catalog. If it is not then we will determine inventory status on site resource –“Ignore missing Skus”. If the product catalog is associated then we will check the inventory condition based on sku status. If the status is set to disabled then the inventory condition is “out of stock” and if the status is ignored then the inventory condition is “In stock”. If the sku status is “enabled” then commerce server calculates inventory based on site resource “stock handling”.

Comments
1 Comment »
Categories
commerce server 2007
Tags
inventory
Comments rss Comments rss
Trackback Trackback

Targeting on Other profile Objects

ravikanth | December 14, 2009

In recent commerce server training, new commerce server developers have raised quite good number of questions which has triggered me to create more blogs in next few weeks. One of the question they have asked is – “I would like to give 50% discount to a corporate from a particular city”. Their perception is that the targeting will work with only UserObject profile and they have some work around to implement this functionality.

Commerce server provides us functionality to target all profile objects i.e., we can able to target a discount or advertisement to a user based on his profile properties like credit card, address or organization profile. When you install commerce server, by default, you can able to see only userobject and targeting context in the targeting dropdown.

clip_image002

If you want to show other profile objects in field dropdown – follow below steps.

1. Open Marketing Manager

2. From left pane, under views -> click on “Expressions”.

3. From left pane, under tasks -> click on “Set targeting profiles”

4. A popup opens. All available profiles are shown on left side list box and already targeted profiles are shown on right side list box.

5. Use Add button to add a profile from profile list box to targeted list box and use remove button to add a profile from targeted list box to profile list box. Use remove all button to remove all profiles from targeted list box.

image

The student query can be easily achieved by targeting organization profile.

image If you try to save the window without selecting any profile under targeted list box – the application throws following error – “You must specify at least one profile in the targeted profiles list.”.
 

If you try to remove a profile but it was used by another target expression the application will throw following error – “The Expression Category object cannot be deleted because another Expression object depends on it.”

Comments
No Comments »
Categories
commerce server 2007
Comments rss Comments rss
Trackback Trackback

« Previous Entries Next Entries »

Sign up for Newsletter


Categories

Quiz

  • Catalog Quiz for Beginners
  • Profile Quiz for Beginners
  • Quiz 1 for Advance Users
  • Quiz for Beginners

Recent Posts

  • Staging Deployment – Security Considerations
  • Pipeline Editor displays registered custom pipeline components as unknown in 64 Bit version.
  • How commerce server staging works
  • Steps to extend payments in Commerce Server 2009
  • Introduction to Commerce Server Staging
  • Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information
  • Commerce server staging throws Remote authorization failed to server. Ensure the service has access to this server.
  • Updated Commerce Server 2009 template pack for SharePoint 2007 released
  • RCXml2Resx.exe tool stops working
  • Commerce Server Profile Importer Tool

Archives

  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Tags

add discounts add images to profile Advantages of commerce server approve discounts authentication auto login process automatic user creation basket Brand Management business tools campaign management Catalog catalog import Category commerce server commerce server 2007 commerce server manager Commerce Server SP2 commerce server staging discounts ecommerce Estimation Installation inventory Kanth Koppala marketing system migration error Mojave operation components operation sequence Order subsystem Product profile profile subsystem property metadata purchase order quick checkout Ravi Ravi Kanth site cache refresh starter site tools transactions error Variant
(c) 2009 Commerce Server Blog. All rights Reserved. Articles cannot be reproduced without permission from the author.Write to me at kanth@ravikanth.net if you have any comments, questions, suggestions about this site or would like to send us a tip
About Us | Terms of Use | Disclaimer | Advertise .