CopyStorm Archival System Overview
CopyStorm’s Archival System creates tamper resistant snapshots of Salesforce records under conditions that are specified by a customer. Examples:
- Archive all deleted records.
- Archive modifications to closed Opportunity records.
- Archive modifications to Case records where the custom file archiveStatus__c is set to Active or Continuous.
- Archive all changes to Account and Contact records.
- Archive all changes made to Contact records by User firstname.lastname@example.org
As you may suspect, the conditions that can be specified to trigger the archive of a record can be quite rich.
There are several broad situations where a CopyStorm Archive is a great choice.
Deleted Record Retention — Recycle Bin
By default, CopyStorm creates one archive — the Default Recycle Bin. The CopyStorm recycle bin is similar to the Salesforce recycle bin but with many features unavailable within Salesforce.
- Any type of record can be archived — even those not supported by the Salesforce recycle bin.
- The recycle bin can keep deleted records forever (or any other specified duration)
- Data retention policies can be applied on per table basis. For example, it is easy to tell the system that Accounts, Contacts, Cases, and Opportunities should be archived forever while other archived records should be deleted after 90 days.
In addition to a record’s data, the archival system will remember the field definitions in place at the time of archival.
Permanent Record Deletion in Salesforce
Sometimes it makes sense to delete old records from Salesforce but the records still need to be kept around “just in case”. This is easily achievable with a CopyStorm archive.
- Define a new CopyStorm archive with a filter describing the records that should be archived.
- Run the archive by hand. This will scan existing Salesforce records and archive those that meet the filter.
- Delete the archived records in Salesforce.
The archived data can be retrieved using the CopyStorm Archive Explorer or by running your own SQL queries.
Show Archived Records in Salesforce
Once records have been stored in a CopyStorm Archive, a common use case is to display the archived records in the Salesforce GUI. If you have technical staff with the required skills, this is a fairly simple task.
- Create REST Web Services for querying a CopyStorm Archive. You can host the web services in the container of your choice.
- Craft a handful of Salesforce lightning components that use the web services.
- Add the lightning components to Salesforce pages.
If this sounds too complex, our reference implementation based on Apache/Tomcat can get you started (contact email@example.com for the status of our reference implementation).
Meet Compliance Requirements
The original motivation for CopyStorm Archive came from a customer.
We have hundreds of active lawsuits at any given point in time and we need to archive all changes to related Salesforce records.
A CopyStorm archive can be used to solve this problem by creating a new archive that contains a filter to define the criteria under which records should be archived. If this archive is activated, CopyStorm will automatically apply the filter to records as they are backed up and archive them if they meet the filter criteria. Examples:
- Archive all changes to Contracts associated with Account “Acme Industries” that occur after 2019-01-01.
- Archive all email communications with Contacts working for “Acme Industries” and any emails to the domain “acme.com”.
To assist compliance, archive records will be tamper resistant. Any tampering will be detectable because it will cause the computed fingerprint associated with a record to change. Records can be made tamper proof if an archive’s database protections are set to write-only.
CopyStorm Archive is implemented as a set of documentation tables that are automatically created and maintained by CopyStorm. There is nothing a user has to do to create or maintain the tables — they are created on first use of the archive system and maintained by CopyStorm.
Like other other CopyStorm tables, the schema is documented and the tables are directly queryable by customers. However, unlike other CopyStorm tables, you may need a little help constructing queries since most of the data for archived records is stored as XML. The good news: CopyStorm’s Archive Explorer can be used to easily generated base SQL queries which a customer can modify for their specific needs (We have a hard time remembering how to construct XML based queries for databases too!).