Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
DictionarySSandbox Templates
AdministrationAdvanced

Sandbox Templates

Sandbox Templates define which object data is copied from production when creating or refreshing a Partial Copy Sandbox.

§ 01

Definition

Sandbox Templates define which object data is copied from production when creating or refreshing a Partial Copy Sandbox. Administrators select up to 10,000 records per object and choose specific objects to include, allowing teams to create focused test datasets that are smaller than a full copy but still representative of real data patterns.

§ 02

In plain English

👋 Study buddy

Sandbox Templates define which object data gets copied from production when creating a Partial Copy Sandbox. Admins select up to 10,000 records per object and choose specific objects to include, so the sandbox gets meaningful test data without copying everything.

§ 03

Worked example

scenario · real-world use

Glenfield Software's QA team needs a Partial Copy Sandbox seeded with realistic-but-bounded production data for their test cases. Their admin creates a Sandbox Template specifying which objects to include (Account, Contact, Opportunity, Case, Custom_Order__c) and how many records per object (5,000 per object, capped). When the Partial Copy Sandbox is provisioned (or refreshed), the platform copies metadata fully and selectively copies the data per the template - the QA team gets representative test data without the storage cost of a Full Sandbox. Sandbox Templates make Partial Copy Sandboxes useful for focused testing scenarios.

§ 04

Why Sandbox Templates matters

Sandbox Templates define which object data is copied from production when creating or refreshing a Partial Copy Sandbox. Administrators select up to 10,000 records per object and choose specific objects to include, so the sandbox gets meaningful test data without copying the full production dataset. Templates are applied during sandbox creation or refresh.

Designing good sandbox templates is important for getting useful test environments. Templates that capture representative data produce sandboxes where testing is meaningful; templates that miss important objects or relationships produce sandboxes where testing doesn't match production behavior. Mature DevOps practices invest in template design, ensuring templates capture the data relationships needed for realistic testing.

§ 05

How to set up Sandbox Templates

Sandbox Templates define which objects' data gets copied from production when refreshing a Partial Copy Sandbox — "copy Account, Contact, Opportunity but skip Cases." Lets teams build focused test datasets smaller than a Full Copy Sandbox but still representative. Only applies to Partial Copy and Full Copy Sandboxes; Developer / Developer Pro Sandboxes have no data anyway.

  1. Open Setup → Sandboxes (in Production)

    Sandbox Templates are managed from Production, not from inside a sandbox.

  2. Scroll to Sandbox Templates → New

    Setup → Sandboxes → Templates tab → New.

  3. Set Template Name and Description

    Convention: per-purpose ("Sales Test - Recent Opps").

  4. Pick objects to include

    Multi-select object list. For each picked object, you can set criteria limiting which records copy (max 10,000 records per object).

  5. Set Per-Object Criteria (optional)

    Filter expressions narrow what copies. "Only Opportunities created in the last 90 days," "Only Accounts in the West region."

  6. Save

    Template is ready. Use it next time you create / refresh a Partial Copy Sandbox.

  7. When refreshing a Partial Copy Sandbox: pick this template

    Setup → Sandboxes → Edit on a Partial Copy → Pick Template → save.

Key options
Object Selectionremember

Multi-pick from objects with data.

Per-Object Criteriaremember

Filter to limit which records copy.

Max records per objectremember

10,000 hard cap. Larger needs Full Copy Sandbox.

Gotchas
  • 10,000 records per object is the hard cap for Partial Copy. If you need more representative data, use Full Copy Sandbox (longer refresh, higher storage).
  • Templates apply at refresh time, not creation time of the sandbox. Existing sandboxes don't auto-update when templates change — refresh to pick up new criteria.
  • Criteria expressions don't validate at template save. A bad SOQL filter blocks the refresh — test with a sandbox you don't mind losing first.
§ 06

How organizations use Sandbox Templates

Quantum Labs

Designed sandbox templates to capture representative data across their data model for realistic testing.

TerraForm Tech

Maintains templates that include critical object relationships for meaningful test scenarios.

NovaScale

Reviews sandbox templates periodically to ensure they reflect current data model needs.

§

Trust & references

Official documentation

Straight from the source - Salesforce's reference material on Sandbox Templates.

Was this entry helpful?
Help us write better definitions. Quick reactions or detailed edit suggestions.
§

🧠 Test your knowledge

Q1. What are Sandbox Templates?

Q2. How many records per object?

Q3. Why design templates carefully?

§

Discussion

Loading…

Loading discussion…