ServicesSalesforce consultingArchitectureImplementationOrg health checkDevelopmentIntegrations and APIsData migrationTesting and QAManaged supportSpecialist supportMarketing Cloud auditDeliverability
SolutionsMarketing Cloud EngagementMarketing Cloud NextSalesforce + BrazeAccount EngagementData Cloud (Data 360)Identity resolutionInsights and segmentsAgentforce and AIMCP integrationsSales and Service CloudReal-time personalisationIntegration solutionsEnterprise AI integrationBy industry
ArchitectureSalesforce CRMData 360Salesforce + BrazeAgentforceCustomer 360API-led integrationEvent-drivenMCP host, client and serverIdentity and consentMCP securityData governanceCI/CD and releasesOur public MCP server
ResourcesEngineering journalDecision guidesSolution blueprintsSalesforce productsProjects and achievementsSales ROI calculatorWhere we workChecklists and templatesPlanning toolsReadiness assessmentGlossaryAbout GeekMidstOur approachContact
CompanyAbout GeekMidstOur approachDelivery methodologyTrust and evidenceProjectsAchievementsBook a consultationContactWhere we workSecurity and data
Book a Consultation

Salesforce CI/CD and Release Management

A reference pipeline for Salesforce: source control, scratch orgs and sandboxes, tests, static analysis, deployment and rollback, plus Marketing Cloud and AI developer aids.

Banner for the GeekMidst reference architecture “Salesforce CI/CD and Release Management”, covering Business context and Tooling and naming as of…

A Salesforce CI/CD architecture turns changes into releases you can repeat: every change in source control, tested automatically, deployed the same way to each environment, and reversible when something goes wrong. Salesforce adds its own wrinkles, including metadata that does not deploy cleanly, three platform releases a year, and Marketing Cloud assets that follow a different path from the core platform. This page is a reference design; we validate the APIs, edition and permissions for each implementation.

Business context

Teams usually feel the need for CI/CD after a bad release: a change set missed a field, a flow was edited in production, or a hotfix overwrote someone else's work. The aim is not tooling for its own sake. It is a short, reliable path from an idea to production with evidence at each step, so releases become routine.

Tooling and naming as of October 2026

  • Salesforce CLI (sf v2) ships a stable release every Wednesday; the latest stable release is 2.155.7 (21 October 2026). The old sfdx (v7) receives no updates. Secrets are redacted from CLI output; the temporary SF_TEMP_SHOW_SECRETS workaround ends with the release candidate dated 28 October 2026, so use sf org auth show-* instead. api request rest/graphql needs Node.js 22 or later.
  • DevOps Center is labelled "Lifecycle Center (formerly DevOps Center)" in Salesforce's Winter '27 platform blog, which describes Coding Agent Governance and Deployment (policy enforcement, approvals and audit logs for agent-generated code) as GA. Trailhead and Help still say DevOps Center.
  • Testing: Flow Test Mode and mock outputs are Beta in Winter '27, and Apex @IntegrationTest is a Developer Preview.
  • Salesforce DX MCP Server (@salesforce/mcp) is an open-source developer aid that lets AI coding assistants work with orgs already authorised in the CLI. It was a Developer Preview in June 2025 and labelled Beta in the Spring '26 developer guide; current docs track maturity per tool (GA or NON-GA), and whole-server GA is not confirmed, so treat its status as not confirmed.

GeekMidst can design and implement this pipeline. See Salesforce DevOps and release management.

Salesforce CI/CD reference architecture

Reference architecture: a reusable pattern, not a live client integration

DEVELOPERSSOURCE AND DEVELOPMENT ORGSPIPELINEENVIRONMENTSDevelopers and adminsVS Code, Web Console, CLIAAI coding aidsSalesforce DX MCP ServerASource controlbranches and pull requestsAScratch orgs and dev sandboxesshort-lived environmentsBCI pipelinesf CLI, static analysis, testsADevOps CenterLifecycle Center in Winter '27BUAT and staging sandboxesrelease candidatesBProduction orgdeploy, monitor, roll backBMarketing Cloud Engagementseparate deployment pathBbuild and testassisted changespull requestsretrieve metadataPR triggerswork itemsvalidated deploypromoterelease deploysign-offMarketing Cloud stepshotfix back-merge
  • Salesforce product
  • AI and agents
  • Integration layer
  • People
  • AYour tooling
  • BSalesforce environments
  • Dashed: asynchronous, optional or feedback
Diagram source (Mermaid)

Select a component to see what it is responsible for and how data moves to and from it.

Reference architecture. Branching model, environments, test gates and tooling are confirmed per implementation.
Components and data flows (text version)
ComponentTypeResponsibility
Developers and adminsVS Code, Web Console, CLIPeopleMake changes in scratch orgs or developer sandboxes and commit them to source control. No direct edits in production.
AI coding aidsSalesforce DX MCP ServerAI and agentsLocal, open-source MCP server that works with CLI-authorised orgs. The --orgs flag is required; NON-GA tools need --allow-non-ga-tools. Status not confirmed.
Source controlbranches and pull requestsIntegration layerThe single source of truth for metadata and configuration. Every change arrives as a reviewed pull request.
Scratch orgs and dev sandboxesshort-lived environmentsSalesforce productIsolated places to build and test a change. Scratch orgs are created from source; sandboxes hold more realistic configuration.
CI pipelinesf CLI, static analysis, testsIntegration layerValidates every pull request: static analysis, Apex and Flow tests, and a check-only deployment to a test org.
DevOps CenterLifecycle Center in Winter '27Salesforce productSalesforce's own release tool for work items and promotion between environments; suits teams that prefer clicks to scripts.
UAT and staging sandboxesrelease candidatesSalesforce productBusiness testing on masked data, regression packs and release rehearsals during each Salesforce preview window.
Production orgdeploy, monitor, roll backSalesforce productReceives only pipeline deployments, in a release window, with a rollback plan for every release.
Marketing Cloud Engagementseparate deployment pathSalesforce productJourneys, automations, content and data extensions do not deploy through the core Metadata API; they follow their own process.

Data flows

  1. Developers and admins → Scratch orgs and dev sandboxes: build and test. Develop in an isolated org; recreate it from source when it drifts.
  2. AI coding aids → Scratch orgs and dev sandboxes: assisted changes. Point the DX MCP Server at scratch orgs or sandboxes only, never at production; review every change it proposes.
  3. Developers and admins → Source control: pull requests. Changes are committed on a branch and reviewed by a second person before merge.
  4. Scratch orgs and dev sandboxes → Source control: retrieve metadata. Changes made in an org are retrieved into source so nothing lives only in an org.
  5. Source control → CI pipeline: PR triggers. Each pull request starts validation; a failed check blocks the merge.
  6. Source control → DevOps Center: work items. DevOps Center works from your repository so both routes share one source of truth.
  7. CI pipeline → UAT and staging sandboxes: validated deploy. Deploys the merged release candidate to UAT. On failure the pipeline stops and reports the component.
  8. DevOps Center → UAT and staging sandboxes: promote. Promotion through the pipeline stages, with approvals.
  9. CI pipeline → Production org: release deploy. Deploys the same artefact tested in UAT, in an agreed window.
  10. UAT and staging sandboxes → Production org: sign-off. Business sign-off and a passed regression pack are required before release.
  11. CI pipeline → Marketing Cloud Engagement: Marketing Cloud steps. Scripted or manual steps for Marketing Cloud assets, checked against a release checklist.
  12. Production org → Source control: hotfix back-merge. Emergency fixes are made in source and merged back, so the next release does not undo them.

Component responsibilities

ComponentResponsible forGate
Source controlHistory, review and branchingPull request approved
Scratch orgs and sandboxesIsolated build and testChange works in isolation
Static analysisCode quality and security rules for Apex and LWCNo new high-severity findings
Automated testsApex tests, Flow tests and agent tests where usedAgreed pass rate and coverage
CI pipelineValidation and repeatable deploymentCheck-only deploy passes
DevOps CenterClick-based promotion for adminsApprovals recorded
UATBusiness and regression testingSign-off
ProductionRunning the releaseSmoke tests pass

Data flow, step by step

  1. A developer creates a scratch org from source and builds the change.
  2. The change is retrieved into a branch and a pull request is opened.
  3. CI runs static analysis, Apex and Flow tests and a check-only deployment.
  4. After review and merge, the pipeline deploys the release candidate to UAT for business testing.
  5. In the release window, the same artefact is deployed to production and smoke-tested.
  6. Marketing Cloud steps run from the release checklist, and the release is tagged in source control.

Trust boundaries and authentication

The pipeline authenticates to each org as a dedicated deployment user with only the permissions it needs. Salesforce has said connected apps support ends in Summer '27, so set up pipeline authentication on External Client Apps, and note that refresh tokens expire after 30 days of inactivity from 4 November 2026 in production, which affects jobs that run rarely. Keep credentials in the CI system's secrets store. AI aids such as the DX MCP Server use orgs already authorised on the developer's machine, so limit them with the --orgs flag to development orgs; its write tools include deploy_metadata and assign_permission_set, which need human review.

Failure scenarios and how to handle them

ScenarioEffectHandling
Deployment fails midwayRelease blockedValidate ahead of the window and confirm your deployment settings roll back on error
Bad change reaches productionBroken processRedeploy the previous tagged version, or switch the feature off with a custom metadata flag
Data damaged by a releaseLost or wrong recordsBack up before release; Backup and Recover is a Guardian add-on
Salesforce release changes behaviourTests fail after upgradeRun regression packs in preview sandboxes
Old API versions in metadataFuture deployment errorsAPI versions 31.0 to 40.0 are deprecated in Summer '27 and retired in Summer '28; update them
Marketing Cloud SQL activity keeps failingAutomation stopsSQL Query activities deactivate after 24 consecutive failures; monitor and alert

Marketing Cloud deployment considerations

Marketing Cloud Engagement assets, such as journeys, automations, Content Builder assets, data extensions and CloudPages, follow a separate path from core metadata. Keep their code (AMPscript, SSJS and SQL) in source control, document the configuration steps, and test in a separate business unit or account where available before production. The Marketing Cloud Engagement MCP Server, GA since 2 June 2026, creates journeys in Draft and annotates destructive tools, which can help with repetitive set-up, but changes still need review. Marketing Cloud Next runs on the core platform, so more of its configuration can follow the core pipeline; check each component. See testing and deploying Marketing Cloud Next solutions.

Operational monitoring

Track deployment frequency, failure rate, time to restore and test pass rate. After each release, watch error logs, flow failures and integration error rates for 24 hours. Custom Salesforce Hosted MCP Server definitions are deployable metadata too, so include them in the same pipeline if you use them.

Alternative approaches and trade-offs

  • Change sets. No set-up, but no version control, no automated pipeline checks and no rollback. Compare options in change sets, SFDX and DevOps Center.
  • DevOps Center only. Good for admin-heavy teams; add CI for automated checks as the codebase grows.
  • Third-party DevOps platforms. Rich features at extra cost; check fit with your branching model.

Implementation checklist

  1. 01

    Put everything in source control

    Metadata, Marketing Cloud code and configuration notes.

  2. 02

    Choose a branching model

    Keep it simple enough for admins to follow.

  3. 03

    Set up environments

    Scratch orgs or sandboxes per developer, plus UAT and staging.

  4. 04

    Automate checks

    Static analysis, Apex and Flow tests and check-only deployments on every pull request.

  5. 05

    Secure pipeline access

    Dedicated deployment users, External Client Apps and stored secrets.

  6. 06

    Plan rollback

    Tagged releases, feature flags and backups before each release.

  7. 07

    Rehearse with each Salesforce release

    Run regression packs in preview sandboxes.

Questions we hear

Is DevOps Center now called Lifecycle Center?
Salesforce's Winter '27 platform blog uses "Lifecycle Center (formerly DevOps Center)", while Trailhead and Help still say DevOps Center. Expect both names for a while.
Is the Salesforce DX MCP Server generally available?
Not confirmed. It was a Developer Preview in 2025 and labelled Beta in the Spring '26 guide; current docs mark maturity per tool, and we found no GA announcement.
Can we roll back a Salesforce deployment?
Not with one click. Redeploy the previous tagged version, use feature flags, and back up data before releases.
Do Marketing Cloud Engagement assets fit the same pipeline?
Partly. Keep their code in source control, but journeys, automations and content follow their own deployment steps.

Sources

  • https://www.salesforce.com/blog/platform-winter-27-release/
  • https://raw.githubusercontent.com/forcedotcom/cli/main/releasenotes/README.md
  • https://github.com/salesforcecli/mcp
  • https://developer.salesforce.com/docs/atlas.en-us.264.0.sfdx_dev.meta/sfdx_dev/sfdx_dev_mcp_server.htm
  • https://developer.salesforce.com/blogs/2026/10/developers-guide-to-the-winter-27-release
  • https://developer.salesforce.com/blogs/2026/06/the-mcp-server-for-marketing-cloud-engagement-is-now-ga

Make releases routine

We can design your pipeline, environments, test gates and rollback plan, including Marketing Cloud steps. Consultations are remote, from India.

Book a consultation →

Tell us what you are trying to fix.

Share your Salesforce setup, goals and constraints. A practitioner reads every message and replies with questions, first thoughts or an honest view of whether you need outside help at all.

Talk to a Salesforce Expert
Book a Consultation