Setting up filters to control whether to display marketing information in an e-Marketing Spot

Web activities can recommend catalog entries, categories, and content to customers in an e-Marketing Spot on a store page. Customers viewing the recommendation might not be interested, for example, if they already purchased the catalog entry or if they have the catalog entry in their shopping cart. Or, Marketing Managers might not want to recommend a catalog entry if inventory levels are low. You can set up filters to control whether the server displays the marketing information under certain circumstances. The filter settings apply to all e-Marketing Spots for the store.

About this task

To enable or disable a filter, put an entry in the CMDREG table for the appropriate store, and set the appropriate value in the PROPERTIES column.
For catalog entries, the available filter options are:
Filter options Filter
Do not display catalog entries with an inventory lower than the configured amount. removeIfNoInventory

Set the PROPERTIES column to the minimum inventory level. For example, if you set removeIfNoInventory=100, then if the inventory is less than 100, the catalog entry that the web activity recommends is not displayed to the customer.

This filter is off by default.

Do not display catalog entries that are currently in the customer's shopping cart. removeIfExistInShopcart

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off).

This filter is off by default.

Do not display catalog entries that the customer previously purchased. removeIfExistInPurchaseHistory

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off).

This filter is off by default.

Do not display expired catalog entries (current date is past the expire time). removeIfPastEndDate

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off).

This filter is on by default.

Do not display catalog entries that are not in the currently viewed catalog. removeIfNotInCurrentCatalog

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off).

This filter is on by default.

Do not check the entitlement for catalog entries and categories. For example, if you do not want to check entitlement for B2C stores or for performance reasons. By default the entitlement check is always done for catalog entries and categories. removeIfNotEntitled

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off and entitlement is not checked).

This filter is on by default.

Do not check whether the current viewing product is in the recommended catalog entry list. For example, if you do not see the current viewing product in the recommended catalog entry list in the marketing spot. By default the entitlement check is off. removeIfInCurrentViewing

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off and current viewing product is not checked).

This filter is off by default.

For categories, the available filter options are:
Filter options Filter
Do not display categories that are not in the currently viewed catalog. removeIfNotInCurrentCatalog

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off).

This filter is on by default.

Do not check the entitlement for catalog entries and categories. For example, if you do not want to check entitlement for B2C stores or for performance reasons. By default the entitlement check is always done for catalog entries and categories. removeIfNotEntitled

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off and entitlement is not checked).

This filter is on by default.

For content that advertises a promotion, the available filter options are:
Filter options Filter
Do not display promotion-related content if the promotion is not available at the current time according to the promotion schedule. removeIfPromotionNotAvailable

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off).

This filter is on by default.

Do not display promotion-related content if the start date for the promotion is not reached. removeIfPromotionBeforeStartDate

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off).

This filter is on by default.

Do not display promotion-related content if the customer is not a member of the customer segment that the promotion targets. removeIfMemberNotInPromotionSegment

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off).

This filter is on by default.

Do not display promotion-related content if the promotion is associated with categories or catalog entries to which the customer is not entitled. For example, a customer might not be entitled to a catalog entry that is not included in their contract with the store. removeIfPromotionNotEntitledCatalogEntryOrCategory

Set the PROPERTIES column to either 1 (filter is on) or 0 (filter is off).

This filter is off by default.

Procedure

  1. HCL Commerce Developer Access the development database.
  2. Run an SQL statement to set the filters for the store.

    For example, to enable both the inventory and shopping cart filters for store 10101:

    
    INSERT INTO CMDREG (STOREENT_ID, INTERFACENAME, CLASSNAME, PROPERTIES) 
    values (
    10101, 'com.ibm.commerce.marketing.commands.marketingspot.FilterCatalogEntryTaskCmd', 
    'com.ibm.commerce.marketing.commands.marketingspot.FilterCatalogEntryTaskCmdImpl', 
    'removeIfNoInventory=10&removeIfExistInShopcart=1&removeIfPastEndDate=1&removeIfNotInCurrentCatalog=1&removeIfExistInPurchaseHistory=0')
    
    

    Each filter type has its own interface name and task command implementation class name. To build the correct SQL statement, replace the values in the example that is shown in bold text with the appropriate values from the following table:

    Business Object Filter Task Command Interface Filter (INTERFACENAME) Task Command Implementation(CLASSNAME)
    CatalogEntryType FilterCatalogEntryTaskCmd FilterCatalogEntryTaskCmdImpl
    CatalogGroupType FilterCategoryTaskCmd FilterCategoryTaskCmdImpl
    MarketingContentType FilterContentTaskCmd FilterContentTaskCmdImpl
  3. Restart your server to apply your changes.