Fired when points are debited from a profile or organisation against a reward, for example when redeeming points or reversing a previously granted reward. Raised by RewardService whenever a PointsDebit or a RewardEntry status change reduces a participant's points balance for a reward. FunnelManager fans this out into a RewardDebitedFunnelEvent per profile associated with the debited entity, and this event also implements IndexedItemUpdatedEvent so the debit or reward entry is re-indexed for search.

Implements: TriggerEvent, IndexedItemUpdatedEvent


Properties

PropertyReturnsDescription
attributesMap<String,Object>Extra properties associated with this event. This event does not populate any.
availableBalanceDoubleThe debited entity's current available balance for the reward, ie points not yet committed to other debits, looked up from RewardService at the time this is called.
awardedToEntityBaseEntityThe entity the points were debited from: the points issue's recipient if this debit relates to a specific PointsDebit, otherwise the entity passed to the constructor.
awardedToOrgOrganisationThe organisation the points were debited from, if the debit was made against an organisation rather than a specific profile.
branchBranchThe branch this update occurred within. This event is not scoped to a branch.
deletedbooleanWhether the updated object should be removed from the search index. A debit never deletes the underlying record, so this is always false.
eventIdStringThe persistence-friendly identifier for this event type.
numDebiteddoubleThe number of points that were debited.
pointsBalanceDoubleThe debited entity's current points balance for the reward, looked up from RewardService at the time this is called.
rewardRewardThe reward the points were debited against.
rewardDateDateThe date the debit occurred.
rewardEndDateDateThe end date of the reward the points were debited against.
rewardEntryStatusRewardEntryStatusThe status of the reward entry associated with this debit, if this debit was raised from a reward entry status change rather than a PointsDebit.
rewardNameStringThe name of the reward the points were debited against.
rewardStartDateDateThe start date of the reward the points were debited against.
rewardTemplateStringThe template code of the reward the points were debited against.
sourceProfileProfileThe profile the points were debited from, if the debited entity is a profile.
transactionTransactionThe database transaction associated with this debit, so indexing can be deferred until it commits.
triggerItem1StringThe ID of the website the debit occurred within, used as a trigger key.
triggerItem2StringThe ID of the reward the points were debited against, used as a trigger key.
triggerItem3StringNot used by this event; always null.
triggerItem4StringNot used by this event; always null.
triggerItem5StringNot used by this event; always null.
updatedObjectObjectThe object that should be re-indexed as a result of this debit: the PointsDebit if one was provided, otherwise the RewardEntry.
websiteWebsiteThe website the debit occurred within.

Inherited from TriggerEvent

Properties

PropertyReturnsDescription
serialisablebooleanWhether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.

Methods

isSerialisable()

Returns: boolean

Whether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.


Methods

getAwardedToEntity() · getSourceProfile() · getEventId() · getWebsite() · getTriggerItem1() · getTriggerItem2() · getTriggerItem3() · getTriggerItem4() · getTriggerItem5() · getAttributes() · getNumDebited() · getAwardedToOrg() · getRewardDate() · getRewardName() · getRewardEntryStatus() · getRewardTemplate() · getRewardStartDate() · getRewardEndDate() · getPointsBalance() · getAvailableBalance() · getBranch() · getUpdatedObject() · isDeleted() · getTransaction() · getReward()

getAwardedToEntity()

Returns: BaseEntity

The entity the points were debited from: the points issue's recipient if this debit relates to a specific PointsDebit, otherwise the entity passed to the constructor.

getSourceProfile()

Returns: Profile

The profile the points were debited from, if the debited entity is a profile.

getEventId()

Returns: String

The persistence-friendly identifier for this event type.

getWebsite()

Returns: Website

The website the debit occurred within.

getTriggerItem1()

Returns: String

The ID of the website the debit occurred within, used as a trigger key.

getTriggerItem2()

Returns: String

The ID of the reward the points were debited against, used as a trigger key.

getTriggerItem3()

Returns: String

Not used by this event; always null.

getTriggerItem4()

Returns: String

Not used by this event; always null.

getTriggerItem5()

Returns: String

Not used by this event; always null.

getAttributes()

Returns: Map<String,Object>

Extra properties associated with this event. This event does not populate any.

getNumDebited()

Returns: double

The number of points that were debited.

getAwardedToOrg()

Returns: Organisation

The organisation the points were debited from, if the debit was made against an organisation rather than a specific profile.

getRewardDate()

Returns: Date

The date the debit occurred.

getRewardName()

Returns: String

The name of the reward the points were debited against.

getRewardEntryStatus()

Returns: RewardEntryStatus

The status of the reward entry associated with this debit, if this debit was raised from a reward entry status change rather than a PointsDebit.

getRewardTemplate()

Returns: String

The template code of the reward the points were debited against.

getRewardStartDate()

Returns: Date

The start date of the reward the points were debited against.

getRewardEndDate()

Returns: Date

The end date of the reward the points were debited against.

getPointsBalance()

Returns: Double

The debited entity's current points balance for the reward, looked up from RewardService at the time this is called.

getAvailableBalance()

Returns: Double

The debited entity's current available balance for the reward, ie points not yet committed to other debits, looked up from RewardService at the time this is called.

getBranch()

Returns: Branch

The branch this update occurred within. This event is not scoped to a branch.

getUpdatedObject()

Returns: Object

The object that should be re-indexed as a result of this debit: the PointsDebit if one was provided, otherwise the RewardEntry.

isDeleted()

Returns: boolean

Whether the updated object should be removed from the search index. A debit never deletes the underlying record, so this is always false.

getTransaction()

Returns: Transaction

The database transaction associated with this debit, so indexing can be deferred until it commits.

getReward()

Returns: Reward

The reward the points were debited against.

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