---
schema_version: "1"
id: 550154024f00e4bfc5020200fcbda8c74da7fd39c1bc7c55d070ba885bf402f6
title: Validate Loyalty Ledger Traceability Records
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/loyalty_validate_loyalty_ledger_traceability_records.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.loyalty_validate_loyalty_ledger_traceability_records.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 819037827981314b285063d0d39dad6ca90b26e3790a3cf3024eb2c3e3316ba6
description: Use the Validate Loyalty Traceability Ledgers Data Processing Engine template. It validates the Loyalty Ledger Traceability records for each active, fixed-duration, and redeemable currencies in the loyalty program. It calculates member balances and checks for redeemed expired points, mismatched debit and credit points, and overconsumed points.
products:
  - Loyalty Management
release: "264"
---
# Validate Loyalty Ledger Traceability Records

Use the Validate Loyalty Traceability Ledgers Data Processing Engine template. It validates the Loyalty Ledger Traceability records for each active, fixed-duration, and redeemable currencies in the loyalty program. It calculates member balances and checks for redeemed expired points, mismatched debit and credit points, and overconsumed points.

### 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</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>,&nbsp;<strong>Performance</strong>, <strong>Unlimited</strong>, and&nbsp;<strong>Developer</strong>&nbsp;Editions with Loyalty Management</td></tr></tbody></table>

For each loyalty program containing imported data, perform these steps.

1. Create a Data Processing Engine definition by using the Validate Loyalty Traceability Ledgers template.
2. Enter a value for the Loyalty Program Name input variable.
3. Run the Data Processing Engine definition.
4. Review the datasets by using [the Data Assets tab in Data Manager](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_data_manager.htm&type=5&language=en_US).
5. If there are any errors listed in the dataset, adjust your records to fix the errors. Then, rerun the definition to confirm data validity.

For each member currency with errors, the dataset contains an error record with fields that show error messages for these issues.

- Debit ledgers are consuming points from expired credit ledgers.
- The sum of the points consumed from a credit ledger based on the trace records exceeds the points in the credit ledger.
- The sum of points consumed by a debit ledger based on the trace records doesn't match the points in the debit ledger.
- The calculated point balance from traces doesn't match the current member currency point balance.

## Example of Loyalty Ledger Traceability Record Validation

Here's an example of how the Data Processing Engine definition identifies inconsistencies by comparing loyalty ledgers and traceability loyalty ledgers.

### Loyalty Ledgers

Here are the loyalty ledgers for a loyalty program member, Adria Darby, whose points balance is 17.

    
| Ledger ID | Event Type | Activity Date | Expiry Date | Points |
| --- | --- | --- | --- | --- |
| CL1 | Credit | 1/1/2024 | 1/1/2025 | 10 |
| E1 | Expiry | 1/1/2025 | — | 10 |
| CL2 | Credit | 1/1/2025 | 1/1/2026 | 15 |
| CL3 | Credit | 1/3/2025 | 1/3/2026 | 10 |
| CL4 | Credit | 1/3/2025 | 1/3/2026 | 10 |
| CL5 | Credit | 1/4/2025 | 1/4/2025 | 30 |
| DL1 | Debit | 1/3/2025 | — | 10 |
| DL2 | Debit | 1/6/2025 | — | 10 |
| DL3 | Debit | 1/6/2025 | — | 10 |
| DL4 | Debit | 1/8/2025 | — | 18 |

### Traceability Loyalty Ledgers

Here are the traceability loyalty ledgers for Adria Darby.

    
| ID | Credit Ledger ID | Debit Ledger ID | Points | Event Type |
| --- | --- | --- | --- | --- |
| TL1 | CL1 | DL1 | 10 | Debit |
| TL2 | CL2 | DL2 | 10 | Debit |
| TL3 | CL2 | DL3 | 10 | Debit |
| TL4 | CL3 | DL4 | 10 | Debit |
| TL5 | CL4 | DL4 | 10 | Debit |

### Validation Errors

After the Data Processing Engine job validates the records, it creates a record with the errors. Here's the list of errors and the reasons.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:42.857142857142854%">
              <col style="width:57.14285714285714%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d15721e534">Error</th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d15721e537">Reason</th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d15721e534 ">Debit ledgers are consuming points from expired credit ledgers.</td>

                <td data-label="Reason" class="slds-cell-wrap" style="vertical-align:top;" headers="d15721e537 ">The TL1 traceability loyalty ledger is invalid because it maps the DL1 debit ledger,
                  created on 1/3/2025, to the CL1 credit ledger that expired on 1/1/2025.</td>

              </tr>
              <tr class="">
                <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d15721e534 ">The sum of the points consumed from a credit ledger based on the trace records exceeds
                  the points in the credit ledger.</td>

                <td data-label="Reason" class="slds-cell-wrap" style="vertical-align:top;" headers="d15721e537 ">The TL2 and TL3 traceability loyalty ledgers are tracing 20 points to the CL2 credit
                  ledger though the CL2 loyalty ledger has only 15 points.</td>

              </tr>
              <tr class="">
                <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d15721e534 ">The sum of points consumed by a debit ledger based on the trace records doesn't match
                  the points in the debit ledger.</td>

                <td data-label="Reason" class="slds-cell-wrap" style="vertical-align:top;" headers="d15721e537 ">The TL4 and TL5 traceability loyalty ledgers are tracing 20 points to the DL4 debit
                  ledgers though the DL4 debit ledger has a debit of only 18 points.</td>

              </tr>
              <tr class="">
                <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d15721e534 ">The calculated point balance from traces doesn't match the current member currency
                  point balance. </td>

                <td data-label="Reason" class="slds-cell-wrap" style="vertical-align:top;" headers="d15721e537 ">
                  <p>The calculated point balance is 15 and it doesn’t match the member’s actual balance of
                    17. </p>
                  <p>Calculation details:</p>
                  <ul>
                    <li>The calculated points balance is 15. This value is the sum of credit ledgers CL2
                      through CL5, which is 65, minus the 50 points traced across ledgers TL1 through TL5.</li>

                    <li>CL1 isn’t used for calculation because the points expired.</li>

                  </ul>
                </td>

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