Skip to main content
Create a new Archive and Policy

Steps on how to create a new archive and policy.

Terrance Harris avatar
Written by Terrance Harris
Updated over a week ago

Before creating a new archive and policy, it's important to understand the difference between the two:

Policy: these are created on a per-object basis, so feel free to make as many policies needed to account for the objects in your org.

Archive: think of this as a container to hold and access your policies -- archives are created on a per-org basis, so you'll be able to access all of the policies for the objects in your org for a single archive.

Creating a new archive

To create a new archive, start by navigating to the Archiving tab in the left hand window.

Once on the main page, click the link to Create an archive.

On the next page, you'll be prompted to select the org you'd like to archive records from, and give the archive a name. Gearset will inspect the selected org to ensure the proper permissions are in place to interact with the data from the org.

If the proper permissions aren't detected, you'll see the notice above prompting you to log in to the selected org and enable the necessary permissions to proceed; steps to do so can be followed in this doc.

Once those permissions have been enabled, you'll see that confirmation in Gearset.

In the Field permissions section, Gearset will check for Read permissions within the org. If it detects that they are missing, you'll be presented with two options:

  • Create a permission set (Recommended)- Gearset will run a deployment to that connection to create the missing permissions.

  • Keep permissions the same- No permissions will be deployed; note that any permissions not deployed during archive setup will be excluded from future permission checks.

Once you've chosen how you'd like to proceed, click Continue on the bottom left.

From there, you'll be able to select which fields you'd like to assign Read access to; we suggest assigning access to all of the fields, if possible.

After selecting your fields, select Deploy all missing permissions to proceed to the next step. If you're not ready to deploy those changes at that time, you're also able to generate a deployment package to deploy at a later time by clicking Generate permission set.

Next, you'll be asked to choose how you'd like to handle missing permissions in the future. You'll be presented with three options to choose from:

  • Deploy missing permissions automatically (Recommended)- Gearset will automatically deploy missing field permissions prior to any data being archived.

  • Don’t archive any data if there are missing permissions- If any connection is missing permissions for new fields, Gearset can notify you if anything is absent; nothing will be archived until the missing permissions have been assigned.

  • Ignore missing permissions and continue archiving- Data will be archived regardless of missing permissions. Please note that data in fields without the Read permission may be irreversibly deleted.

Creating a policy

Policies exist within an archiving instance, and are defined per object to determine which records are to be removed from the org. Once you've established read permissions for the fields (both present and future), you'll be able to create a policy for individual objects, and apply filter rules for determining which records to include in the policy.

In the example below, you'll notice I'm creating a policy for the Account object, and filtering based on the CreatedDate field with the operator of older than, and a value of 3 years -- so in this case, the policy will include any records that were created in the Account object prior to the last three years.

You can then preview the fetched records that will be included in the archive that have filtered through the filter rules. I've included one filter in my example, but you're welcome to add more filters to the policy if needed.

In addition to our standard filtering options, you'll also have the option to toggle on advanced filtering; doing so would allow you to filter using SOQL queries, for those looking to be more specific with their filtering.

Gearset will be able to validate those SOQL queries, and confirm if a query is valid:

Or invalid:

After establishing the criteria for the policy, you'll be presented with a review of the related objects. Gearset brings these objects to your attention because any related child records on those objects will automatically be archived with their parent records.

Gearset provides the option to temporarily disable any triggers or flows that might interfere with the archival process. Salesforce imposes limits on the number of records that can be modified in a single batch. With triggers or flows enabled, these limits are often further constrained due to chained updates, reducing the number of records that can be archived at once.

The Preview feature allows users to verify that the correct records are being archived. It gives customers a chance to review the selected records before making any changes or modifications to their Salesforce org, ensuring they back up exactly what they need.

From there, your policy will be newly created, and added to your Archiving dashboard. Click Run now to run the archive job.

You'll be able to view and access your policies from this dashboard, as well as manually run the archiving job. There's also an option to schedule your job to run at a set time daily or weekly.

That's it! You should now have a new created archive and your first policy established. As always, if you have any questions or run into any issues, feel free reach out to our Support team by accessing the blue icon on the bottom right and dropping us a message in the in-app chat.

Did this answer your question?