A PointsExpiryRuleType implemented in JS, configured per-account via the Queries repo's points-expiry-rules.xml. Its processFn function is invoked with the points record, this rule instance's own parameters, and the points allocation source, and must return the expiry date to assign - letting an account calculate an expiry date with custom, calendar-based logic rather than a fixed number of days.

Group: Rewards

Implements: PointsExpiryRuleType


Properties

PropertyReturnsDescription
fieldsList<ExtraField>The configuration fields shown when setting up this rule on a points allocation source, as defined in the account's Queries repo configuration.
idStringUnique identifier for this rule instance, used to select it when configuring a points allocation source.
processFnStringName of the JS function that calculates the expiry date for a points record.
titleStringDisplay title shown when choosing a points expiry rule type in the admin UI.

Methods

getId()

Returns: String

Unique identifier for this rule instance, used to select it when configuring a points allocation source.

getFields()

Returns: List<ExtraField>

The configuration fields shown when setting up this rule on a points allocation source, as defined in the account's Queries repo configuration.

getProcessFn()

Returns: String

Name of the JS function that calculates the expiry date for a points record.

getTitle()

Returns: String

Display title shown when choosing a points expiry rule type in the admin UI.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.