# Sandbox Refresh

GRAX Application connections are impacted each time a Salesforce sandbox refresh takes place, however, getting GRAX up and running again in the new environment is a straightforward process.

## Why would a Sandbox get refreshed?

* To bring down a clean copy of the production environment to allow you to start the next project/test with a fresh and updated environment
* To start a new sandbox due to expiration of previous sandbox
* May be required as part of a software development cycle

{% hint style="info" %}
Please note that your sandbox will have a new org ID after the refresh.
{% endhint %}

## GRAX Sandbox Deployment Policy

Like Salesforce, GRAX monitors sandbox deployments for activity and automatically deletes deployments after a period of 180 days of inactivity. This improves security by cleaning up data, and cost by turning off unused servers. At any time you can deploy a new sandbox backend via [GRAX Platform](https://app.gitbook.com/s/qjG14Rorm2T7JgMy0hrc/) or by [contacting GRAX Support](https://app.gitbook.com/s/Ujmw35eIn7K36mAY2dSt/get-support).

## Pre-Refresh Requirements

Before the refresh:

* Ensure that the `Admin Email Address` is set to one or more valid email addresses within the `Settings` section of the GRAX Application
* Disconnect Salesforce by [Resetting GRAX](https://documentation.grax.com/other/connecting-salesforce#resetting-grax)
  * Navigate to `Settings`
  * Expand the `Salesforce` panel
  * Click `Reset GRAX`

<figure><img src="https://4150568565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwHKnqFEg4DROpG3KCq3D%2Fuploads%2F54ngAXgSy2iSmO7lcSNc%2Fdisconnect-salesforce-sandbox.png?alt=media&#x26;token=add45a96-d585-4c7d-b6f5-9a38dd5d1d72" alt=""><figcaption><p>Destroy the Current Salesforce Connection</p></figcaption></figure>

## Post-Refresh Reconfiguration

### GRAX Application Reconfiguration

* Login to your sandbox in SFDC as the GRAX Integration user
* Navigate to your GRAX App at `[your-grax-domain-and-port]/web` and follow the steps to [Connect Salesforce](https://documentation.grax.com/other/connecting-salesforce#connecting-a-new-grax-application-to-salesforce)
  * Follow the prompts to Connect with Auto Config and restart Backup
* Navigate to `Settings` within the GRAX Application and expand the `Salesforce` section to confirm that the you are connected to the correct SFDC org with the correct Integration User. You will see a green dot followed by the word `Connected` if the connection is successful. If you need to modify the connection details, click `Update` to reset the connection

### GRAX Managed Package Reconfiguration

The GRAX Managed Package is optional and not all customers use it. If your organization uses the Managed Package, follow the steps below:

* Follow the [GRAX Application Reconfiguration](#grax-sandbox-deployment-policy) steps detailed above
* Navigate to the GRAX tab within SFDC
* [Configure GRAX in Salesforce](https://documentation.grax.com/reuse-data/managed-package)
* [Configure the Remote Site Setting](https://documentation.grax.com/reuse-data/managed-package)
* [Add your URL to the Trusted URLs list](https://documentation.grax.com/reuse-data/managed-package) if you see a banner at the top of the page prompting you to do so
* You can now navigate to the GRAX Application directly from SFDC via the `Schedule` and `Search` tabs


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.grax.com/other/settings/sandbox-refresh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
