Aggregate Fixed Non-Qualifying Points in Expiration Ledgers

Run the Aggregate Fixed Non-Qualifying Points in Expiration Ledgers Data Processing Engine definition if you decide to consolidate members’ fixed-type, non-qualifying points in batches. Before you run the definition, make sure that there are no duplicate loyalty aggregated points expiration ledgers.

Required Editions

Available in: Lightning Experience in Enterprise, Performance, Developer, and Unlimited Editions that have Loyalty Management enabled

The definition creates and updates active Loyalty Aggregated Point Expiration Ledger records based on the Loyalty Ledger records that are created after the last run of the definition. The definition uses an input variable to specify the loyalty program for which fixed-model, non-qualifying points are to be consolidated. You can specify the loyalty program name either in your copy of the definition or dynamically when the definition is run.

The definition calculates the points that are debited from or credited to the members' points balance after the last run. The calculation also includes points debited or credited for points adjustments and canceled transactions. Next, the definition checks the number of points that members redeemed from their accrued points. Then, member's updated expirable points are calculated and grouped by member, currency, and expiration date.

After the members' updated expirable points are calculated, results are written back to these objects:

Object Writeback Result
Loyalty Member Currency The run date is the date on which the member’s points are last consolidated. Only records associated with fixed-model, non-qualifying points are updated.
Loyalty Aggregated Point Expiration Ledger

New records are created and existing records are updated.

New records are created when a record doesn't exist with the same member, currency, and expiration date.

Records are updated when points are credited or debited from an associated member for an associated currency. The points expire on the points expiration date of the record.

Records aren't updated if members redeemed the points that are credited to them after the last definition run.

Input Variables

Input Variable Name Description
Loyalty Program Name The name of the loyalty program for which the Data Processing Engine definition is run.

Nodes

Node Name Node Type Description
  • Loyalty Aggregated Point Expiration Ledger
  • Loyalty Ledger
  • Loyalty Member Currency
  • Loyalty Program
  • Loyalty Program Currency
Data Source Objects used as data sources to consolidate fixed-model non-qualifying points for members.
Add Loyalty Program Name to Program Currency Join Adds the name of the loyalty program to the program currency it’s related to.
Add Loyalty Program Currency Details to Loyalty Ledgers Join Adds the type of currency that a loyalty ledger credited or debited points for and the expiry model of the program currency to the loyalty ledger.
Filter Loyalty Ledgers with Fixed Non-Qualifying Points Filter Filters loyalty ledgers with fixed non-qualifying points for a loyalty program.
Add Last Points Aggregation Date to Loyalty Ledgers Join Adds the date on which points were last aggregated for the loyalty ledgers that credited or debited fixed non-qualifying points.
Check Whether the Loyalty Ledger Was Created After Last Processed Date Formula Checks whether the loyalty ledgers have been created on or after the date on which the fixed non-qualifying points were last processed.
Filter New Loyalty Ledgers Filter Filters loyalty ledgers that were created after the date on which the fixed non-qualifying points were last processed.
Find Maximum Ledger Creation Date And Aggregate Ledgers Group and Aggregate Finds the maximum creation date of loyalty ledgers and aggregates ledgers by member and currency.
Add Loyalty Member Currency ID to Aggregate Loyalty Ledger Join Adds the loyalty member currency ID of the member related to the aggregated loyalty ledgers.
Update Loyalty Member Currency with Points Aggregation Date Writeback Object Updates loyalty member currencies to add or update the date on which the related member’s points are aggregated for expiration.
Aggregate Points and Group by Event Type Group and Aggregate Aggregates points for loyalty ledgers and groups them based on the ledger’s event type.
Filter Accrual and Accrual Cancelation Loyalty Ledgers Filter Filters loyalty ledgers that are of the event type credit, debit, and transfer.
Calculate Expiration Points and Redeemed Points for Loyalty Ledgers Formula Calculate the number of points that are set to expire and the number of points that have already been redeemed for loyalty ledgers. This node also adds the expiration date to the loyalty ledgers.
Remove Loyalty Ledger Fields Slice Removes loyalty ledger fields that aren’t required in succeeding nodes of the definition.
Filter Loyalty Aggregated Point Expiration Ledgers Filter Filters active aggregated point expiration ledgers that aren’t already deleted.
Convert Existing Aggregated Point Expiration Date to Text Formula Converts the expiration dates of points in the loyalty aggregated points expiration ledgers to text.
Remove Aggregated Points Expiration Ledger Fields Slice Removes aggregated points expiration ledger fields that aren’t required in succeeding nodes of the definition.
Append Existing Point Expiration Ledgers to New Point Expiration Ledgers Append Appends details of the existing loyalty aggregated points expiration ledgers to new loyalty ledgers.
Aggregate Points for Expiration Group and Aggregate Aggregates the total number of points that must be expired for a member currency. This node also aggregates the number of points that have already been redeemed by the member.
Check if Redeemed Points are More Than Points to Expire Formula Checks whether the member has already redeemed the points that must be expired.
Filter Eligible Ledgers Filter Filters ledgers that contain points that haven’t been redeemed and can be expired on the expiration date.
Rename Fields with Redeemable Points Formula Renames fields that contain details about the points that are available for the member to redeem before expiration.
Filter Redemption Loyalty Ledgers Filter Filters redemption loyalty ledgers whose points haven’t been added to aggregated point expiration ledgers.
Append Points Available for Redemption and Points Redeemed Append Appends details about the number of points that the member has redeemed since this definition was last run and the number of points the member was eligible to redeem since the last run.
Calculate Updated Redeemed Points Formula Calculates the updated points redeemed by the member for a currency that expires on a particular date.
Join Expirable Points and Redeemable Points Join Adds the number of points that must expire on a particular date for a member currency and the number of points that the member can redeem out of the expirable points.
Calculate Redeemable Points and Append Currency and Member IDs Formula Calculates the number of points members can still redeem from the expirable points and appends currency ID to the member ID.
Calculate Total Expirable Points Formula Calculates the total number of points that must be expired for a member currency on a particular date.
Subtract Previous Redeemable Points from Expirable Points Formula Subtracts the redeemable points from the last run of this definition from the current expirable points.
Get Previous Expirable Points Formula Gets the total expirable points from the last run of this definition.
Calculate Updated Redeemed Points Formula Calculates the updated points redeemed by the member for a currency that expires on a particular date.
Join Existing and New Aggregated Point Expiration Ledgers Join Adds details of the existing aggregated point expiration ledgers to the new ledgers.
Find To Be Updated Aggregated Ledgers Formula Filters Loyalty Aggregated Point Expiration Ledger records that aren’t changed from previous run.
Filter Update Aggregated Ledgers Filter Filters only updated Loyalty Aggregated Point Expiration Ledger records.
Convert Expiration Date From Text Field to Date Field Formula Converts the point expiration date from a text field to a date field.
Create and Update Aggregate Point Expiration Ledgers Writeback Object Creates aggregate point expiration ledgers and updates existing aggregate point expiration ledgers with the updated expirable points and redeemed points.