Tech, ExplainedCloud platforms and developer tools
Part

Salesforce DevOps

Pipelines for code written inside Salesforce.

INSIDE: CI/CD PIPELINEHOW IT WORKS · A SECOND APPROVAL FOR LOANS ABOVE ₹75 LAKHA developerwrites therule in Apex,in a sandboxThe toolcollects the 14changed piecesof metadataThe scannerflags oneunsafe query,and it is fixedTests cover 82%of the code;Salesforceneeds 75%The changes aredeployed toproduction onFriday eveningA daily backupkeeps the dataand metadatafor restoreALSO TALKS TOCustomer relationship management (CRM)↗ B2B SALESINSIDE: CI/CD PIPELINEHOW IT WORKS · A SECOND APPROVAL FOR LOANS ABOVE₹75 LAKHA developer writesthe rule in Apex,in a sandboxThe tool collectsthe 14 changedpieces of metadataThe scanner flagsone unsafe query,and it is fixedTests cover 82%of the code;Salesforce needs 75%The changes aredeployed to productionon Friday eveningA daily backupkeeps the data andmetadata for restoreALSO TALKS TOCustomer relationship management (CRM)↗ B2B SALESINSIDE: CI/CD PIPELINE · A SECOND APPROVAL FORLOANS ABOVE ₹75 LAKHA developer writes therule in Apex, in a sandbox↓The tool collects the 14 changed piecesof metadata↓The scanner flags one unsafe query, andit is fixed↓Tests cover 82% of the code; Salesforceneeds 75%↓The changes are deployed to production onFriday evening↓A daily backup keeps the data andmetadata for restoreALSO TALKS TOCustomer relationship management (CRM)↗ B2B SALES
Fourteen changes for a second-approval rule move from the sandbox through scanning and tests with 82% coverage into the live Salesforce, with a daily backup.
opens a page inside this one a page in the same scene a page in another scene a concept page a label only, with no page

Salesforce DevOps is the set of tools that builds, scans, tests, releases and backs up the custom code that companies write inside Salesforce. Salesforce is a large customer relationship management (CRM) system, rented over the internet, in which sales and service teams keep their customers and deals. Companies adapt it to their own business, and those changes need the same care as any other code.

What gets changed? An administrator adds custom fields and screens. Developers write code in Apex, Salesforce's own programming language, and build automatic steps called flows. In Salesforce, all these changes are called metadata. They are made in a sandbox, a copy of the company's Salesforce kept for development and testing. The changes must then be moved to production, the live Salesforce that staff use every day.

Moving them by hand is slow and easy to get wrong. An administrator has to remember every field and every screen that was changed. If one is missed, the release breaks. Salesforce DevOps tools turn this into a CI/CD pipeline. They compare the sandbox with production and list every difference. They store the changes in a code repository, scan the Apex code for security and quality problems, run the tests and deploy.

Consider a home-loan company in Mumbai. Its loan officers use Salesforce to track each application. The company wants a new rule: any loan above ₹75 lakh needs a second approval. A developer writes the rule in Apex, adds a field called "Second approver", and changes two screens. Together, that is 14 pieces of metadata. The tool collects all 14 from the sandbox. Its scanner flags one database query that could show a loan officer other branches' records, and the developer fixes it. Salesforce itself requires automated tests to cover at least 75% of the Apex code before it can be deployed to production. Here the tests cover 82%, so the deployment goes ahead on Friday evening, when no staff are working in the system.

The tools also back up the company's Salesforce data and metadata every day. If a release or a mistaken bulk update deletes records, they can be restored from the backup. Salesforce protects the data against failures of its own systems, but the customer is responsible for its own mistakes. This division is called the shared responsibility model.

Other large rented systems have the same need. Companies that customise enterprise resource planning (ERP) software must test their changes again at every vendor update, using ERP and packaged app testing.

Tech, Explained is a part of ingrid.fyi. Every page explains one piece of technology in plain words.