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
| Property | Returns | Description |
|---|---|---|
| fields | 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. |
| id | String | Unique identifier for this rule instance, used to select it when configuring a points allocation source. |
| processFn | String | Name of the JS function that calculates the expiry date for a points record. |
| title | String | Display 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.