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

PropertyReturnsDescription
nameStringThe points allocation source's unique, path-safe name, as set by name.
titleStringThe 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.

ParameterDescription
sthe 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.

ParameterDescription
sthe 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.

ParameterDescription
sthe promotion to connect the source to

title(String s)

Returns: PointsAllocationSourceBuilder

Sets the points allocation source's display title.

ParameterDescription
sthe title

reasonTemplate(String s)

Returns: PointsAllocationSourceBuilder

Sets the MVEL template used to generate the reason text recorded against each award or debit.

ParameterDescription
sthe 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.

ParameterDescription
sthe points tag code

reasonCode(String s)

Returns: PointsAllocationSourceBuilder

Sets the reason code recorded against points debited by this source.

ParameterDescription
sthe 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.

ParameterDescription
sthe 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.

ParameterDescription
sthe 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.

ParameterDescription
sthe recipient KCode expression

pointsExpiryRuleTypeId(String s)

Returns: PointsAllocationSourceBuilder

Sets the id of the points expiry rule type used to calculate when awarded points expire.

ParameterDescription
sthe points expiry rule type id

pointsExpiryRuleConfig(String s)

Returns: PointsAllocationSourceBuilder

Sets the configuration string passed to the configured points expiry rule type.

ParameterDescription
sthe 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.

ParameterDescription
notesthe 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.

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