Deployment & DevOps in Salesforce
What Is Deployment & DevOps?
Short Description
Deployment is how you move Salesforce changes between orgs.
DevOps is the discipline that makes deployments safe, repeatable, and automated.
Simple Explanation
Deployment is moving the package.
DevOps is the system that moves it safely every time.
Gist (Quick Revision)
Good DevOps prevents broken releases and late-night production fixes.
1. Change Sets
What Are Change Sets?
Change Sets are Salesforce’s built-in deployment tool for moving metadata between related orgs (e.g., Sandbox → Production).
When to Use Change Sets
-
Small teams
-
Simple deployments
-
Admin-heavy orgs
Real-Life Example
Packing selected items into a box and sending it to another location.
Change Set Flow
-
Create outbound change set (Sandbox)
-
Add components (Apex, Objects, Flows)
-
Upload to Production
-
Validate and deploy
Pros & Cons
Pros
-
Easy to use
-
No coding required
Cons
-
Manual
-
Error-prone
-
No version history
Gist (Quick Revision)
Change Sets are simple but limited—best for small deployments.
2. Metadata API
What Is the Metadata API?
The Metadata API allows you to deploy Salesforce components programmatically or via tools.
Simple Explanation
Metadata API is the engine behind all advanced deployments.
Real-Life Example
Instead of packing boxes manually, you use a shipping system.
Common Tools Using Metadata API
-
Salesforce CLI (SFDX)
-
VS Code
-
CI/CD pipelines
Example (Conceptual)
sfdx force:source:deploy -p force-app
Gist (Quick Revision)
Metadata API enables automation and large-scale deployments.
3. CI/CD Basics (Continuous Integration & Deployment)
What Is CI/CD?
CI/CD automates testing and deployment every time code changes.
Simple Explanation
CI/CD is like an automatic quality gate for your code.
Typical CI/CD Flow
-
Developer pushes code
-
Tests run automatically
-
Code is validated
-
Deployment happens
Real-Life Example
Airport security checks every bag before boarding—automatically.
Benefits
-
Fewer deployment errors
-
Faster releases
-
Better collaboration
Gist (Quick Revision)
CI/CD reduces risk by automating testing and deployment.
4. Git & Source-Driven Development
What Is Source-Driven Development?
Source-driven development treats code as the source of truth, not orgs.
Simple Explanation
Git is the single truth, Salesforce orgs are just destinations.
Why Git Matters
-
Version control
-
Rollback capability
-
Team collaboration
Common Git Actions
-
commit→ save changes -
branch→ work safely -
merge→ combine work
Salesforce + Git Workflow
-
Pull metadata to local project
-
Commit to Git
-
Push to repository
-
Deploy via pipeline
Gist (Quick Revision)
Git enables safe teamwork and controlled Salesforce releases.
? Career Coach Advice (Interview-Ready)
Interviewers often ask:
-
Change Sets vs CI/CD
-
Why Git is important
-
How deployments are handled in teams
Strong interview answer:
“I prefer source-driven development using Git and CI/CD pipelines, while using Change Sets only for small or admin-driven deployments.”
That response shows modern Salesforce DevOps maturity.
✅ Final Takeaway
Modern Salesforce teams do not deploy manually.
Automation + Git + CI/CD = reliable Salesforce delivery
