« Salesforce APIs and What They Are For... | Main | Salesforce Sharing Model Visualized »

Salesforce DX - Scratch Orgs vs Sandboxes

Most of us on the Salesforce platform are well aware of Sandboxes but I'm starting to get more and more questions on "Scratch Orgs". More specifically, what is the difference between a Sandbox and a Scratch Org and when to use one over the other. 

Let's start with a simple statement - Scratch Orgs are NOT meant to replace Sandboxes but rather be used in conjunction with.

The scratch org is a source-driven and disposable deployment of Salesforce code and metadata. Scratch Orgs are driven by source, Sandboxes are copies of production.

Scratch orgs do not replace sandboxes. Scratch orgs are not permanent and they don't include any production data. 

Scratch orgs complement Sandboxes. They are great for temporary deployments. We typically use them for peer review and a way to get enhanced test coverage and automation.

Sandboxes are still critical for staging, performance testing, licensing etc.


  • You can have up to 25 active scratch orgs
  • They automatically get deleted after 7 days
  • You can create up to 50/day per Dev Hub

Key Benefits

  • Increased Developer productivity
  • Better and easier Team Collaboration
  • DevOps Automation (my favorite)


PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
All HTML will be escaped. Hyperlinks will be created for URLs automatically.