Data Archival
Overview
For most standard and custom objects in the Salesforce database, the data usage per record is a fixed value of 2KB irrespective of the number of standard and custom fields associated with the object. For some exceptional cases, it is considered 4KB also.
For example, if a business generates 50k records every day, the space usage increases by ~100MB (50k X 2KB) every day. And in a month, the usage may increase by ~3GB. If the old data is never deleted, the data usage may increase drastically, and it may require a significant amount of subscription fees to be paid to Salesforce.
If the old data generated by the business is not of any use to the day-to-day business function, it can be moved to offline storage and safely removed from the Salesforce database.
With the Mercury release, you can identify and archive such data in an automated way that can be safely moved to secondary storage. CL Loan supports the archival of the following objects:
- Payment
- Charges
- Bills
- Due Payment
- Fee Payment
You can configure the records that need to be archived by specifying the object type and the age of the record in days. The system picks the active data archival configs, marks the respective records as Archived, and creates a consolidated record as a Summary record if the Create Summary Transaction flag is enabled.
Example: Let us assume that the data archival is configured for the Payments object that takes data before 1st July and archives them. Also, it creates a consolidated Summary of the archived records.
Before Archival | After Archival | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Data Archival Configuration
This section explains in detail the various configurations and possible customizations. Following are the three different types of data archival configurations:
- Standalone Object Configuration
- Master Object Configuration
- Detail Object Configuration
These configuration types are used in defining the following three types of data archival:
- Standalone archiving
- Archive detail records partially
- Archive detail records fully
Prerequisites
Before you proceed to configure various types of data archival, ensure that the following prerequisites are met:
- Required fields are added to the New Data Archive Configuration window.
- The Data Archive Configurations tab is created and added to the home page.
- Users must have permission to the Data Archive Configurations and Data Archive Summary Fields objects.
- At least one application is created.
Standalone Archiving
This archiving is required for an object that is independent of other objects in the database. If the records are to be used only for accounting and auditing purposes, you can configure standalone archiving.
In CL Loan, you can configure standalone archiving for the Due Payment and Fee Payment objects.
Steps
To configure a data archival:
Log in to your Salesforce account.
-
Go to (App Launcher) > Data Archive Configurations, and then click New.
The New Data Archive Configuration window is displayed.
To configure the data archival for the standalone objects, select Standalone Object Configuration as the record type.
-
In the New Data Archive Configuration: Standalone Object Configuration window, provide the details as described in the following table, and then click Save:
Let us assume that a standalone data archival is configured for the fee payment object as illustrated in the following image:
A loan application is approved and funded, and the following two fee payment transactions are made on the application:
Go to Servicing Configuration > Run Batch Jobs, select Data Archival Job.
-
Click Next, and then click Run.
Fee payment transactions made before 60 days are archived.
Archive Detail Records Partially
One or more child objects of a parent object need to be archived based on their age. The summary record is required for some child objects, but it may not be required for others.
In CL Loan, you can configure child records archiving for the Payment, Charges, and Bills objects. To archive some of the child objects, two data archival need to be configured:
- With record type Master Object Configuration
- With record type Detail Object Configuration
Steps
To archive the detail records partially:
Log in to your Salesforce account.
-
Go to (App Launcher) > Data Archive Configurations, and then click New.
The New Data Archive Configuration window is displayed.
To configure the data archival for the master objects, select Master Object Configuration as the record type.
-
In the New Data Archive Configuration: Master Object Configuration window, provide the details as described in the table and the following image, and then click Save:
Let us assume that an archive detail records partially configuration is created for the charge object as illustrated in the following image:
To configure the data archival for the child objects, select Detail Object Configuration as the record type.
-
In the New Data Archive Configuration: Detail Object Configuration window, provide the details as described in the table and the following image, and then click Save:
Note:To archive other detail objects, perform steps 5 and 6.
A loan application is approved and funded, and the following charges are created on the application:
Go to Servicing Configuration > Run Batch Jobs, select Data Archival Job.
-
Click Next, and then click Run.
Charge records created before 180 days are archived.
Archive Detail Records Fully
One or more child objects of a parent object need to be archived irrespective of their age. Only those detail records need to be archived that correspond to master object records age criteria.
For example, detail object records for all loan applications need to be archived, which are in approved 180 days ago.
A Data Archive Configuration with record type ‘Master Object Configuration’ is required to set up this use case. For this use case, the summary record does not get created.
Steps
To archive the detail records fully:
Log in to your Salesforce account.
-
Go to (App Launcher) > Data Archive Configurations, and then click New.
The New Data Archive Configuration window is displayed.
To configure the data archival for the master objects, select Master Object Configuration as the record type.
-
In the New Data Archive Configuration: Master Object Configuration window, provide the details as described in the table, and then click Save.
This automatically creates the detail object configurations for this Master Object Configuration.
From the list of Detail Object Configuration, select and edit the configuration for the child object that is to be archived.
-
Specify the following details, and then click Save:
Object Name: This field is auto-populated.
Parent Relationship Field Name: This field is auto-populated. If you want to provide a different Lookup field name to identify the detail records, specify the same.
Select the Active checkbox to run the Archival job to process this configuration automatically.
-
Remove the Last Processed Date Time.
Note:- To archive other detail objects, perform steps 5 and 6.
- If other Detail Object Configurations are not needed, you may delete them.
View/Delete Archived Data
You can view or delete the archived data on the Archived Data page. With the Mercury release of CL Loan, you can apply filters and fetch archived data for reference or accounting purposes.
Prerequisites
None.
Steps
To view/delete the archived data:
Log in to your Salesforce account.
-
Go to (App Launcher) > Archived Data.
The Archived Data page is displayed with various filters such as Date Range Filters, Required Filters, Extra Filters, Fields To Be Retrieved.
From the Select an Object drop down, select the object for which you want to view the archived records.
-
In the Date Range Filters section:
from the Date Field for Filtering drop down, select a date field on which you want to apply a range.
Select From Date and To Date.
-
In the Required Filters section:
Loan Account - Specify the loan account number for which you want to view the archived data. This field is applicable for Archived Charge, Archived Loan Account Due Details, Archived Loan Payment Transaction.
Loan Payment Transaction - Specify the LPT id that is appended with the URL. This field is applicable for Archived Due Payment, Archived Fee Payment.For example, in this URL: https://na123.lightning.force.com/lightning/r/loan__Loan_Payment_Transaction__c/a873t000000Tk4XAAS/view, a873t000000Tk4XAAS is the LPT id.
In the Extra Filters section, you can specify the required value.
In the Fields To Be Retrieved section, select fields you want to see for the archived record.
-
To view the data, click Get Data, or to delete the data, click Delete Data.
You can only view the archived record for the time being. There is no option to download the records.
Sl.No. | Question | Answer |
---|---|---|
1 | Can I run the archival job multiple times in a day? |
Ideally, every data archival configuration should be run once a day. A data archival configuration field called Last Processed Date Time saves the last run timestamp and compares it with the current system timestamp. When the date matches, it does not process the configuration. To run the archival job multiple times, the user must clear this field from the respective data archival configuration. |
2 | Is summary record creation mandatory? | No, it is a flag-based setting. It can be disabled on-demand. |
3 | Is summary record creation for payment affect the loan's state? | The loan's state does not change with payment insertion having the summary flag as Ture. It does not call the LPT trigger logic. |
4 | Does the solution pick rejected or reversed LPTS too? | Yes, the solution picks the nonarchived records. |
5 | Can we archive junctions? |
Yes, you can, but summary creation won't be logical. It is recommended to go for Standalone configurations for the junctions archival, as this configuration won't support summary creation. |
6 | Should junctions be archived? | It varies from business to business use cases. |
7 | How does a summary record get created? |
Among all the records picked for archival, the system takes the first record (latest Or recently created one) and clones it. The cloned record is then marked as summary = true, and all the aggregation(decimal values) is performed on it. |
8 | How many summary records get created for an object? |
The configuration picks all the summary records and non-archived records older than N days, where N is a field (Archive Data Older Than) on the archival configuration. If the records picked is having at least a summary record, it won't create a new, and updates the existing one, else create a new one. |
9 | Does the system create summary records for all types (Standalone, Master, Details) of configurations? | A summary record can be created only for the Detail Object Configuration as of now. |
10 | What is the minimum number of records needed to perform archival on an object? | More than two. |