Fired when points are granted to a profile or organisation against a reward, for example completing a module, a manual award, or a promotion entry. Raised by RewardService whenever a Points issue or a RewardEntry status change increases a participant's points balance for a reward. FunnelManager fans this out into a RewardGrantedFunnelEvent per profile associated with the awarded entity, and this event also implements IndexedItemUpdatedEvent so the points 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 awarded 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 granted to: the points issue's recipient if this grant relates to a specific Points issue, otherwise the profile if one was given, or else the organisation.
awardedToOrgOrganisationThe organisation the points were granted to, if the grant 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 grant never deletes the underlying record, so this is always false.
eventIdStringThe persistence-friendly identifier for this event type.
numGranteddoubleThe number of points that were granted.
pointsBalanceDoubleThe awarded entity's current points balance for the reward, looked up from RewardService at the time this is called.
rewardRewardThe reward the points were granted against.
rewardDateDateThe date the grant occurred.
rewardEndDateDateThe end date of the reward the points were granted against.
rewardEntryStatusRewardEntryStatusThe status of the reward entry associated with this grant, if this grant was raised from a reward entry status change rather than a Points issue.
rewardNameStringThe name of the reward the points were granted against.
rewardStartDateDateThe start date of the reward the points were granted against.
rewardTemplateStringThe template code of the reward the points were granted against.
sourceProfileProfileThe profile the points were granted to.
transactionTransactionThe database transaction associated with this grant, so indexing can be deferred until it commits.
triggerItem1StringThe ID of the website the grant occurred within, used as a trigger key.
triggerItem2StringThe ID of the reward the points were granted 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 grant: the Points issue if one was provided, otherwise the RewardEntry.
websiteWebsiteThe website the grant 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() · getNumGranted() · getAwardedToOrg() · getRewardDate() · getRewardName() · getRewardEntryStatus() · getRewardTemplate() · getRewardStartDate() · getRewardEndDate() · getPointsBalance() · getAvailableBalance() · getBranch() · getUpdatedObject() · isDeleted() · getTransaction() · getReward()

getAwardedToEntity()

Returns: BaseEntity

The entity the points were granted to: the points issue's recipient if this grant relates to a specific Points issue, otherwise the profile if one was given, or else the organisation.

getSourceProfile()

Returns: Profile

The profile the points were granted to.

getEventId()

Returns: String

The persistence-friendly identifier for this event type.

getWebsite()

Returns: Website

The website the grant occurred within.

getTriggerItem1()

Returns: String

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

getTriggerItem2()

Returns: String

The ID of the reward the points were granted 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.

getNumGranted()

Returns: double

The number of points that were granted.

getAwardedToOrg()

Returns: Organisation

The organisation the points were granted to, if the grant was made against an organisation rather than a specific profile.

getRewardDate()

Returns: Date

The date the grant occurred.

getRewardName()

Returns: String

The name of the reward the points were granted against.

getRewardEntryStatus()

Returns: RewardEntryStatus

The status of the reward entry associated with this grant, if this grant was raised from a reward entry status change rather than a Points issue.

getRewardTemplate()

Returns: String

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

getRewardStartDate()

Returns: Date

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

getRewardEndDate()

Returns: Date

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

getPointsBalance()

Returns: Double

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

getAvailableBalance()

Returns: Double

The awarded 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 grant: the Points issue if one was provided, otherwise the RewardEntry.

isDeleted()

Returns: boolean

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

getTransaction()

Returns: Transaction

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

getReward()

Returns: Reward

The reward the points were granted against.

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