---
schema_version: "1"
id: 14dc52c6288ce238eefa6f91645825f80d15be2e93e9f93bac85fa55048f3a03
title: Map Expiry Ledgers to Credit Ledgers for Traceable Currencies
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/loyalty_map_expiry_ledger_credit_ledger.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.loyalty_map_expiry_ledger_credit_ledger.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d5ff488da490a4c8a363b4616a6e4bf0aa45eb11a390817edfadf6bc22b46f1f
description: Maps Expiry type loyalty ledgers to their corresponding Credit type loyalty ledgers for non-qualifying currencies that are traceable.
products:
  - Loyalty Management
release: "264"
---
# Map Expiry Ledgers to Credit Ledgers for Traceable Currencies

Maps Expiry type loyalty ledgers to their corresponding Credit type loyalty ledgers for non-qualifying currencies that are traceable.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience in&nbsp;<strong>Enterprise</strong>,&nbsp;<strong>Performance</strong>, <strong>Developer</strong>, and&nbsp;<strong>Unlimited</strong>&nbsp;Editions that have Loyalty Management enabled</td></tr></tbody></table>

The Map Expiry Ledgers to Credit Ledgers for Traceable Currencies Data Processing Engine template includes these key nodes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:33.33333333333333%">
        <col style="width:33.33333333333333%">
        <col style="width:33.33333333333333%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d28027e69">Node Value</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d28027e72">Description</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d28027e75">Node Type</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Traceability Loyalty Ledgers</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Uses Traceability Loyalty Ledger records as data source for the definition. </td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Data Source</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 "> Loyalty Ledgers</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Uses Loyalty Ledger records as data source for the definition.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Data Source</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Loyalty Member Currency</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Uses Loyalty Member Currency records as data source for the definition. </td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Data Source</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Sum of Credit Ledger Points Used in Traceability Loyalty Ledger</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">
            <p style="margin-bottom:0;" dir="ltr">The total points of the credit ledger that are used in Traceability
              Loyalty Ledger.</p>
          </td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Group and Aggregate</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Join Expired Credit Ledgers with Total Points Traced</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Joins the expired credit ledgers with the total points of the credit ledger that
            are used in Traceability Loyalty Ledger.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Join</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Calculate Remaining Traceable Points to Expire in Credit Ledger</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Calculates the remaining points to expire in the credit ledger that can be
            traced.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Formula</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Calculate Unused Points of Credit Ledger</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Calculates the unused points of the credit ledger to be traced.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Formula</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Filter Credit Ledgers with Unused Points</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Filters the credit ledgers with unused points.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Filter</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Join Expiry Ledgers to Credit Ledgers with Unused Points</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Joins the expiry ledgers with credit ledgers with the same program member ID and
            program currency ID.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Join</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Calculate Days Between Activity and Expiry Date</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Calculates the number of days between Expiry Ledger’s activity date and Credit
            Ledger’s expiry date.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Formula</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Calculate Minimum Days Between Activity and Expiry Date</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">
            <p style="margin-bottom:0;" dir="ltr">Calculates the minimum non-negative number of days between Expiry
              Ledger’s activity date and Credit Ledger’s expiry date.</p>
          </td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Formula</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Compare Minimum Days with Days Difference</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Checks if the minimum days matches with the number of days between Expiry
            Ledger’s activity date and Credit Ledger’s expiry date.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Formula</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Filter Correctly Mapped Records</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Filters the correctly mapped records for creating traceability ledgers.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Filter</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Create Traceability Loyalty Ledger</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Creates a Traceability Loyalty Ledger</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Writeback Object</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Find Unique Currency of Member</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Finds the unique loyalty member currency to update. </td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Group and Aggregate</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Update Loyalty Member Currency</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Updates the loyalty member currency till Last Expired Points Traceability Run
            Date.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Writeback Object</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Filter Traceable Ledgers by Program</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Filters the traceable ledgers belonging to the specified program name.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Filter</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Add Member Currency Details to Ledgers</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Adds the loyalty member currency details to the ledgers.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Join</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Filter Ledgers with Expiry Event Type</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Filters the ledgers with event type as Expiry.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Filter</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Find Eligible Expiry Ledgers Created On Last Expiration Process Run Date</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Finds the eligible Expiry ledgers that are created on the last expiration run
            date.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Formula</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Filter Valid Expiry Ledgers Within Eligible Dates</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Filters the valid Expiry ledgers within eligible dates.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Filter</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Filter Ledgers with Credit Event Type</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Filters the ledgers with event type as Credit.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Filter</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Find Eligible Expired Credit Ledgers</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Finds the eligible Credit ledgers that expired between Last Traceability Run Date
            and Last Expiration Process Run Date.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Formula</td>

        </tr>
        <tr class="">
          <td data-label="Node Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e69 ">Filter Valid Credit Ledgers Within Eligible Dates</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e72 ">Filters the valid Credit ledgers within eligible dates.</td>

          <td data-label="Node Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d28027e75 ">Filter</td>

        </tr>
      </tbody>
    </table>

**Input Variables**

You can define the input parameters for the calculation job so that the input values are passed at the time of job execution.

| Input Variables |
| --- |
| Loyalty Program Name |

**Running the Job**

After the job runs, it filters the valid Credit ledgers and Expiry ledgers within eligible dates and maps them to create traceability loyalty ledgers. The job updates the loyalty member currency until the date the process was run to trace expired points.