Blue Canvas
Salesforce MetadataCPQ DataProfiles & Permissions
Plans
Version ControlMetadata BackupSandbox Compare & DeployMerge Conflict ResolutionField Dependency ResolutionIntegrations
For Salesforce AdminsFor Apex DevelopersFor Security & ComplianceFor Large Enterprises
Academic OperationsBook a demoBlogDocumentationCustomer StoriesAgency DirectoryToolsSOC 2 Certified
EN|ESContact usLoginGet Started
Salesforce DevOps

Salesforce DX and Scratch Orgs

Salesforce DX promises to make Continuous Integration easier with Scratch Orgs.

Randalyn Hill-CofferBy Randalyn Hill-Coffer·Reviewed by the Blue Canvas team·December 4, 2024·4 min read
In this article
  • SO WHAT ARE SCRATCH ORGS?
  • OUR HOPES FOR SCRATCH ORG USE

One of the coolest concepts to come out of Salesforce DX is the Scratch Org. According to Salesforce:

Salesforce DX introduces a new type of Salesforce environment, the scratch org, a source-driven and disposable deployment of Salesforce code and metadata. Scratch orgs are fully configurable, allowing developers to emulate different editions with different features and preferences, playing a critical role in driving developer productivity and collaboration during the development process. They can also be used as part of automated testing and the implementation of a full continuous integration suite.

Setting up appropriate development environments for Salesforce can be a major challenge. Full copy sandboxes can take days to provision and even simpler partial copy sandboxes can take a long time to set up. Worse, there’s no way to spin up a sandbox environment programmatically which is key to any Continuous Integration setup. Even if you could programmatically spin up a development environment or sandbox in Salesforce, how do you load data onto that environment? Suffice to say, Salesforce has historically made it difficult to set up clean environments for testing and development.

Meanwhile, a revolution has been happening in software development and it’s called Docker. With Docker, you can quickly spin up small virtual containers (as opposed to slow and cumbersome full virtual machines) that are perfect for CI. Of course, you can’t use Docker with Salesforce in this way, but the promise of Scratch Orgs is that you could do something very similar to Docker for the Salesforce environment.

SO WHAT ARE SCRATCH ORGS?

Scratch Orgs are designed to make source driven development and CI on the Salesforce platform more similar to the type of CI experience you might have building with Node, Rails or Django using Docker. They are meant to be temporary rather than long lasting. Spin them up quickly and throw them away just as quickly. Get into a bad state on your Org? Throw it away and create a new one. Salesforce is talking about imposing some kind of limits on how long you can keep a Scratch Org though I don’t think they’ve decided yet. We’ve heard anywhere from a day to two weeks.

A key tenet of Scratch Orgs is that you can spin them up quickly. Blue Canvas is fortunate enough to be a part of the Salesforce DX developer preview. In our experience so far, we have consistently been able to spin up Scratch Orgs quickly. This is a major improvement over how long it takes to spin up other Orgs on Salesforce.

Scratch Orgs can be created via the Command Line Interface (CLI). This is nice because it makes it possible to easily integrate them into a CI pipeline using Jenkins or Bamboo.

Salesforce DX is also promising to make it easier to upload data to your Scratch Orgs. Now you won’t be able to upload all of your application data to a Scratch Org, but you can create scripts to automatically populate data so that you don’t have to manually do this every time you spin up a new environment. This is another key step in the direction of enabling CI.

OUR HOPES FOR SCRATCH ORG USE

How do we envision leveraging Scratch Orgs? Let’s say you have a feature that you want to build. First you open up a feature branch in Git. Next you can use the Salesforce CLI (an update for which is coming with DX apparently) to spin up a Scratch Org in just a minute or so. You start coding your new feature and testing it manually against the temporary Org. Add a few Apex Classes, a Visualforce page or two and voila: you’re happy with it.

Next, you commit that new code into your feature branch and merge it to master. Typically your CI server (whether it’s Jenkins, Bamboo, TeamCity or whatever) will kick off a build. You would have already written a build step into your CI job that would use the CLI to spin up another Scratch Org. Once this is created you can use an Ant script to deploy your new code to that Org. You can use the data loading feature in Salesforce DX to populate any test data that you need.

Now you can run your tests. If they pass, you can use your Ant script to deploy your changes to your UAT environment. Or something like that.

A lot of unanswered questions remain about Scratch Orgs and Salesforce DX, but they are very promising. As Salesforce continues to unveil new information we’ll update this post. Scratch Orgs are definitely a step towards making Salesforce a first class development environment. We look forward to playing with it next summer!

Comments

Leave a comment

Newsletter
Salesforce DevOps tips in your inbox

New posts, releases and practical guides. No spam, unsubscribe anytime.

TABLE OF CONTENTS
  • SO WHAT ARE SCRATCH ORGS?
  • OUR HOPES FOR SCRATCH ORG USE
You may like
Trending on Blue Canvas
Talk through your Salesforce setup

Get a focused walkthrough or a tailored quote

Book a consultationRequest a quote
Customer stories
Real teams, real results
Sysco
Sysco
Left Jenkins behind and cut deployments from hours to minutes
Twilio
Twilio
Saved 2–3 days each sprint while scaling the team quickly
Catalyst Consulting
Catalyst Consulting
The City of Chicago saves hours every day with code reviews and structured rollouts
You might also like our other posts...
Read more
Salesforce DevOps
Kenji Sano | October 6, 2026
The 8 Best Salesforce Deployment Tools in 2026

Compare the top 8 tools side by side — and see which one fits your team.

Read more
Architecture and Resources
Randalyn Hill-Coffer | October 5, 2026
Top 19 Academic Operations Tools for Salesforce-Run Higher Ed Campuses in 2027

Compare 19 academic operations and adjacent higher ed tools for Salesforce-run campuses in 2027. See what runs on Salesforce, what connects through your SIS, and where you may need an integration.

Read more
Salesforce AI
Randalyn Hill-Coffer | October 2, 2026
Claudeforce vs. Agentforce: They’re not rivals. Here’s the difference.

Claudeforce and Agentforce sound like competing products. They aren’t. Learn what each one does, where they overlap, and which one your team needs.

Blue Canvas

Salesforce DevOps for teams. Git-based version control, metadata backups, and continuous deployment.

(786) 591-0702

SOC 2 certifiedSalesforce PartnerSalesforce AppExchange

Salesforce Deployment

  • Deployment Tools
  • For Salesforce Metadata
  • For CPQ Data

Product

  • Features
  • Security
  • Customer stories
  • Pricing

Resources

  • Docs
  • Blog
  • Academic Operations
  • Anthropic x Salesforce Poll
  • Partners
  • Integrations
  • Release Management

Company

  • About us
  • Contact us
  • Careers
  • X (Twitter)
  • LinkedIn
  • GitHub
Stay Updated
Product Updates

Get the latest features, releases, and technical deep-dives delivered straight to your inbox.

Secure & Private

·

No spam, unsubscribe anytime

© 2026 Blue Canvas. All rights reserved.

Privacy policyTerms of usage