Resources /
Blog

Difference Between Sandbox and Production in Salesforce

Submit your details to get a book

6
Min Read
Resources /
Blog

Difference Between Sandbox and Production in Salesforce

Download

Submit your details to get a book

6
Min Read
Glass sandbox cube on a pillar linked to database tiles, illustrating the difference between Salesforce sandbox and production
Glass sandbox cube on a pillar linked to database tiles, illustrating the difference between Salesforce sandbox and production

The difference between sandbox and production in Salesforce is that production is the live org your users and customers work in, while a sandbox is an isolated copy of it where admins and developers build and test before anything reaches production. Production is where your sales team closes deals at 4:59 on the last day of the quarter.

This guide is for admins, developers and release managers who need to be clear on the difference between sandbox and production in Salesforce.

Let's cover what a sandbox copies from production, how the four sandbox types compare, and the path a change should take before it reaches production.

What is the difference between production and sandbox in Salesforce?

Production has the real customers, the real data and the people who'll notice a mistake by lunchtime. A sandbox holds the production org's metadata plus some or all of its data, and nothing you do there affects production until it's deployed.

AreaProductionSandbox
PurposeRunning the businessBuilding and testing new features, training and staging
DataLive recordsMetadata always; data depends on the sandbox type
Effect of an editUsers see it right awayNothing reaches production until it's deployed
RefreshDoesn't applyRefreshing replaces everything in the sandbox and gives it a new org ID
Audit historySetup Audit Trail keeps 180 daysAudit trail starts fresh when the sandbox is created
Performance and load testingUse a Full sandboxSupported in the Full type only

Production's Setup Audit Trail keeps 180 days of configuration history, but a sandbox's trail starts fresh the day it's created. So a sandbox on its own can't prove to an auditor how a change made its way into production.

Why not make changes directly in the production environment?

Edit something in production and every user gets it at once, errors and all. Say a validation rule blocks a valid save, or a flow emails the wrong customers: that lands untested on live users.

Same with a sharing update that exposes records. Test changes in a sandbox first and those problems show up where they cost nothing.

You also get a trail of what changed, who approved it and when it moved. That's the record auditors ask for under SOX, HIPAA and similar frameworks.

What do the types of sandboxes copy from production?

Salesforce has four sandbox types, and they differ in how much of production they bring with them.

This table shows what each takes, how much data it holds and how often it can be refreshed, with production as the reference point.

EnvironmentWhat it copies from productionData storageRefresh interval
ProductionNot a copy: the live orgYour edition's allocationDoesn't apply
DeveloperMetadata only200 MB (400 MB with storage upgrade)1 day
Developer ProMetadata only1 GB (2 GB with storage upgrade)1 day
Partial CopyMetadata plus a sample of data set by a required template5 GB5 days
FullMetadata plus all production dataSame as production29 days

Those figures come from Salesforce Help's sandbox storage limits page. A Partial Copy sandbox copies up to 10,000 records per object selected in its template.

If you're torn between the four, our guide to sandbox types walks through the choice. Our post on Partial Copy sandboxes covers how they lower release risk.

Only a Full sandbox mirrors production's data volume, which is why Salesforce supports it for performance testing, load testing and staging. The catch: it refreshes every 29 days, so drift starts right away.

People sometimes lump scratch orgs in with sandboxes, but they aren't copies of production at all. When each one fits is in our comparison of scratch orgs and sandboxes.

How does a change move from a developer sandbox to production?

A change should climb through the sandbox environments one at a time, and each step catches a different kind of problem. The full checklist is in our deployment guide.

  1. Build in a Developer or Developer Pro sandbox, ideally one per developer, so work stays isolated until it's shared.
  2. Test in a Partial Copy sandbox against a realistic slice of data, including the integrations the change touches.
  3. Run user acceptance testing (UAT) and regression testing in a Full sandbox, where production-scale volume and performance issues show up.
  4. Record who approved the release and when, before it goes anywhere near your users.
  5. Run a validation-only deployment against production, which checks the package and runs the required Apex tests without committing anything.
  6. Deploy in the agreed window with a rollback plan ready, then smoke test real records and integrations.
  7. Refresh or sync the lower sandboxes so the next round of work starts from what production now looks like.

For a small configuration change, steps 1 to 3 can collapse into one sandbox. Don't skip the validation-only deployment, though; it's the cheapest check in the development process.

Which tools move changes from sandbox to production?

Change sets are Salesforce's built-in option. They start with a deployment connection authorized on both orgs; you upload an outbound change set from the sandbox, then validate and deploy it in production.

They only work between orgs affiliated with the same production org, with no version history and no rollback. Deleting or renaming components isn't possible either, and there's a 10,000-file cap.

Inbound change sets also deploy as a whole. One failing component and the whole release goes back for another upload.

The Salesforce CLI with version control is the source-driven route. It suits developer-led teams that are comfortable with scripting.

Salesforce's own click-based option is Lifecycle Center (formerly DevOps Center), which tracks metadata changes in Git and promotes them through your pipeline.

DevOps platforms add approvals, automated tests, rollback and an audit trail across every environment.

Our deployment guide's tools table lists them for parallel development across three or more environments. They also suit teams releasing under SOX or similar controls.

What are the risks of production data in Salesforce sandboxes?

In Partial Copy and Full sandbox environments, you're working with real records. That includes personal and regulated data, and since sandboxes typically lack the monitoring depth production gets, those copies need the same security.

Salesforce's masking tools (Data Mask, and the newer Data Mask and Seed, in beta) don't mask a sandbox on their own; you run masking after each refresh. The methods are in our data masking guide.

Refreshing wipes test data and in-progress work. The new org ID also breaks old references, which is where Sandbox seeding and keeping your Salesforce sandboxes in sync through your pipeline save you rebuilding by hand.

Where does Flosum fit?

Flosum Sandbox Management sets up new Developer sandboxes with production data seeded, sensitive data masked, flows disabled and access locked down.

Flosum says Sandbox Management keeps your Full sandbox in sync with production between Salesforce's 29-day refreshes. It also reconnects each new sandbox to your Flosum pipeline.

The Flosum DevOps Cloud App checks every change against your org's dependency graph before deploying and offers one-click rollback. Flosum DevOps runs in Flosum's cloud or in your own cloud.

FAQs

What is the difference between a sandbox and production in Salesforce?

Production is the live org your users work in, with real data. A sandbox copies its metadata and some or all of its data, so you can test changes without affecting production.

Do changes in a sandbox affect production?

No. Nothing you build in a sandbox reaches production until you deploy it, whether through a change set, the Metadata API, Lifecycle Center or a DevOps platform.

Does a sandbox include production data?

Developer and Developer Pro sandboxes copy metadata only. Partial Copy adds a template-defined data sample and Full copies all data, per our sandbox types guide.

How often can you refresh a sandbox from production?

Daily for Developer and Developer Pro, every 5 days for Partial Copy and every 29 days for Full. Each refresh overwrites the sandbox and gives it a new org ID.

How do you deploy from sandbox to production?

Move the change through your sandboxes, run a validation-only deployment against production, then deploy with a rollback plan ready. Each step is in our deployment guide.

Is sandbox data secure?

Only if you treat it like production. Partial Copy and Full sandboxes hold real records, so mask sensitive data after every refresh and limit who can log in.

Book a demo to see how the Cloud App moves changes from sandbox to production with approvals and rollback.

Table Of Contents
Author
Stay Up-to-Date
Get flosum.com news in your inbox.

Thank you for subscribing

Ship Salesforce changes faster
Teams on Flosum report 40% higher development velocity and 75%
fewer merge conflicts.
Free to start  |  No credit card required