- Print
- PDF
ACE Letter Loops allow you to include dynamic, repeating data in your letter templates. This document focuses on specific types of letter loops and provides examples of how to use them in ACE.
For a comprehensive understanding of how loops work in ACE letters, including the full list of available loops and detailed setup instructions, please refer to Understanding Loops in Letters and Other LibreOffice Templates.
Important Notes
Type: The Letter Type specified in the Letter Profile must match the loop you're using. For instance, if you're using BUNDLE loops, the Letter Type should be set to BUNDLE.
Status Code Groups: When using Bundle letter loops, ensure that the Status Code Group in the Letter Profile is set correctly. For example, only accounts with a status in the NEW status group will appear in a New Bundle Letter using the new_bundle_loop.
Specific Letter Loops
1. New Bundle Loop
Loop Name: new_bundle_loop
Letter Type: BUNDLE
The new_bundle_loop will look at the Status Codes in each bundled account and will only put accounts in the letter that have status codes in the “NEW” status group. This is useful for sending letters that pertain specifically to new accounts within a bundle.
Setup Instructions
Create the Header Table:
Insert a table with one row and the required number of columns (e.g., Account Number, Amount Due, Status).
Do not set a table name for this table.
Create the Data Table:
Insert a second table with one row and the same number of columns.
Name the table: Right-click the table, select Table Properties, and set the Name to new_bundle_loop.
Table Setup in the Template:
The first table (1) acts as the header with column titles "Account Number," "Client Name," and "Amount Due."
The second table (2), named new_bundle_loop, includes placeholders for data pulled from the database: ACE.ods.debt.debtID, ACE.ods.client.companyName, and ACE.ods.debtBuckets.currentBalance.
This layout confirms that the template is prepared to dynamically insert the account data for each new bundle as it loops through the records, ensuring that the information lines up correctly under the respective headers.
Example Output:
The Header Table (1) provides the column titles, and the Data Table (2) fills in with account information filtered by the loop's criteria—here, showing only accounts with statuses in the 'NEW' status group.
The loop populates three accounts with their respective details, aligning with the headers above.
2. Active Bundle Letter Loop
Loop Name: active_bundle_loop
Letter Type: BUNDLE
The Active Bundle Letter Loop includes only accounts in a bundle that have statuses in the ACTIVE status group. Use this loop when you want to focus on active accounts within a bundle.
Setup Instructions
Create the Header Table:
Insert a table with one row and appropriate columns (e.g., Account Number, Current Balance).
Create the Data Table:
Insert a second table with one row and matching columns.
Name the table: Set the Name to active_bundle_loop.
Tips and Common Issues
Status Codes: Confirm that the accounts you expect to include have statuses in the ACTIVE status group.
Letter Profile Configuration: Verify that the Letter Profile is correctly set to type BUNDLE.
3. Bundle Loop
Loop Name: bundle_loop
Letter Type: BUNDLE
The Bundle Loop includes all accounts in a bundle, regardless of their status. This is useful for comprehensive communications that need to reference every account within a bundle.
Setup Instructions
Create the Header Table.
Create the Data Table:
Name the table bundle_loop.
Insert Data Fields:
Include fields like debt.clientAccountNumber, debt.amountDue, and debt.statusCode.
4. Bundle Group Loop
Loop Name: bundle_group_loop
Letter Type: BUNDLE_GROUP
The Bundle Group Loop includes accounts in the bundle that match a specific bundle group specified in the Letter Profile. This allows targeted communications based on bundle groupings.
Setup Instructions
Set Up the Letter Profile:
Ensure the Letter Profile is of type BUNDLE_GROUP.
Specify the desired bundle group in the profile settings.
Create the Header and Data Tables:
Name the data table bundle_group_loop.
Insert Data Fields:
Include relevant fields specific to your bundle group.
Tips and Common Issues
Bundle Group Specification: Make sure the bundle group is correctly defined in the Letter Profile.
Testing: Test the letter to confirm that only accounts from the specified bundle group are included.
5. Payment Plan Scheduled Letter Loop
Loop Name: payment_plan_schedule_loop
Letter Type: PAYMENT_SCHEDULE
This loop includes the payment dates and amounts scheduled in a payment or promise plan. It's ideal for sending payment schedules to consumers.
Setup Instructions
Create the Header Table:
Columns might include Payment Date and Payment Amount.
Create the Data Table:
Name the table payment_plan_schedule_loop.
Insert Data Fields:
Use fields like paymentPlanSchedule.scheduleDate and paymentPlanSchedule.amount.
6. Payment History Loop Letter
Loop Name: payments_loop
Letter Type: PAYMENT_SCHEDULE
Displays all previous received payments on an account. Useful for providing consumers with their payment history.
Setup Instructions
Create the Header Table:
Columns might include Date, Amount, and Payment Method.
Create the Data Table:
Name the table payments_loop.
Insert Data Fields:
Include fields such as debtTrans.transDate, debtTrans.amount, and debtTrans.typeName.
Tips and Common Issues
Two-Table Structure: Using separate tables for headers and data prevents headers from repeating.
Letter Type: The Letter Profile should be set to PAYMENT_SCHEDULE.
7. Debt Transactions Loop Letter
Loop Names:
Charges and Credits: debt_trans_owing_loop
Payments Received: debt_trans_received_loop
Letter Type: DEBT
This letter includes two loops to display adjustments owing and transactions received.
Setup Instructions
Create Header and Data Tables for Each Loop:
Charges and Credits:
Name the data table debt_trans_owing_loop.
Include fields like debtTrans.transDate, debtTrans.typeName, debtTrans.amount.
Payments Received:
Name the data table debt_trans_received_loop.
Include similar fields as appropriate.
Insert Data Fields:
For each data table, insert the corresponding data fields.
Table Setup in the Template:
The first table (1) acts as the header with column titles "Date," "Description," and "Amount" for the section labeled "Charges and Credits." This table outlines the framework for listing various financial transactions related to charges and credits associated with an account.
The second table (2) populates data dynamically for the "Charges and Credits" section, including placeholders pulled from the database:
Date: ACE.ods.debtTrans.transDate
Description: Combines ACE.ods.debtTrans.bucketLabel, ACE.ods.debtTrans.owingAdjustmentReasonLabel, and ACE.ods.debtTrans.note
Amount: ACE.ods.debtTrans.amount
The third table (3) serves as the header for the "Payments Received" section, mirroring the format of the first table but tailored for payments, with the same column titles: "Date," "Description," and "Amount."
The fourth table (4), corresponding to data entries for the "Payments Received" section, includes similar placeholders from the database:
Date: ACE.ods.debtTrans.transDate
Description: Combines ACE.ods.debtTrans.bucketLabel, ACE.ods.debtTrans.receivedAdjustmentReasonLabel, and ACE.ods.debtTrans.note
Amount: ACE.ods.debtTrans.amount