Fluent builder for configuring and creating a points allocation source on a sales data series - the rule set that turns a series' sales records into reward points or debits. Obtain an instance from newPointsAllocationSourceBuilder, chain the setter methods to configure it, then call build to create and persist the points allocation source.
Group: Builders
Properties
| Property | Returns | Description |
|---|---|---|
| name | String | The points allocation source's unique, path-safe name, as set by name. |
| title | String | The points allocation source's display title, as set by title. |
Methods
name(String s) · saleDateMode() · nowDateMode() · enteredDateMode() · pointsBucket(Reward s) · promotion(Reward s) · title(String s) · reasonTemplate(String s) · pointsTagCode(String s) · reasonCode(String s) · pointsRuleTypeId(String s) · pointsRuleConfig(String s) · recipient(String s) · pointsExpiryRuleTypeId(String s) · pointsExpiryRuleConfig(String s) · notes(String notes) · individualAllocationType() · sumAllocationType() · getName() · getTitle() · build()
name(String s)
Returns: PointsAllocationSourceBuilder
Sets the points allocation source's unique, path-safe name.
| Parameter | Description |
|---|---|
s | the name |
saleDateMode()
Returns: PointsAllocationSourceBuilder
Sets the points date mode so awarded/debited points are dated as of the sale date.
nowDateMode()
Returns: PointsAllocationSourceBuilder
Sets the points date mode so awarded/debited points are dated as of the moment they are processed.
enteredDateMode()
Returns: PointsAllocationSourceBuilder
Sets the points date mode so awarded/debited points are dated as of the date the sales record was entered.
pointsBucket(Reward s)
Returns: PointsAllocationSourceBuilder
Sets the reward that awarded points are issued against.
| Parameter | Description |
|---|---|
s | the reward to issue points against |
promotion(Reward s)
Returns: PointsAllocationSourceBuilder
Sets the promotion the points allocation source is connected to; when set, records are only included while the promotion is active and the sale falls within its eligibility rules.
| Parameter | Description |
|---|---|
s | the promotion to connect the source to |
title(String s)
Returns: PointsAllocationSourceBuilder
Sets the points allocation source's display title.
| Parameter | Description |
|---|---|
s | the title |
reasonTemplate(String s)
Returns: PointsAllocationSourceBuilder
Sets the MVEL template used to generate the reason text recorded against each award or debit.
| Parameter | Description |
|---|---|
s | the MVEL reason template |
pointsTagCode(String s)
Returns: PointsAllocationSourceBuilder
Sets the points tag code to record against awarded points, creating the tag on the current tenant if it does not already exist.
| Parameter | Description |
|---|---|
s | the points tag code |
reasonCode(String s)
Returns: PointsAllocationSourceBuilder
Sets the reason code recorded against points debited by this source.
| Parameter | Description |
|---|---|
s | the reason code |
pointsRuleTypeId(String s)
Returns: PointsAllocationSourceBuilder
Sets the id of the points rule type used to calculate and include/exclude points for this source, instead of an MVEL expression.
| Parameter | Description |
|---|---|
s | the points rule type id |
pointsRuleConfig(String s)
Returns: PointsAllocationSourceBuilder
Sets the configuration string (parsed as name=value pairs) passed to the configured points rule type.
| Parameter | Description |
|---|---|
s | the points rule configuration |
recipient(String s)
Returns: PointsAllocationSourceBuilder
Sets the KCode expression used to resolve the points recipient, evaluated against the sales record; if not set the record's salesBy entity is used as the recipient.
| Parameter | Description |
|---|---|
s | the recipient KCode expression |
pointsExpiryRuleTypeId(String s)
Returns: PointsAllocationSourceBuilder
Sets the id of the points expiry rule type used to calculate when awarded points expire.
| Parameter | Description |
|---|---|
s | the points expiry rule type id |
pointsExpiryRuleConfig(String s)
Returns: PointsAllocationSourceBuilder
Sets the configuration string passed to the configured points expiry rule type.
| Parameter | Description |
|---|---|
s | the points expiry rule configuration |
notes(String notes)
Returns: PointsAllocationSourceBuilder
Sets the free text notes stored against the points allocation source, describing to an administrator what the rule is for. Not shown to the recipient of the points.
| Parameter | Description |
|---|---|
notes | the administrator notes to store |
individualAllocationType()
Returns: PointsAllocationSourceBuilder
Allocates points per sales record, so each matching record produces its own points transaction. This is the default if no allocation type is chosen.
sumAllocationType()
Returns: PointsAllocationSourceBuilder
Allocates points on the total of the matching sales records, so one points transaction covers the whole batch rather than one per record.
getName()
Returns: String
The points allocation source's unique, path-safe name, as set by name.
getTitle()
Returns: String
The points allocation source's display title, as set by title.
build()
Returns: PointsAllocationSource
Creates and persists the configured points allocation source on its series. Defaults the allocation type to INDIVIDUAL if none was set.