Scratch Orgs

Development 🔴 Advanced
📖 3 min read

Definition

Scratch Orgs is a Setup page where administrators monitor and manage scratch orgs created from the Dev Hub. Scratch orgs are temporary, configurable Salesforce environments used for development and testing in the Salesforce DX workflow. The page shows active scratch orgs, their expiration dates, and which developers are using them.

Real-World Example

The development lead at OrbitTech opens Scratch Orgs in the Dev Hub and sees 15 active scratch orgs. She notices that 5 orgs expired yesterday and were automatically deleted, and 3 orgs are nearing their 30-day expiration. She contacts those developers to ensure they have pushed their changes to the Git repository before the orgs are reclaimed.

Why Scratch Orgs Matters

Scratch Orgs is a Setup page within the Dev Hub that provides administrators with a centralized management view of all active scratch orgs created across the organization. The page displays each scratch org's status, creation date, expiration date, the developer who created it, and the edition configured. This visibility is essential for Dev Hub administrators who need to monitor resource consumption, since each Dev Hub has a limited number of active scratch orgs allowed based on the Salesforce edition and licensing.

As development teams grow and adopt Salesforce DX workflows, the Scratch Orgs management page becomes critical for resource governance. A team of 20 developers, each potentially creating multiple scratch orgs for different feature branches, can quickly approach or exceed the org limit. Without monitoring, expired orgs accumulate and developers may find themselves unable to create new ones when needed. The management page also helps development leads ensure that developers push their work to version control before orgs expire, preventing code loss. Regular review of this page is a best practice for any organization serious about Salesforce DX adoption.

How Organizations Use Scratch Orgs

  • OrbitTech — The development lead at OrbitTech opens the Scratch Orgs page in the Dev Hub and sees 15 active scratch orgs. She notices 5 expired yesterday and were automatically reclaimed, while 3 are approaching their 30-day expiration. She contacts those developers to verify they have pushed all changes to Git before the orgs are deleted.
  • CloudForge Development — The DevOps manager at CloudForge reviews the Scratch Orgs page weekly as part of their resource governance process. He identifies that one developer has 4 active scratch orgs when the team standard is 2 per person, and works with the developer to clean up unused orgs to free capacity for the rest of the team.
  • Apex Innovations — Before a major release sprint at Apex Innovations, the team lead checks the Scratch Orgs page to ensure enough capacity exists for the 12 developers who will each need at least one new scratch org. She asks developers to delete any stale orgs from previous sprints, freeing up 8 slots for the upcoming work.

🧠 Test Your Knowledge

See something that could be improved?

Suggest an Edit