# Archival Configuration for your Salesforce Org

### Overview <a href="#overview" id="overview"></a>

Data archives can be thought of as a data repository for infrequently accessed, but still readily available data. In Vault, data archival is all about moving the unwanted data components from your Salesforce Org and freeing the space for new data. This data is safely stored for future use. In a nutshell, Vault makes Salesforce data archiving and backup simple, productive, and a joy to use.

### Procedure <a href="#procedure" id="procedure"></a>

1. Login to your Vault account.
2. Go to **Setup** and search for the Salesforce Org from which the data has to be archived. You can use the **Search** filter to easily filter out the required Salesforce Org.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F8piTUORDXH0Yds8LKg50%2Fimage.png?alt=media&#x26;token=6035fb5e-1f5e-4700-93b7-e47d8d4a9cb1" alt=""><figcaption></figcaption></figure>

3. Select the desired Salesforce Org.
4. The next step is to create Archival Config, navigate to the **Configs** tab, and click on **Add Archival Config**. This will allow you to view all the components available in your Salesforce Org and choose the components for which you want to define the archival policy.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FQbiGtmqRBYdQy4kDXXMV%2Fimage.png?alt=media&#x26;token=eedf5c20-4484-44ee-811d-b216c4004350" alt=""><figcaption></figcaption></figure>

5. Select the components that you need to archive on the next screen.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F1ArunlHnOe4oBypx8yTA%2Fimage.png?alt=media&#x26;token=aa3bcd31-0e89-4736-82b2-446e79355600" alt=""><figcaption></figcaption></figure>

6. Using **Filter** you can define the criteria on which the records will get fetched.\
   **For ex-** If you can define criteria to fetch Case records that are older than 1000 days and are in the closed state Validate your query to see whether the criteria set is correct and view the number of records that will be fetched. You can even set the record count limit for your data being fetched. Click on **Apply** to set the criteria and close the Filter dialog box. For easy identification of objects on which filter is applied, the filter icon is highlighted.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FfAtQQdoAsnk80Bx5yVPG%2Fimage.png?alt=media&#x26;token=53112bd0-9f50-443a-b58d-6ba98a0597c4" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FQvq0I6RDV2F8TBduyARu%2Fimage.png?alt=media&#x26;token=56be293a-9953-4ae0-898f-e5dbd337e302" alt="" width="563"><figcaption></figcaption></figure>

7. The **Hierarchy** option will allow you to view all the corresponding child objects for your selected object. These child objects will also get archived once you archive their parent object. Such a hierarchy schema view can be seen using the **Hierarchy** option.
   * You may notice in the schema view that some of the objects are auto-selected by default and cannot be unchecked. These are the child objects of its parent object which will be deleted for sure if its parent object is selected for archival policy. However, for other objects which are related to the selected object in some other way, you may have the option to choose them manually for archival.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FBpaDeBZirmdoA2uElAri%2Fimage.png?alt=media&#x26;token=fef6ea4e-33de-4f29-93a7-b3bfa9eaf3e9" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F3rj8YK3Q7HcC9lUfMyic%2Fimage.png?alt=media&#x26;token=14cc6c3a-94d1-49a1-bac0-c4b20d1c32de" alt="" width="563"><figcaption></figcaption></figure>

8. Once done, click **Save** to close the hierarchy-schema screen. Similar to Filter criteria addition, the hierarchy icon gets highlighted corresponding to the object for which hierarchy is selected.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FKAEoNuXNuObhBp5bOiqo%2Fimage.png?alt=media&#x26;token=49a31c11-9588-42d6-8994-ee30c178562a" alt=""><figcaption></figcaption></figure>

9. Click **Next.** On the next screen, do the following:

   * Give the process a **name**.
   * Select the **email notification** checkbox to receive an email notification whenever the objects are getting deleted from your Salesforce Org. If unchecked, data will be automatically deleted without any prior notification.
   * Select the date and time interval for the archival process to run under the **Schedule Archival** section. You can set the policy to run either daily, weekly, monthly, or input any duration manually.
   * You can specify to what time period you want to retain the archived data under the **Archival Retention period** section.
   * Specify the **batch size** for components to retrieve records. 10K is the max batch size that you can set per batch. This option is useful in running large jobs that would exceed normal processing limits. As per the Salesforce governor limit, you can deploy or retrieve up to 10,000 files at once or a max size of 40MB. Using Batch Size, you can process records in batches to stay within platform limits. If you have a lot of records, processing records through batches are your best solution.
   * **Enable serial mode for Bulk API:** Serial mode processes batch one at a time, however, it can increase the processing time for a load.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FNw0XtW6TOeNKIQuivFGY%2Fimage.png?alt=media&#x26;token=5718fb03-fee0-4c4d-8daf-077ae6d1573b" alt=""><figcaption></figcaption></figure>
10. Click **Save Config**.
11. A summary of all the objects, filters, and criteria selected or applied will get displayed before your archival policy gets configured. Click **Save**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FSR3UpZa6fmERFN0hmP02%2Fimage.png?alt=media&#x26;token=45a84b5b-621c-4b84-ac28-5dbe6cefe32b" alt="" width="563"><figcaption></figcaption></figure>

12. Now go to the **Archival** tab.
13. Select your [**Salesforce Org**](https://knowledgebase.autorabit.com/docs/org-synchronization) for which you configured the archival recently.
14. Select the **Environment**.
15. Select the archival configured recently under **Configurations** drop-down field.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F0ziTy3L0n55PxMZOi3cb%2Fimage.png?alt=media&#x26;token=87c6c9f2-7d47-4b66-be8d-6904f4ad511e" alt=""><figcaption></figcaption></figure>

16. Click on **Get Details** to etch all the existing archival configured for your Salesforce Org. If you've initiated the archival process for the first time in Vault, you will not find any details on this page.
17. To run on-demand archival before the scheduled archival set, use **Archive Now** button.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FsA7C5SKvkDDNxASftUxt%2Fimage.png?alt=media&#x26;token=cc43343c-3bb9-44cb-8af2-220ffbaa54bb" alt=""><figcaption></figcaption></figure>

18. On the **Start Archival** screen, the label name gets auto-populated, however, you have the option to edit the label name and enter the label you desire.
19. Select your configuration and click **Archive**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FKHmCSQQoer8Ln8IGUTWh%2Fimage.png?alt=media&#x26;token=cc3029b5-aef6-426b-b9bc-452e1e6ec4f6" alt=""><figcaption></figcaption></figure>

20. You'll be redirected to the **Archival** screen to view the status of the ongoing archival process being run (under the In-progress tab).

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FfsrcWt45bsNB6ACXDuuL%2Fimage.png?alt=media&#x26;token=4daa75d6-9fd3-429e-899f-7252707fc3b0" alt=""><figcaption></figcaption></figure>

21. For each archival job, the following information will get displayed:
    * **Label**: An identification name for each archival performed in Vault
    * **Configuration Name**: Archival configuration name
    * **Date/Time**: The date and time stamp for the archival process took place
    * **Expiry Date**: Till which date the archival job will remain with Vault
    * **Duration**: Time-taken to complete the archival operation
    * **Records**: Total numbers of records archived
    * **API Calls**: Api call duration (in seconds)
    * **Query**: Filter or query that have been used to fetch the records
    * **Data Backup**: Backup type for data components i.e., *Full backup* or *Incremental backup*
    * **Status**: Status of the archival i.e., completed, in progress or failed
    * **Actions:**
      1. **Summary Report**: View the summary info for the archive performed. The report will contain the list of both success and failed components for the job triggered as shown below.
      2. **View Log**: View the log information for the archival job triggered.
      3. **Download Archival Report**: Specify the email address to receive the downloadable link to allow mentioned users to download the archival report on their local machine.
