Active Data for Developers

Customize your application’s active data processing by using business objects, and B2C Commerce API pipelets and scripts.

Business Objects

The following business objects, which you can customize, support this feature:

  • CustomerActiveData
  • CustomerGroup
  • ProductActiveData
  • SlotConfiguration

API Pipelets

The following pipelets support active merchandising:

Pipelet Description
ImportActiveData Imports either ProductActiveData or CustomerActiveData attributes from a .csv file. The feed name contained in the file determines both the type of data and feed for the import process.
ValidateActiveDataFile Validates the given active data .csv file and returns a status for the results of the validation. If the validation operation executes without process errors, regardless of the .csv file’s validity, the pipelet returns next. It then continues to the next node in the pipeline. If the given file doesn't exist in the given path the pipelet exits in a pipelet error.
Search Retrieves search results. A SortingRuleID input parameter represents the ID of the sorting rule used to sort the products. The existing parameters SortBy1, SortBy1Direction, SortBy2, SortBy2Direction, SortBy3, and SortBy3Direction, can also be used with explicit sorting attribute steps in sorting rules.

API Scripts

The following classes support active merchandising:

Class Description
ActiveData Represents the active data for an object in B2C Commerce.
CustomerActiveData Represents the active data for a Customer in B2C Commerce.
CustomerGroup See Dynamic Customer Groups.
ProductActiveData Represents the active data for a Product in B2C Commerce.

Active Data

The following classes directly support active data:

  • dw.campaign.ProductActiveData extends dw.object.ExtensibleObject
  • dw.campaign.CustomerActiveData extends dw.object.ExtensibleObject

The following classes support active data:

  • dw.catalog.ProductAvailabilityModel - getTimeToOutOfStock(), getAvailability(), and getSKUCoverage()
  • dw.customer.Customer - CustomerActiveData getActiveData() and getLastOrderDate() methods added.

Searchandising

The following classes support searchandising sorting rules:

  • The dw.catalog.SortingRule method of the dw.object.PersistentObject class represents a sorting rule.
  • The dw.catalog.SortingOption method of the dw.object.PersistentObject class represents a sorting option for a storefront catalog.

The following properties and methods in the dw.catalog.ProductSearchModel class support searchandising:

  • Properties
    • sortingRule : SortingRule
    • static final SORTING_RULE_PARAMETER : String constant from API ProductSearchModel
  • Methods
    • setSortingRule(rule: SortingRule) : void
    • getSortingRule() : SortingRule
    • urlSortingRule(action : String, rule : SortingRule) : URL
    • urlSortingRule(url : URL, rule : SortingRule) : URL

The following methods of the CatalogMgr class support searchandising:

  • static getSortingRules() : Collection
  • static getSortingRule(ID : String)
  • static getStorefrontSortingOptions() : List
  • static getStorefrontSortingOption(ID : String)
Note: The scripting API provides read, but not write, access to all active data metrics.

Dynamic Customer Groups

The following scripting APIs support dynamic customer groups:

  • The methods dw.customer.CustomerGroup.assignCustomer and dw.customer.CustomerGroup.unassignCustomer reject the assigning of customers to dynamic groups through the API.
  • Customer.getCustomerGroups returns a list of static, dynamic, and system groups to which the customer is a member, as follows:
Returns... Storefront Sessions Job Sessions
Dynamic customer groups x  
Static customer groups x x
System groups: Everyone and Registered x x
System groups: Unregistered x  

Customer#isMemberOfCustomerGroup also checks for memberships in dynamic groups.