Try Serpent Free
← Salesforce DevOps Glossary

Scratch Org

A temporary, source-driven Salesforce environment created on demand and discarded when its work is done.

Definition

A scratch org is a temporary, source-driven Salesforce environment, defined by a scratch org definition file and created on demand from a Dev Hub, that exists purely to build and test metadata before it's discarded (default lifespan is 7 days, extendable up to 30).

Because a scratch org is created fresh from source and a chosen edition or feature set, it's ideal for isolated development and CI test runs; nothing carries over between orgs except what's explicitly pushed from version control. This makes scratch orgs fast to reset but slow to spin up when a Dev Hub is under load, and teams often hit daily org creation limits during busy sprints.

Data has to be loaded manually or through a seeding step, since scratch orgs start essentially empty. Our Salesforce DevOps guide covers where scratch orgs fit in a typical Salesforce release process.

In practice

How it works in Serpent

Serpent pools pre-warmed scratch orgs so developers get a ready environment in seconds instead of waiting on Dev Hub provisioning, and manages org creation limits across the team automatically. Org definitions, data seeding, and metadata push happen as part of task setup, so a new scratch org is usable immediately rather than empty. Serpent also manages sandboxes alongside scratch orgs from the same dashboard, so teams aren't juggling separate tooling for each org type. See org and scratch org management in Serpent for details.

Scratch org management in Serpent
Common questions

Scratch Org, answered

How fast can a developer get a scratch org in Serpent?
Seconds, not minutes. Serpent keeps a pool of pre-warmed scratch orgs ready, instead of provisioning one from scratch on request.
How long does a Salesforce scratch org last before it expires?
7 days by default, extendable up to 30 days. After that it's automatically deleted, and any local changes that weren't pushed to version control are gone.
Why does my scratch org come back empty every time?
Scratch orgs never inherit production or sandbox data automatically. Metadata comes from what's pushed from source, and data has to be seeded separately, either manually or through an automated seeding step.

Start free. No credit card, no install, no commitment.

Set up in under 15 minutes. No DevOps hire needed.

Curious about faster shipping before you dive in? Let's talk

Commitment free!