---
title: "Customer AR Cleanup Scheduled Task"
canonical: "https://kb.myframeworks.com.au/space/CO/30515698/Customer%20AR%20Cleanup%20Scheduled%20Task"
format: markdown
---
This scheduled task is designed to remove any Account Customer and Cash Customer transactions older than 90 days as well as remove any statement history for these accounts.


<details>
<summary>Flags/Settings</summary>

This flag is added by the Frameworks installer InstallerFW8571. Ensure the value is set as per below:

| **Flag** | **Description** | **Value** |
| --- | --- | --- |
| ExtCustGrp | External Customer Group | MEMB |

Set customer group for each customer indicating that it was sourced from the parent ERP to the value **MEMB** as per the flag above, under Customer Maintenance - More Data:

![image](media://45441718-7af5-4bfc-8b52-79f404d8845d)
</details>

### Add Scheduled Task to Shortcut menu in Frameworks


| **Step** | **Task** |
| --- | --- |
| 1 | After logging in to Frameworks, click > Macro (inline-media-image)

 from the **My Shortcuts** section header on the right side of the screen |
| 2 | Click > Macro (inline-media-image) |
| 3 | In the search box enter the activity **debtorCleanUpSched and click "Finish**<br>![image](media://c27604c4-8d10-4b4a-b4ec-104def290d68) |
| 4 | The scheduled task **Debtor Transactions Cleanup** is now added to the shortcut menu |

### Schedule the Debtor Transactions Cleanup Task

| **Task** |
| --- |
| <span style="color: #003366">From the shortcut menu select the </span><span style="color: #003366">**Debtor Transactions Cleanup**</span><span style="color: #003366"> option as created above.</span> |
| By default the "Report Criteria" defined for the scheduled task is set automatically to **Aged Days **= 90 days, and **Customer Group** = MEMB as per flag setting ExtCustGrp. |
| Under the "Scheduled" tab set the frequency you wish to run the scheduled task - once only, daily, weekly, or monthly. |
| Click "Submit" to run the scheduled task. if set to run immediately go to the "Output" tab to view the generated reports:<br>- ARTransactions.csv - this shows a listing of all invoices deleted by the cleanup task.
- ARPaymentTransactions.csv - this shows a listing of all payments deleted by the cleanup task.
- CustStatement.csv - this show a listing of all statements per date that have been deleted by the cleanup task. |
| Once run:<br>- For any account customers that belong to the predefined customer group, transactions older than 90 days are removed, as well as any statement history.
- For any cash customer that belong to the predefined customer group, transactions older than 90 days (only if the account balance is zero) are removed. |