In Salesforce.com, a Salesforce Sandbox template is used to control which object data is copied into a Partial Copy sandbox or a Full sandbox. Developer and Developer Pro sandboxes do not use sandbox templates because they are mainly used for configuration and metadata testing rather than copying selected production data.

What is a Salesforce Sandbox Template?

Salesforce Sandbox template allows user to pick specific objects and data to Full Sandbox or partial copy sandbox to control the size and content of each Salesforce sandbox.

A sandbox template is useful when you do not want every production record copied into a testing environment. Instead, you select the standard and custom objects that are required for development, testing, training, integration testing, or user acceptance testing.

  • When creating Sandbox template, we can select standard and custom object data.
  • Some objects are included before selecting data because they are required in any organization.
  • Sandbox template can understand the relationship of the selected object.
  • Selected object list can be displayed with total selected number.

To create a Partial Copy sandbox and Full Sandbox, we must create and apply a sandbox template at creation time, although there is a maximum of 5 GB of data storage and 5GB of file storage that can be stored. For each selected object in the sandbox template, up to 10,000 records are brought over from the production environment.

For a Partial Copy sandbox, the sandbox template defines the selected production data that is copied. For a Full sandbox, a template can be used when you want to limit the copied data to selected objects instead of copying all available production data. The exact options available depend on the sandbox type, org edition, and sandbox licenses available in the Salesforce org.

When to use a Salesforce Sandbox Template for Partial Copy and Full Sandbox

Sandbox TypeUses Sandbox Template?Typical Use
Developer SandboxNoConfiguration, Apex, Flow, and metadata testing with limited data.
Developer Pro SandboxNoDevelopment and testing that needs more storage than Developer sandbox.
Partial Copy SandboxYesCopies metadata and a sample of selected production data based on the template.
Full SandboxOptional depending on the data copy requirementCopies production metadata and data, or a controlled subset when a template is used.

Use a sandbox template when the testing team needs realistic data but not the entire production database. This keeps the sandbox more focused and easier to manage.

How to Create Salesforce Sandbox Template?

In this Salesforce tutorial, we are going to learn about how to create salesforce sandbox template and how this sandbox template is used when creating Partial copy sandbox and full copy Sandbox.

Step 1: Open Sandboxes from Salesforce Setup

  • Navigate to Setup | Deploy | Sandboxes.

Click on Sandboxes, now a new page will be displayed with three tabs Sandbox, Sand template and Sandbox history.

Step 2: Create a new Salesforce Sandbox template

  • Select Sandbox template | New Sandbox template.
How to Create Salesforce Sandbox Template

Step 3: Enter the Salesforce Sandbox template name and description

  • Enter name (10 character ) and description for the Sandbox template.

Use a clear template name that helps administrators identify the purpose of the sandbox data. For example, a template for UAT may include objects such as Accounts, Contacts, Opportunities, Cases, Products, and related custom objects, while a training template may include only the records required for sample exercises.

How to Create Salesforce Sandbox Template

Step 4: Add objects to Salesforce Sandbox template

To add objects to Salesforce Sandbox template, select the checkbox for each object from the available objects list. Selected objects list will be displayed as shown above. When we deselect the checkbox object will be removed from the selected object list.

Choose objects based on the business process you want to test. If you are testing a sales process, include the objects that support that process, such as Account, Contact, Opportunity, Product, Price Book, Quote, and required custom objects. If you are testing support processes, include Case and related objects. Avoid selecting objects only because they are available.

  • After confirming all your choices, finally click on Save button.
How to Create Salesforce Sandbox Template

For example, if you have a Salesforce Sandbox template that includes only accounts to create a Partial Copy sandbox then up to 10,000 Account records will be copied into the new sandbox . Unlike the Developer and Developer Pro sandboxes, the Partial Copy sandbox can only be refreshed once every 5 days. 

How Salesforce Sandbox templates handle related objects

When selecting objects for a sandbox template, review object relationships carefully. A selected object may depend on parent or related objects for meaningful testing. For example, testing Opportunities without the related Accounts and Contacts can make the sandbox data less useful for sales process validation.

Some objects are automatically included because Salesforce requires them for the selected data to work correctly. However, administrators should still review the final selected object list before saving the template. This helps avoid missing lookup data, incomplete test records, or reports that do not show expected values in the sandbox.

Applying a Salesforce Sandbox template while creating a sandbox

After the sandbox template is saved, it can be selected during sandbox creation or refresh for supported sandbox types. From Setup, open Sandboxes, choose to create a new sandbox, select the sandbox type, and then choose the required template when Salesforce asks for the data selection. For a Partial Copy sandbox, the template is the main control for selected production data. For a Full sandbox, the template is useful when the team wants to restrict the data copied into the environment.

Before creating or refreshing the sandbox, confirm that the org has an available sandbox license. If the sandbox option is not visible or the required type is unavailable, the organization may not have the required license or permission.

Salesforce Sandbox template example for UAT testing

Testing RequirementObjects to ConsiderReason
Sales process UATAccount, Contact, Opportunity, Product, Price Book, QuoteSupports lead-to-sale or opportunity testing.
Service process testingAccount, Contact, Case, Entitlement, Knowledge-related objectsSupports support case lifecycle testing.
Custom app testingRequired custom objects and lookup parent objectsKeeps custom records usable in the sandbox.
Training sandbox dataSmall set of business process objectsProvides sample data without copying unnecessary production records.

Best practices for Salesforce Sandbox template object selection

  • Select only the objects required for the testing or training scenario.
  • Include parent objects and required lookup objects when child records are selected.
  • Review sensitive data before copying records into any sandbox environment.
  • Use clear template names, such as UAT_Data_Template or Service_Test_Template.
  • Validate the sandbox after creation to confirm that important records and relationships are available.
  • Keep separate templates for different use cases when UAT, integration testing, and training need different data sets.

Common issues while creating Salesforce Sandbox templates

IssueLikely CauseWhat to Check
Sandbox template tab is not availableThe org may not have a supported sandbox type or required permissionsCheck sandbox licenses and Setup permissions.
Object data is missing after sandbox creationThe object was not selected in the templateReview the template and include the required object.
Child records are copied but not usefulRelated parent records may not have been copied as expectedReview object relationships and required lookups.
Partial Copy sandbox has fewer records than expectedPartial Copy sandboxes copy a sample of selected data within Salesforce limitsCheck object selection, data limits, and relationship behavior.
Full sandbox creation takes longer than expectedLarge data volume or broad object selectionUse a template to limit copied data when full production data is not required.

QA checklist for Salesforce Sandbox template configuration

  • Confirm that the sandbox template is being created for a Partial Copy or Full sandbox use case.
  • Verify that all objects required for the test scenario are selected.
  • Check whether parent objects, lookup objects, and master-detail related objects are included.
  • Review whether the selected data may contain sensitive or regulated information.
  • Confirm that the sandbox license is available before planning the refresh or creation.
  • Create or refresh the sandbox and validate sample records with the testing team.
  • Document the purpose of the template so future admins understand when to use it.

Frequently asked questions about Salesforce Sandbox templates

What is a sandbox template in Salesforce?

A sandbox template in Salesforce is a configuration that controls which object data is copied into a Partial Copy or Full sandbox. It helps administrators limit sandbox data to the objects required for testing, training, or UAT.

How do I create a Salesforce Sandbox template?

To create a Salesforce Sandbox template, go to Setup, open Sandboxes, choose the Sandbox Templates tab, click New Sandbox Template, enter the template name and description, select the required objects, and save the template.

Do Developer and Developer Pro sandboxes need sandbox templates?

No. Developer and Developer Pro sandboxes do not use sandbox templates. Sandbox templates are available for Partial Copy and Full sandboxes because those sandbox types can copy selected production data.

How do I create a free sandbox in Salesforce?

You can create a sandbox from Setup if your Salesforce org has an available sandbox license and your user has the required permissions. For learning purposes, a Salesforce Developer Edition org is often used, but sandbox availability depends on the org and license type.

How much does a Salesforce Full sandbox cost?

The cost of a Salesforce Full sandbox depends on the Salesforce edition, contract, and licensing agreement. Check with Salesforce or your account representative for current pricing instead of relying on a fixed public number.