Newer Version Available
SandboxInfo
SandboxInfo enqueues a sandbox for creation or refresh. A create operation on SandboxInfo represents creation of a new sandbox, and an update represents refresh of an existing sandbox. For every creation or update, a SandboxProcess is automatically created and is used for monitoring the sandbox copy process.
This object is available in API version 35.0 and later.
Supported SOAP Calls
create(), delete(), query(), retrieve(), update()
Supported REST HTTP Methods
GET, PATCH, POST, DELETE
Fields
| Field | Details |
|---|---|
| ActivationUserGroupId |
|
| ApexClassId |
|
| AutoActivate |
|
| CopyArchivedActivities |
|
| CopyChatter |
|
| Description |
|
| Features |
|
| HistoryDays |
|
| LicenseType |
|
| SandboxName |
|
| SourceId |
|
| TemplateId |
|
Usage
Creating a Sandbox
To enqueue a new sandbox:
- Create a SandboxInfo record.
- To find the status of a sandbox after it is enqueued, query SandboxProcess for a given SandboxInfoId field to find the latest SandboxProcess record. The value of Completed in Status indicates that the creation process is finished.
Refreshing a Sandbox
To refresh a sandbox:
- To start a sandbox refresh, edit the SandboxInfo record.
- To find the status of a sandbox after it is enqueued, find the latest SandboxProcess record by querying SandboxProcess for a given SandboxInfoId value. The value of Status indicates the current state of the process.
- When the Status field value is Pending Activation, change the value of the RefreshAction field to either ACTIVATE or DISCARD.
Deleting a Sandbox
To delete a sandbox, delete the SandboxInfo record that represents the sandbox. Deleting the SandboxInfo record deletes the sandbox and frees up a license.
Checking Sandbox Progress
Each SandboxProcess record progresses through several stages represented by the StageType and StageNumber on the SandboxProcessStage record. The system updates progress details as the copy proceeds. For every stage, you can view specifics using the Status, StartTime, EndTime, and InfoLastUpdated fields.
If your sandbox status is suspended or stopped for more than 1 hour, contact Salesforce customer support.
While the system can't provide a time-based estimate, you can track your place in the queue or how much work exists and has been completed.
- During the In Queue stage, you can check your current place in the queue with the EstimatedTotalWork field.
- During the Data Copy and Activation stages, you can check how much work exists and has been completed to estimate copy completion with the EstimatedTotalWork, ActualTotalWork, and CompletedWork fields.