<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[OrgFlow - Medium]]></title>
        <description><![CDATA[The team behind OrgFlow writes about Salesforce DevOps, and about using new tools to open the Salesforce platform up to modern industry-standard software development, version control, deployment and automation techniques. - Medium]]></description>
        <link>https://medium.com/orgflow?source=rss----d41bd1dc72bc---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>OrgFlow - Medium</title>
            <link>https://medium.com/orgflow?source=rss----d41bd1dc72bc---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 06:31:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/orgflow" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What True Git-Based DevOps Brings to Salesforce]]></title>
            <link>https://medium.com/orgflow/what-true-git-based-devops-brings-to-salesforce-0fe143f22be7?source=rss----d41bd1dc72bc---4</link>
            <guid isPermaLink="false">https://medium.com/p/0fe143f22be7</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Daniel Rosenberg]]></dc:creator>
            <pubDate>Thu, 10 Jul 2025 11:48:19 GMT</pubDate>
            <atom:updated>2025-07-10T12:07:38.213Z</atom:updated>
            <content:encoded><![CDATA[<p>OrgFlow proudly calls itself “true Git-based DevOps for Salesforce,” and that’s not just a catchy tagline — it’s a core design principle.</p><p>Unlike other Salesforce DevOps tools that treat Git as an optional add-on, OrgFlow makes Git <strong>a required, first-class component</strong> of your workflow. Every change to your Salesforce metadata is captured and managed through Git. By putting Git at the center of all metadata operations, OrgFlow unlocks a host of benefits that traditional org-to-org deployment approaches simply can’t offer.</p><p>In this post, we’ll explore the technical advantages of OrgFlow’s Git-centric philosophy — from automatically tracking changes across orgs, to safer merging and conflict resolution, to robust version history and beyond — and why this approach elevates Salesforce DevOps to a new level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FEbvrJTkMU5h4fuYKoDsvg.png" /></figure><h3>Automatic Change Detection</h3><p>One immediate benefit of having Git at the core is effortless <strong>change detection</strong>. Git is fundamentally built to track changes — every commit represents a “delta,” i.e. a set of differences from the previous version. OrgFlow takes advantage of this by treating your Salesforce orgs as sources of truth that are continuously synced to corresponding Git branches. When someone makes modifications in a Salesforce org, OrgFlow can retrieve the latest metadata and let Git quickly figure out exactly what changed, down to the line level. This means your team doesn’t have to manually remember or list every component they modified during a development task — Git will automatically highlight what’s new or different.</p><p>Importantly, this <strong>automatic change detection works for all Salesforce orgs</strong>, not just those with Salesforce’s limited “source tracking” feature. Salesforce’s native change tracking is available only in certain sandboxes (like scratch orgs or Developer sandboxes) and can be incomplete. In contrast, OrgFlow’s Git-based approach ensures that whether changes happen in a dev sandbox, a QA sandbox, or even directly in production, they are detected and captured. Every environment’s branch shows what changed since the last commit. This dramatically reduces the chances of missing a change and helps teams confidently manage multiple orgs without relying on manual tracking or spreadsheets.</p><h3>Detailed Version History</h3><p>Git’s central role in OrgFlow also means you automatically gain a <strong>granular version history</strong> of all your metadata changes. Git records every change forever, complete with timestamps and author information. As OrgFlow flows changes from your Salesforce orgs into the repository, you build up a line-by-line history of your entire codebase over time. This goes far beyond Salesforce’s built-in tracking tools (like the setup audit trail or “last modified” dates), giving you a true audit log of <strong>what changed, when, and by whom</strong> for every piece of metadata.</p><p>Having this rich history is invaluable for debugging and compliance. If a bug is introduced, you can pinpoint the exact commit where a particular metadata component was altered and see the diff. You can trace who made a change and why (through commit messages). Essentially, OrgFlow turns your Salesforce metadata into a <strong>living history</strong> that is easily navigable via Git’s tools. Over the months and years, this growing history becomes a knowledge base for your team — something impossible to achieve with traditional change sets or bare org-to-org deployments.</p><h3>Easy Environment Comparisons</h3><p>When each Salesforce environment (org) is linked to a Git branch, comparing environments becomes straightforward and visual. OrgFlow continuously syncs orgs to their respective branches, so each branch reflects the latest state of its org. To see how two environments differ — say, UAT vs. Production — you can simply compare their Git branches. Most Git platforms (GitHub, Bitbucket, GitLab, etc.) provide user-friendly <strong>branch comparison</strong> views. With a few clicks, you can generate a diff between any two orgs’ metadata. This lets you <strong>visualize differences</strong> in components and configurations across environments without tedious manual reviews.</p><p>Another huge advantage of using Git for comparisons is the ability to leverage the concept of a <strong>common ancestor</strong> for three-way comparisons. In Git, two branches usually share a base commit (the point where they diverged). Git can use this to show not just “A vs B” differences, but <em>how each branch changed relative to their common starting point</em>. This three-way comparison provides much more insight than a simple side-by-side diff.</p><p>For example, if a field’s requiredattribute is false in one org and true in another, a basic two-way diff only shows they differ – it doesn’t tell which org introduced the change. A three-way compare using Git’s history can reveal that information: perhaps the field was originally false and was later set to true in one branch, making it clear <strong>what changed where</strong>. OrgFlow enables this level of clarity for Salesforce metadata by ensuring every environment’s state is anchored in version control.</p><h3>Safe Merging of Changes</h3><p>Perhaps the most game-changing benefit of OrgFlow’s Git-centric model is how it enables <strong>safe, automatic merging of changes</strong> between environments. Traditional Salesforce deployment tools often rely on a straightforward copy-paste approach: retrieve components from one org and deploy them into another.</p><p>Even when a manual comparison is done beforehand, it’s a simplistic two-way diff that forces you to guess the origin of differences. This can lead to a serious problem known as <strong>“clobbering”</strong> — where a deployment unintentionally overwrites changes in the target org with older or conflicting changes from the source. Without knowing the full history, you might deploy a component that wipes out someone else’s work, and you’d have no easy way to detect that it happened.</p><p>OrgFlow avoids these pitfalls by <strong>never moving metadata directly from org to org</strong>. Instead, changes flow through Git branches and are combined using Git’s merge algorithms. When you “promote” changes from, say, a development org to a staging org with OrgFlow, what’s really happening under the hood is a Git <strong>merge</strong> from the dev branch into the staging branch. Because Git is aware of the common ancestor (the point where staging and dev were last in sync), it knows exactly which lines were changed in the source branch and which (if any) were changed in the target branch since they split. Git can then automatically <strong>merge those changes together</strong> if they don’t touch the same lines — <em>without overwriting anything on the target</em>. Each environment’s unique changes are preserved and combined.</p><p>In other words, OrgFlow uses <strong>three-way merges</strong> to integrate changes safely. This drastically reduces the risk of clobbering. If your production and sandbox orgs have evolved in parallel (as often happens when urgent hotfixes go to prod while new features are built in a sandbox), OrgFlow can merge the two streams of work intelligently. Where other tools might blindly overwrite production with sandbox or vice versa, OrgFlow (via Git) will <strong>meld the two sets of changes</strong> when possible, so nothing is lost from either side.</p><p>The result is a far safer deployment process — one that treats your metadata like code and respects changes made in both environments.</p><h3>Conflict Detection and Resolution</h3><p>Of course, sometimes two people really do change the <em>same</em> lines of the same component in different orgs. In a direct deployment scenario, that often results in one change silently overwriting the other — a recipe for confusion and bugs.</p><p>OrgFlow’s reliance on Git completely changes the outcome in this situation. When two sets of changes cannot be cleanly merged (for example, both orgs edited the exact same line in an Apex class in different ways), Git will raise a <strong>merge conflict</strong> instead of choosing one over the other. This is critical: <strong>no conflicting changes go unnoticed</strong>. OrgFlow will detect the collision and pause the flow process to ask for human input, rather than let one org’s change trample another’s.</p><p>Once a conflict is detected, OrgFlow provides tools to help you resolve it safely. In the OrgFlow web app, a visual <strong>merge conflict resolution</strong> interface highlights the differences and lets you decide how to reconcile them. If you’re using the OrgFlow CLI, it will prompt you with options to either abort, choose one side, or even launch external merge tools to resolve the conflict.</p><p>The key point is that <strong>conflicts are explicitly flagged and managed</strong>, not hidden. This brings Salesforce metadata development in line with the best practices of software engineering — where teams expect occasional merge conflicts and have a process to resolve them collaboratively.</p><p>Moreover, OrgFlow has an extra trick up its sleeve here. Because it “understands” Salesforce metadata structure to some extent, it can <strong>auto-resolve certain merge conflicts</strong> that Git alone might not handle. For example, if two admins added different fields to the same object in different orgs, the resulting XML metadata might conflict textually, but semantically those two new fields can coexist. OrgFlow can intelligently merge such non-competing changes because it knows the XML structure of Salesforce components.</p><p>In cases where auto-resolution isn’t possible, a user in your team will make the final call — but with OrgFlow’s guidance and tooling, conflict resolution is efficient and transparent. The bottom line is <strong>no lost work</strong>: every change is either merged or explicitly resolved, ensuring nothing gets overwritten without your knowledge.</p><h3>Collaborative Reviews with Pull Requests</h3><p>Because OrgFlow stores all metadata in a Git repository, you gain the ability to use standard Git collaboration workflows, notably <strong>pull requests (PRs)</strong>. A pull request is a staple of modern DevOps — it’s essentially a proposal to merge one branch into another, bundled with a commit diff for review. With OrgFlow, you can incorporate PR-based reviews into your Salesforce deployment process easily. For example, when developers finish a set of changes in a sandbox (which OrgFlow has committed to the sandbox’s branch), they could open a GitHub pull request to merge those changes into the integration or QA branch.</p><p>This brings several benefits: first, team members can <strong>review the changes line-by-line</strong> using familiar code review tools before they are deployed to the next environment. Comments can be left, discussions can happen, and improvements can be suggested — all before the metadata touches the target org. This kind of peer review is a proven practice for catching issues early and ensuring higher quality.</p><p>Second, pull requests enable <strong>automated validations</strong>. Since the changes are in Git, you can hook into CI/CD pipelines that trigger on PRs. For instance, a GitHub Actions or Azure DevOps pipeline can automatically run Apex tests, static code analysis, or attempt a validation deployment of the PR’s combined changes into the target org for validation. Only if these checks pass would the PR be approved and merged, and the resulting merged metadata deployed to the target org for real.</p><p>This means potential deployment failures or bugs can be caught <em>before</em> they ever impact a real environment. It’s a level of rigor and automation that point-and-click deployment tools can’t easily match. OrgFlow basically lets you apply the same review and quality gates to Salesforce metadata as software teams use for application code.</p><h3>Working with Metadata Locally</h3><p>A Git-based approach also makes it much easier for developers to work with Salesforce metadata in their own local environments and preferred tools. Once your org’s metadata is version-controlled in a Git repo, <strong>you can simply clone the repository to your local machine</strong> and treat the metadata like any other source code project.</p><p>For example, a developer can check out a branch corresponding to a sandbox, open the project in VS Code (with the Salesforce Extension Pack), and start editing Apex classes or Custom Object definitions in a rich IDE environment. They get all the benefits of local development: code editors with syntax highlighting, search, refactoring tools, and so on. When their changes are done, they commit and push to the repo, and OrgFlow will incorporate those commits just as it would changes fetched from an org.</p><p>This <strong>bi-directional flexibility</strong> — the ability to make changes either in Salesforce or in the repository — is a huge boon to productivity. Admins who prefer declarative in-org changes can continue as normal (OrgFlow will capture their work via Git), while developers who want to use source-driven development can do so seamlessly.</p><p>OrgFlow encourages you to interact with the Git repo outside of its own interface as needed. You can manually commit changes to environment branches (e.g. via an IDE), create feature branches for experimentation, or even add <strong>non-metadata files </strong>(like documentation or CI configuration) to the repository. As long as you don’t remove OrgFlow’s tracking files or history, it will coexist peacefully with whatever else you put in the repo. This open approach means you’re never locked into a single tool or UI — you can use the full ecosystem of Git and developer tools alongside OrgFlow.</p><h3>Continuous Backup and Easy Rollback</h3><p>Storing your orgs’ state in a Git repository effectively creates a continuous backup of your Salesforce metadata. Every time OrgFlow “flows in” changes from an org to Git, it’s essentially creating a snapshot of that org’s metadata in that moment, preserved as a set of commits. Over time, this results in a chronological series of backups — and at any point, you can <strong>roll back </strong>an environment to a prior state using Git.</p><p>In fact, OrgFlow provides features for explicit <strong>snapshots and rollback</strong> operations that leverage this history. If something goes wrong in a deployment or an accidental change is introduced, you have the power to restore metadata to a known good version from the past.</p><p>The rollback process is much more straightforward when every change is tracked in version control. Without Git, a rollback in Salesforce could mean manually redeploying older metadata (if you even have it stored somewhere) or, worse, trying to remember what the previous settings were. With OrgFlow, you can pinpoint the exact commit from last week or last month when things were correct, and use that as the source to redeploy to the org.</p><p>OrgFlow’s snapshot mechanism even goes a step further by also capturing some OrgFlow-specific environment state along with the commit, making a point-in-time restore even more seamless. In essence, <strong>disaster recovery for metadata</strong> is built-in. Knowing that you can always rewind to a safe state gives teams confidence to move fast, since any mistake can be undone.</p><h3>Seamless CI/CD Integration</h3><p>Modern DevOps relies heavily on automation, and here again OrgFlow’s Git focus shines. By having all changes flow through a Git repository, OrgFlow naturally plugs into any CI/CD system that works with Git — which is to say, <em>most CI/CD platforms</em>. Whether you use GitHub Actions, Azure Pipelines, Jenkins, CircleCI, or others, they all can monitor your Git repo for changes and kick off automated processes when changes occur. With OrgFlow, this means you can set up an end-to-end <strong>continuous integration pipeline for Salesforce changes</strong> with relative ease.</p><p>For example, you might configure a pipeline to trigger on every push or pull request to a main branch. That pipeline could run unit tests (Apex tests) on a scratch org or sandbox, perform static code analysis (e.g., ESLint, PMD for Apex), validate that the metadata deploys correctly to a staging org, and even run regression tests. Since the source of truth is in Git, incorporating these steps is straightforward — the CI system just pulls the latest commit and acts on it. OrgFlow basically ensures that Salesforce changes are <strong>first-class citizens in the CI/CD world</strong>, rather than siloed in an environment where automation tools can’t see them.</p><p>Furthermore, integrating with other tools becomes possible. Do you want to automatically generate documentation from your metadata? Or notify your team in Slack when a deployment succeeds? Or integrate with a translation management system for your labels? All of that can be done by tapping into Git events and using the wealth of DevOps tooling out there. OrgFlow doesn’t try to re-invent those wheels — instead, it lays the groundwork (with Git) so you can connect your Salesforce DevOps to the broader software delivery ecosystem. This flexibility is a major advantage over all-in-one Salesforce DevOps solutions that may have limited or proprietary integration points.</p><h3>Partial Deployments and Eventual Consistency</h3><p>Salesforce deployments can be notoriously fickle — sometimes a subset of components fail to deploy due to dependencies or errors, leaving your environments out of sync. OrgFlow’s use of Git makes possible some advanced capabilities to handle these scenarios gracefully.</p><p>One such concept is <strong>partial success</strong>: OrgFlow can deploy what it can and keep track of what it couldn’t, rather than treating a deployment as “all or nothing.” Thanks to Git, OrgFlow knows the exact differences that remain undeployed (because those differences exist as commits in the target branch history). It can mark certain components as “pending” and allow a deployment to complete for the rest, instead of rolling everything back. These pending changes are recorded and can be retried or merged with future changes intelligently — an approach known as <strong>eventual consistency</strong>.</p><p>In an eventual consistency model (which OrgFlow pioneered for Salesforce), the idea is that your environments will converge over time despite temporary discrepancies. Git’s immutable history enables OrgFlow to identify the last known good version of a component and the new version that hasn’t been applied yet. With this knowledge, OrgFlow can keep attempting to deploy the outstanding changes (for instance, after a blocking issue is resolved) or merge them with newer changes that come down the pipeline.</p><p>Essentially, <strong>no change is lost or forgotten</strong> — even if it couldn’t be applied immediately, OrgFlow tracks it in the branch until it can be successfully deployed. This is a more resilient strategy compared to typical deployment tools that either succeed fully or fail and abort on errors. By leveraging the repository’s history, OrgFlow can implement these sophisticated deployment strategies that make your release process more <strong>robust and self-healing</strong>.</p><h3>Open and Flexible Git Integration</h3><p>A perhaps underappreciated benefit of OrgFlow’s Git-first philosophy is how <strong>open and unopinionated</strong> it is. OrgFlow doesn’t lock you into a specific platform or workflow — it works with <strong>any standard Git repository</strong>, whether it’s GitHub, GitLab, Bitbucket, Azure Repos, or even a self-hosted Git server. OrgFlow uses pure Git commands under the hood, not proprietary APIs, so as long as it can authenticate to the repo, it will function the same way. This means you’re free to choose or change your Git hosting without losing compatibility.</p><p>Moreover, OrgFlow <strong>does not take over or hide your repository</strong> — your metadata Git repo remains fully in your control. Some tools that integrate with version control try to abstract it away or discourage direct access, but OrgFlow’s approach is the opposite. You are encouraged to open up the repository, inspect it, and even make changes or additions outside OrgFlow. For example, you can commit a README or CI configuration files to the repo, or even create feature branches and merge them into the environment branches on your own terms.</p><p>OrgFlow will gracefully incorporate any new commits it finds — it’s designed to <strong>coexist with other activity in the repo</strong>, not be the sole actor. Your team can continue using familiar Git workflows and combine them with OrgFlow’s automation. This openness is a stark contrast to some Salesforce release management tools that force you into a specific UI or process.</p><p>Finally, because everything is standard Git, you have the <strong>portability</strong> that comes with Git. Your entire Salesforce metadata (and its history) could be exported or cloned at any time. You’re not trapped in a closed system — OrgFlow is an enabler built on a foundation (Git) that is well-understood and widely supported. This gives technical teams confidence: adopting OrgFlow doesn’t mean surrendering control, it actually means gaining more control over your Salesforce assets in a transparent way.</p><h3>Conclusion</h3><p>By making Git the backbone of its DevOps solution, OrgFlow delivers capabilities that fundamentally improve how Salesforce teams build and release changes. Automatic change tracking, detailed history, safe merging, conflict prevention, collaborative reviews, easy rollbacks, CI/CD hooks — these all arise naturally when every change runs through a Git repository.</p><p>OrgFlow’s focus on Git might require Salesforce admins and consultants to become a bit more Git-savvy, but the payoff is a DevOps process that is <strong>far more robust, auditable, and flexible</strong> than traditional approaches. Rather than shielding you from Git, OrgFlow empowers you to leverage it fully — bringing the maturity of software development practices to the Salesforce world.</p><p>In short, OrgFlow’s Git-centric approach takes the best of what Git has to offer and <strong>applies it to Salesforce metadata management</strong>. The result is a true DevOps experience: one where deployments are predictable and reversible, teamwork is streamlined, and your Salesforce orgs’ state is always versioned and backed up. For teams looking to elevate their Salesforce change management to modern standards, embracing a tool that puts Git front-and-center like OrgFlow can be a game-changer. It marries the click-friendly world of Salesforce with the power-tool capabilities of Git, yielding a Salesforce DevOps solution that is both user-friendly and engineering-grade. That is the unique advantage of OrgFlow’s Git-first philosophy — an advantage that many teams find hard to live without once they experienced it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fe143f22be7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/orgflow/what-true-git-based-devops-brings-to-salesforce-0fe143f22be7">What True Git-Based DevOps Brings to Salesforce</a> was originally published in <a href="https://medium.com/orgflow">OrgFlow</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Source Tracking in OrgFlow 2.0]]></title>
            <link>https://medium.com/orgflow/introducing-source-tracking-in-orgflow-2-0-f8d9ab99f467?source=rss----d41bd1dc72bc---4</link>
            <guid isPermaLink="false">https://medium.com/p/f8d9ab99f467</guid>
            <category><![CDATA[salesforce-deployment]]></category>
            <category><![CDATA[salesforce-ci-cd]]></category>
            <category><![CDATA[salesforce-devops]]></category>
            <dc:creator><![CDATA[Daniel Rosenberg]]></dc:creator>
            <pubDate>Wed, 01 Mar 2023 10:54:35 GMT</pubDate>
            <atom:updated>2023-03-01T10:54:35.042Z</atom:updated>
            <content:encoded><![CDATA[<p>In our recently released <a href="https://www.orgflow.io/download">version 2.0</a> of OrgFlow, the biggest and most impactful new feature by far is the added support for <em>source tracking</em>, a feature that has been on our radar for quite a long time.</p><p>Ever since we started building OrgFlow, we’ve been aware of the huge potential performance improvements that source tracking could bring to OrgFlow, and how neatly it would fit into the product’s architecture and workflow. Limited coverage in terms of metadata support, as well as lack of support for sandboxes, have forced us to hold off. But those shortcomings have been addressed over time to the extent that we are now able to work around the remaining limitations.</p><p>And so having bubbled its way up our backlog for a while, this feature recently made it to the top, and we have spent the past several months developing, testing and fine-tuning it before finally including it in our 2.0 release.</p><p>Even though the addition of source tracking to OrgFlow is largely a qualitative change more than a functional one, its impact on the performance and safety of your overall Salesforce DevOps workflow is so significant that we wanted to highlight it with its own article.</p><h3>What is source tracking?</h3><p>Source tracking refers to the ability of Salesforce sandboxes and scratch orgs to <em>maintain a detailed, machine-consumable record of metadata changes over time</em>, at the individual metadata component level. Conceptually, source tracking is similar to the age-old setup audit trail, but source tracking is more reliable, more granular and more consistently structured to make it better suited for programmatic consumption and processing.</p><p>Initially introduced to support the metadata <em>pull/push</em> operations of <em>Salesforce DX</em> (which has since been expanded to the more general <a href="https://developer.salesforce.com/tools/sfdxcli">Salesforce CLI</a>) to incrementally keep a scratch org in sync with a local directory on a developer’s workstation, source tracking has in fact always been available to third-party tools as well.</p><p>Originally only available for scratch orgs, starting with the Summer ’20 release, source tracking was made available for Developer and Developer Pro sandboxes, too. Over time, the number of metadata types supported by source tracking has steadily increased from a limited subset, to nearly full coverage (with a little big of lag). It is now considered by Salesforce to be mature enough that the newly released Salesforce DevOps Center depends on source tracking to drive its change detection.</p><p>From a technical standpoint, source tracking consists of a metadata “change tracking ledger” of sorts, in the form of the SourceMember object and its records. Each record of this object represents a single metadata change, and contains information about which metadata component was changed, the type of change (add/modify/delete), which user made the change, along with a revision number which continuously increases with each metadata change made in the org.</p><figure><img alt="A diagram showing different changes made to a page layout over time along a Git commit graph." src="https://cdn-images-1.medium.com/max/1024/1*kNZ99zeKJi-HNp5fA190Hw.png" /><figcaption>Source tracking keeps a record of changes to Salesforce metadata over time.</figcaption></figure><p>Every time a metadata component is added, modified or deleted, a new SourceMember record is added, with a higher revision number than all previous changes. (As is customary with Salesforce software, there are several exceptions and limitations; more on those later.)</p><p>External tools can query these SourceMember records (through the Tooling API) in order to understand the full extent of metadata changes between any given two revision numbers. This allows tools (such as OrgFlow) to make better decisions about metadata retrieval and deployment. For example, a tool might store/cache the highest seen revision number when retrieving metadata, and subsequently query the SourceMember object to determine which metadata changed since the previous retrieve, and retrieve only the changed subset rather than all the metadata in the org.</p><h3>How OrgFlow uses source tracking</h3><p>OrgFlow utilizes source tracking data for three different purposes:</p><ol><li>Dramatically speed up metadata retrieval</li><li>Increase accuracy of author attribution in Git history</li><li>Detect and avoid clobber during metadata deployment</li></ol><p>Let’s look at each of these in turn.</p><h4>Improved retrieve performance (partial retrieve)</h4><p>The operation of syncing metadata changes from a Salesforce org to its backing Git branch is referred to in OrgFlow as an <em>inbound flow</em>, exposed though the env:flowin command. Prior to version 2.0, because OrgFlow had no notion of source tracking, an inbound flow would always entail a <em>full retrieve</em> of all relevant metadata in the org. OrgFlow would then compare the retrieved metadata with the metadata already in Git, to capture and commit the differences.</p><p>For customers with large orgs, and where a significant subset of all metadata was included in the OrgFlow stack, the full retrieve on every inbound flow could become a significant performance bottleneck, both for the individual developer’s inner loop and for automated CI/CD jobs such as schedule nightly upstream back-promotion.</p><p>Starting with version 2.0, OrgFlow now utilizes source tracking to avoid performing a full retrieve and <strong>instead perform a <em>partial retrieve</em> whenever possible</strong>. OrgFlow continuously stores the highest retrieved revision number for each environment in its cloud-based state store, and retrieves only those metadata components which actually changed since the previous inbound flow.</p><p>This results in a <strong>dramatic</strong> improvement of overall performance, and also makes it more feasible to perform inbound flows much more frequently — even many times per day.</p><p>If only a handful of components have changed in your sandbox since the previous inbound flow, only those components can be surgically retrieved quickly and efficiently, minimizing developers’ waiting time and resource usage. If nothing has changed at all, then no Metadata API calls are even made; the process instead exists quickly without consuming valuable build minutes in your CI/CD platform or needlessly wasting your Salesforce API limits.</p><h4>Improved author attribution</h4><p>Ever since our first release, OrgFlow has had a unique feature we lovingly refer to as <em>author attribution</em>, where OrgFlow commits metadata changes to your Git repository <em>grouped by author</em>.</p><figure><img alt="A diagram depicting two different changes made to the same page layout by two different authors." src="https://cdn-images-1.medium.com/max/1024/1*PbZckhsHP8APbvXBiCqH8A.png" /><figcaption>Author attribution reflects the original author of each change to each component in Git history.</figcaption></figure><p>Let’s say you have a sandbox environment connecteed to OrgFlow, and you have admins and developers making changes in this sandbox. Anna makes a change to the description of the Account object, and Christian makes a few changes to some FlexiPage components. On the next inbound flow, OrgFlow commits those changes in two separate commits (one for each author) and the commit signatures will contain the name and email address from Salesforce of each respective user, in the “authored by” part of the commit while OrgFlow itself (or whatever you configure) will be in the “committed by” part.</p><figure><img alt="An web page showing the details of a commit in a Git repository, where the author is Christian Pfeil and the committer is OrgFlow." src="https://cdn-images-1.medium.com/max/1024/1*kN0FnGoFDC1greeIwhVdGQ.png" /><figcaption>OrgFlow’s author attribution in action; this commit is authored by Christian Pfeil and committed by OrgFlow. (Exact visual presentation depends on Git service provider and/or Git tooling used to view the commit.)</figcaption></figure><p>It’s important to note that neither Anna nor Christian need an account in your Git provider for this to work — commit signatures in Git are completely independent of whatever authentication layer that may or may not be in place on top of your Git repository. However, with many Git providers, if the email address in a commit signature <em>does</em> happen to correspond to a user account in your Git provider, additional functionality may light up, such as the display of a profile photo on the commit seen in the example from Azure Repos above.</p><p>Prior to version 2.0, OrgFlow would get the author information from the lastModifiedById and lastModifiedByName properties from the listMetadata() operation in the Metadata API. These properties are not very reliable, however — for one thing, they cannot be used to attribute deletes, because when a component has been deleted there is no longer anywhere to read these properties from. Besides that, the values have also proven somewhat unreliable in general.</p><p>Enabled by the introduction of source tracking in version 2.0, OrgFlow now instead uses the source tracking data to drive author attribution. This ultimately results in much more accurate and extensive author tracking in your Git repository. Deletes will now be fully attributed to the Salesforce user who did the actual delete. Additionally, OrgFlow itself will no longer ever be attributed as the author of a change, because OrgFlow does not create source tracking data during deployments.</p><h4>Avoiding clobber on deployment</h4><p>It turns out source tracking is also very useful during <em>outbound</em> flow (i.e. syncing changes from an environment’s Git branch out to its corresponding Salesforce org). Specifically, source tracking has allowed us to add another very powerful feature in version 2.0: <strong>the ability to detect and avoid </strong><a href="https://en.wikipedia.org/wiki/Clobbering"><strong>clobber</strong></a><strong> of changes made in the target org</strong>.</p><p>Because OrgFlow now stores the highest committed source tracking revision number in its cloud-based state store from the last inbound flow, it can now fetch and inspect the source tracking data from the target org before starting a new deployment, as a safety check to ensure there have not been further changes made in the org which would be overwritten (clobbered) by the deployment.</p><p>If OrgFlow determines that the deployment might potentially cause clobber in the target org (or if it is unable to determine) then it can pause, show you a summary of the changes that would or might be clobbered, and let you choose how to proceed.</p><p>The determined clobber of any given deployment evaluate as either <em>certain clobber</em>, <em>potential/unknown clobber</em> or <em>no clobber</em>. Examples of when clobber is potential/unknown include:</p><ul><li>Source tracking is not enabled in the target org</li><li>The deployment contains changes to metadata whose types are not source-tracked</li><li>There have been change set deployments since last inbound flow</li></ul><p>OrgFlow will handle each of these outcomes differently by default, depending on runtime circumstances such as whether stdin is connected to a terminal or not (i.e. whether prompting for confirmation is possible or not). In case you wish to override the default clobber behavior, whether during manual use or in CI/CD jobs, we have also added a command-line argument to the env:flowout and env:flowmerge commands:</p><pre>--clobber=auto|accept|abort<br>    How to handle code clobber; auto = accept potential/unknown clobber,<br>    abort on certain clobber (default: auto)</pre><p>Adding the notion of clobber to OrgFlow, along with the ability to detect and avoid it using source tracking, results in a much safer Salesforce DevOps workflow overall. For one things, you no longer have to ensure to always do an inbound flow before an outbound flow.</p><h3>Automatic and transparent</h3><p>My favorite thing about source tracking support in OrgFlow is that we have managed to make it <strong>completely automatic and transparent to the user</strong>. As a customer, you do not have to do anything to enable or activate this feature — on every inbound flow, OrgFlow will automatically choose between partial (source-tracked) and full retrieve, depending on runtime circumstances.</p><p>As a general rule,<strong> partial retrieve is always preferred and will be chosen whenever possible and appropriate.</strong> That said, OrgFlow will fall back to full retrieve in the following cases:</p><h4>Source tracking is not supported/enabled</h4><p>Source tracking for sandboxes is still an optional feature that you must enable in your production org. Once enabled, all Developer and Developer Pro sandboxes created or refreshed after that point will have source tracking. Other org types do not support source tracking.</p><p>If you have not enabled the source tracking feature, or if you are flowing in from a production org or from a Partial Copy or Full sandbox (which do not support source tracking) then OrgFlow will automatically fall back to full retrieve.</p><h4>The environment is flowed in for the first time</h4><p>Until at least one inbound flow has been performed for an environment, OrgFlow will not have a stored revision number based on which it can query the source tracking data in the sandbox to determine subsequent changes. OrgFlow will therefore fall back to full retrieve.</p><h4>Change set deployments are detected</h4><p>The reliability of source tracking data in a sandbox of course depends on source tracking records being created for every metadata change. If metadata changes occur that are not reflected in source tracking, then retrieving based on source tracking will miss those changes.</p><p>Source tracking records are guaranteed to be created in the following scenarios:</p><ul><li>Metadata is changed through the Salesforce UI</li><li>Metadata is changed by means of a Metadata API deployment <strong>where the client explicitly passes the options needed</strong> to trigger source tracking. This includes the Salesforce CLI and any tools that use the Salesforce CLI (or the <a href="https://github.com/forcedotcom/source-deploy-retrieve">SDT JavaScript library</a>) behind the scenes to deploy metadata. The <a href="https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode">Salesforce Extension Pack for Visual Studio Code</a> and the <a href="https://plugins.jetbrains.com/plugin/10253-illuminated-cloud-2">Illuminated Cloud plugin for IntelliJ</a> are two examples.</li></ul><p>However, <strong>if metadata is changed through a change set deployment, then no source tracking records are created</strong>. The same is true for Metadata API deployments where the client is not source-tracking aware and therefore does not pass the right magic headers.</p><p>For this reason, OrgFlow regularly inspects the deployment history in each connected sandbox, and stores the most recent known deployment operation ID. If OrgFlow detects that new change set deployments have happened since the previous inbound flow, it automatically falls back to full retrieve to ensure it does not “miss” the changes made by those change set deployments.</p><p>It is unfortunately not possible to tell from deployment history which API deployments created source tracking data and which did not. Therefore, OrgFlow assumes that all API deployments are source-tracking aware. We selected this approach so that customers can seamlessly use OrgFlow and Salesforce’s developer tools side-by-side, without constantly making OrgFlow revert to full retrieve.</p><p>The trade-off is that, if you make metadata changes through third-party tools that do not update source tracking data during deployment, then you will need to take steps to ensure OrgFlow performs a full retrieve on inbound flow (e.g. using the argument described next).</p><h4>Full retrieve is explicitly requested</h4><p>We have also added command-line arguments to allow the user to control which retrieve mode is used during an inbound flow. For the env:flowin command the argument is:</p><pre>--retrieveMode=auto|partial|full<br>    Retrieve method; auto = partial if supported and safe,<br>    otherwise full (default: auto)</pre><p>(The env:flowmerge command has similar arguments to control the retrieve mode of the source and target inbound flows.)</p><p>As mentioned before, auto is the default and employs the graceful fallback rules outlined in the above sections. The user can specify either partial or full to force the use of one method or the other. Specifying partial when source tracking is not supported will result in a preemptive failure.</p><p>Specifying full will cause OrgFlow to always fall back to performing a full retrieve for the inbound flow, regardless of whether the other conditions are met or not.</p><h3>Non-source-tracked metadata types</h3><p>My second favorite thing about our source tracking support is that it is <strong>incremental</strong>; that is to say, OrgFlow has the ability to perform partial retrieve for metadata types that support source tracking, while performing full retrieve for those that do not —both in the same inbound flow!</p><p>To see which types support source tracking for a given Salesforce version, the <a href="https://developer.salesforce.com/docs/metadata-coverage">Metadata Coverage Report</a> is a really great tool. If you sort the list of types on the “source tracking” column, you can easily see which types support the feature and which do not.</p><p>It is up to you to choose which metadata types to include in your flow (using the .orgflowinclude file at the root of your Git repository). If you have chosen to include types that are known to not support source tracking, then OrgFlow will automatically split the retrieval up into two distinct subsets:</p><ul><li>Partial retrieve (using source tracking) for the supported types</li><li>Full retrieve (the “classic” approach using listMetadata() and retrieve()) for any non-supported types</li></ul><p>The two subsets will be retrieved concurrently, but still, in practice the full retrieve subset will most likely constitute a performance bottleneck, because by the time the partial retrieve has completed, Salesforce will still be working on putting those full-retrieve batches together for download (with the possible exception of edge cases where the partial retrieve yields a lot of changes and may therefore take longer).</p><p>For very performance-sensitive customer scenarios, we therefore recommend that you either exclude metadata that does not yet support source tracking, or consider flowing such metadata in a secondary stack whose processing times won’t impact your primary workflow.</p><p>In any case, source tracking support typically only lags behind for newly introduced metadata types for 1–2 releases, so even if OrgFlow must go into full retrieve mode for some of your metadata today, it might not do so tomorrow.</p><p>That was a behind-the-scenes look at the new source tracking feature introduced in OrgFlow 2.0. We hope you found it interesting, and we’re very excited for you to start using it to make their Salesforce DevOps workflows faster and safer! As usual, if you have any questions or feedback, don’t hesitate to get in touch — you’ll find all the ways to contact us on <a href="https://www.orgflow.io/">our website</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8d9ab99f467" width="1" height="1" alt=""><hr><p><a href="https://medium.com/orgflow/introducing-source-tracking-in-orgflow-2-0-f8d9ab99f467">Introducing Source Tracking in OrgFlow 2.0</a> was originally published in <a href="https://medium.com/orgflow">OrgFlow</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Tags to Keep Your Salesforce Environments Organized]]></title>
            <link>https://medium.com/orgflow/introducing-tags-to-keep-your-salesforce-environments-organized-e1b865b8ef2b?source=rss----d41bd1dc72bc---4</link>
            <guid isPermaLink="false">https://medium.com/p/e1b865b8ef2b</guid>
            <category><![CDATA[salesforce-devops]]></category>
            <category><![CDATA[salesforce-deployment]]></category>
            <category><![CDATA[salesforce-ci-cd]]></category>
            <dc:creator><![CDATA[Daniel Rosenberg]]></dc:creator>
            <pubDate>Sun, 09 Oct 2022 16:08:48 GMT</pubDate>
            <atom:updated>2022-10-09T16:08:47.974Z</atom:updated>
            <content:encoded><![CDATA[<p>In all but the most trivial Salesforce DevOps pipelines, there can often be a significant number of active environments at any given time. For some of our customers, it’s not uncommon to have 30+ environments active in their OrgFlow stack at the same time.</p><p>Managing all those different environments can become challenging, particularly in automation and CI/CD contexts, because not all environments should be treated the same. Scripts or CI/CD jobs must sometimes treat different environments with different logic and processing.</p><p>One simple example might be to have a CI job that automatically any metadata changes pushed to an environment’s backing Git branch, but only for feature development environments —i.e. <strong>not</strong> for staging, UAT or production environments.</p><h3>Hard-coding environment names</h3><p>So how do you build a CI job that excludes the staging, UAT and production environments but runs for all others? Well, until now, hard-coding environment names has really been the only possibility.</p><p>But hard-coding is problematic, because environments come and go. In fact, as a best practice, you should strive to keep sandbox environments as short-lived as possible, lest they drift too far from your production org. OrgFlow is great at continuously keeping your sandbox environments up-to-date with your production org, but there are always things that OrgFlow doesn’t flow — most notably, users, roles and other things that are technically data rather than metadata.</p><p>Hard-coding environment names means that you have to constantly keep updating your scripts and CI/CD jobs whenever new environments are added to your stack, or old ones deleted. Aside from causing unnecessary churn in your script files, this is very tedious and error-prone.</p><p>It quickly becomes clear that we need a way to <strong>group and categorize environments that share certain common traits</strong>, so that we can base our scripts and CI/CD jobs on those traits instead of hard-coding environment names. But how? Sandbox names are limited to 11 characters, and must be unique. Descriptions are free text and lack any structure. Using either of them for grouping, categorization and programmatic decision making is a non-starter.</p><p>That’s where environment tags come in.</p><h3>Enter environment tags</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wERZFfQNcaRnAgH-Yf8LLA.png" /><figcaption>Tags add a way to group and categorize Salesforce environments that share certain common traits so that you can base your Salesforce DevOps script logic on those traits instead of hard-coding sandbox names.</figcaption></figure><p>Tags are a simple but powerful automation feature of OrgFlow, introduced in version 1.8.0. They allow you to develop scripts, CI/CD pipelines and other forms of automation that treat environments differently without having to hard-code environment names into your scripts. Instead, you can set different tags on different environments and base your script logic on those tags.</p><h3>Anatomy of environment tags</h3><p>Tags are arbitrary name/value pairs that you can set on the environments in your OrgFlow stack.</p><p>Environment tags are stored in OrgFlow’s cloud-based state store, and can therefore be managed and used from any device. Tags are pass-through and completely opaque to OrgFlow; OrgFlow ascribes no meaning to, and bases no processing on, the existence or values of any enviroment tags. Their meaning and use are completely up to you and the processes and pipelines you build around them.</p><p>A tag can either have a value (for example ownerEmail:dimitrius@acme.com) or no value (for example isDisabled). Tags with values are most useful when you need to filter or carry out actions based on values that may differ between environments, such as send an email to the owner of an environment. Tags without values are useful for modeling and acting on boolean conditions, such as excluding environments that have been temporarily disabled.</p><p>Both tag names and tag values are case-insensitive. Tag names may only contain alphanumeric characters, hyphens and underscores. Tag values may contain anything except newline characters.</p><h3>Typical use cases</h3><p>Thank to their flexibility, the potential use cases for environment tags are limited only by our engineering creativity, but here are some examples of the kinds of requirements we’ve come across while working with Salesforce DevOps customers:</p><ul><li><strong>Categorize and group</strong> your environments and develop scripts or pipelines that apply particular logic or processing only for environments in a certain category or group. As an example, you might categorize all your environments as either dev, test, staging. In your CI/CD pipeline, you might only flow in changes in environments with the tag category:dev, because no changes made in test and staging environments should be preserved.</li><li><strong>Save arbitrary values</strong> on your environments and use those values as per-environment inputs to the logic or processing in your scripts or pipelines. As an example, you might designate a code owner for each development environment, and store the owner’s email address on each environment with the tags similar to ownerEmail:name@domain.com. In your CI/CD pipeline, you might then send an email to the owner of any environment where merge conflicts are detected.</li><li><strong>Flag</strong> your environments based on boolean semantics and use conditional logic or processing in your scripts or pipelines based on those flags. As an example, you might add a noMergeFromDownstream tag to some environments to allow environments to temporarily stop receiving automatic merges from downstream environments. In your scheduled upstream merge CI/CD pipeline, you would then exclude those environments from processing.</li></ul><h3>Using environment tags</h3><p>To take advantage of environment tags, you need to be using OrgFlow version 1.8.0 or later.</p><p>To manage tags on your environments, use the new <a href="https://docs.orgflow.io/reference/commands/env-tags-set.html">env:tags:set</a> and <a href="https://docs.orgflow.io/reference/commands/env-tags-delete.html">env:tags:delete</a> commands. Both commands allow you to set/delete multiple tags on multiple environments in a single command.</p><p>To see all tags on a given environment or to see a list of environments matching a given set of tags, use the <a href="https://docs.orgflow.io/reference/commands/env-list.html">env:list</a> command.</p><p>To use tags in your scripts and CI/CD pipelines, use the <a href="https://docs.orgflow.io/reference/commands/env-list.html">env:list</a> command. For simple filtering needs, you can use the --withTags argument of the <a href="https://docs.orgflow.io/reference/commands/env-list.html">env:list</a> command itself to list environments matching a given set of tags and then use a loop in your script to perform some set of actions on those environments.</p><p>For more advanced filtering needs, you can use the --output=json argument to include all environment tags in JSON output, allowing you to base custom filtering and processing logic on those tags. You can also use a combination of both.</p><p>For a full end-to-end example using GitHub Actions, take a look at the <a href="https://github.com/OrgFlow-Actions/demo/blob/main/.github/workflows/merge-production-to-sandboxes.yml">Merge production into all sandboxes</a> example workflow in our <a href="https://github.com/OrgFlow-Actions/demo">GitHub Actions demo template repository</a>. You’ll notice that this workflow automates a scheduled upstream merge only to environments tagged with the upstreamMergeTarget tag.</p><p>That’s a quick introduction to the new environment tags feature in OrgFlow 1.8.0. We hope and think you will find this feature very useful when designing and building your Salesforce DevOps pipelines, and we can’t wait to see what you build with it. As usual, if you have any questions or feedback, don’t hesitate to get in touch—you’ll find all the ways to contact us on <a href="https://www.orgflow.io/">our website</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1b865b8ef2b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/orgflow/introducing-tags-to-keep-your-salesforce-environments-organized-e1b865b8ef2b">Introducing Tags to Keep Your Salesforce Environments Organized</a> was originally published in <a href="https://medium.com/orgflow">OrgFlow</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Bitbucket, GitLab, Azure DevOps, (or something else) with Salesforce DevOps Center]]></title>
            <link>https://medium.com/orgflow/how-to-use-bitbucket-gitlab-azure-devops-or-something-else-with-salesforce-devops-center-d4a3891d7b4e?source=rss----d41bd1dc72bc---4</link>
            <guid isPermaLink="false">https://medium.com/p/d4a3891d7b4e</guid>
            <category><![CDATA[bitbucket]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Chris Payne]]></dc:creator>
            <pubDate>Thu, 23 Jun 2022 10:07:07 GMT</pubDate>
            <atom:updated>2022-06-23T10:07:07.065Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s finally here — the public beta of Salesforce DevOps Center. DevOps Center is Salesforce’s long awaited (and delayed) next generation deployment and DevOps tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c1mffUAo9W9_cFQP6833zg.png" /><figcaption>A screenshot of Salesforce DevOps Center.</figcaption></figure><p>I got hands-on with DevOps Center at TrailblazerDx ’22 and was lucky enough to talk in-depth with some of the team working on the product. One of the things that you’ll first notice is that DevOps Center only supports repositories in GitHub (and this does not include GitHub Enterprise Server). This is not an issue if you happen to use GitHub, but what if you use something else such as Bitbucket, GitLab, Azure DevOps, AWS Code Commit, Launchpad, a self hosted Git repository, or something else entirely?</p><h4>Why does Salesforce DevOps Center only support GitHub at launch?</h4><p>It comes down to two restrictions:</p><p>Firstly — DevOps Center runs ‘in the cloud’ (more specifically: a Heroku instance that the DevOps Center team maintain). This effectively rules out supporting Git repositories that are behind a firewall (such as an internal Git server or GitHub Enterprise Server. The only way that DevOps Center could communicate with these types of repository would be if rules were added to the firewall to allow traffic from the Heroku app itself. As far as I’m aware, Salesforce don’t publish the details that you’d need to enable this, and I wouldn’t expect support for this use case soon (if at all).</p><p>Secondly — The code that runs DevOps Center uses GitHub’s API to perform certain actions (such as creating a branch or a pull request). This API is specific to GitHub, and it can’t be used to perform these actions on other repository providers. In order to support another provider, Salesforce would have to build out support for the other provider’s APIs. This is problematic because it takes time and effort for the DevOps Center team to develop these integrations. Additionally — not all providers will support the required APIs, effectively ruling out support for those providers.</p><p>So, how can you run your Salesforce DevOps if you use a repository that is hosted outside of GitHub?</p><h3>Option 1 — Mirroring</h3><p>Mirroring is the action of taking the contents of one Git repository, and automatically copying it to another. There are a number of tools that can do this for you, and some Git repository providers have built in support (<a href="https://docs.gitlab.com/ee/user/project/repository/mirror/">GitLab for example</a>).</p><p>However, mirroring comes with a number of drawbacks:</p><ul><li>You still need a GitHub repository as your go-between</li><li>You need to spend time and effort on setting up and maintaining your mirroring solution</li><li>Most mirroring solutions won’t mirror pull requests</li><li>Your Salesforce users will still need GitHub accounts</li><li>Mirroring can cause conflicts that are hard to resolve</li></ul><h3>Option 2 — Switch to GitHub</h3><p>Moving an existing repository to GitHub is relatively straightforward, and if done correctly then you will be able maintain change history too.</p><p>Obviously this is not a small change for your organization, so you should consider all your options and the consequences before committing to this approach.</p><h3>Option 3 — Don’t use DevOps Center</h3><p>Salesforce DevOps Center is just one of many Salesforce DevOps tools available. You shouldn’t feel compelled to shoe-horn you DevOps process to fit DevOps Center, especially if that means making compromises.</p><p><a href="https://www.orgflow.io/home">OrgFlow</a>, for example, supports <strong><em>every </em></strong>Git provider that I know of (including on-premise Git repositories accessible only from within your corporate network).</p><p>It does this by:</p><p>Firstly — Giving you the option to run OrgFlow on premise. This means that OrgFlow can communicate with Git repositories that are within an internal network and not open to the internet. This also comes with a couple of other advantages such as keeping your Salesforce metadata processing within your internal infrastructure.</p><p>Secondly — Sticking to ‘pure’ Git commands, and not relying on any proprietary APIs from GitHub or any other provider. This means that we can support any Git repository and we don’t have to waste time building out support for new providers.</p><p>You can sign up for a <a href="https://www.orgflow.io/trial">two month free trial of OrgFlow</a>, and we have a <a href="https://www.orgflow.io/slack">Slack workspace</a> that you can join for help, tips and tricks.</p><h3>Final thoughts</h3><p>Salesforce DevOps Center is a good start in the right direction for many Salesforce teams. However, you should be sure that DevOps Center is the right choice for you before committing to it for your Salesforce DevOps. The limitations that this product imposes on your tooling and process may make Salesforce DevOps Center a non-starter for some teams.</p><p>There are a handful of other good Salesforce DevOps tools out there on the market, and you should find the one that best meets your needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4a3891d7b4e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/orgflow/how-to-use-bitbucket-gitlab-azure-devops-or-something-else-with-salesforce-devops-center-d4a3891d7b4e">How to use Bitbucket, GitLab, Azure DevOps, (or something else) with Salesforce DevOps Center</a> was originally published in <a href="https://medium.com/orgflow">OrgFlow</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing OrgFlow’s New Snapshots and Rollback Feature]]></title>
            <link>https://medium.com/orgflow/introducing-the-new-snapshots-and-rollback-functionality-in-orgflow-2b883ae4b7af?source=rss----d41bd1dc72bc---4</link>
            <guid isPermaLink="false">https://medium.com/p/2b883ae4b7af</guid>
            <category><![CDATA[rollbacks]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[salesforce-devops]]></category>
            <category><![CDATA[salesforce-deployment]]></category>
            <category><![CDATA[revert]]></category>
            <dc:creator><![CDATA[Daniel Rosenberg]]></dc:creator>
            <pubDate>Fri, 10 Jun 2022 16:13:06 GMT</pubDate>
            <atom:updated>2022-06-11T09:05:05.547Z</atom:updated>
            <content:encoded><![CDATA[<p>We’re very excited to announce that, starting with <a href="https://www.orgflow.io/download">version 1.6.0</a>, we have added long-awaited <strong>metadata rollback functionality</strong> to OrgFlow to help you recover from inadvertent loss of metadata.</p><p>The basic concept is simple: snapshots are created at key points during the lifetime of an OrgFlow environment, and because your Git repository contains your full metadata history, you can roll back the environment to any one of those snapshots.</p><p>Quite handy in those moments where you basically just need to turn back time a little bit.</p><figure><img alt="Marty McFly (Michael J. Fox) in front of the flying DeLorean time machine from Back To the Future" src="https://cdn-images-1.medium.com/max/1024/1*V3FywmhM8Hs2V-oktF79zQ.jpeg" /><figcaption>OrgFlow’s new rollback functionality: the flying DeLorean of Salesforce metadata.</figcaption></figure><p>There are many possible situations where you may find this useful. Here are two very common ones:</p><ul><li>Metadata has been deleted from an environment by mistake and now you want to recover it from Git history</li><li>A merge from one environment to another introduced too many deployment failures and now you’re looking to undo the merge and start over</li></ul><p>Let’s take a closer look at how this functionality works and how you would take advantage of it in your Salesforce DevOps process.</p><h3>Anatomy of a snapshot</h3><p>In OrgFlow an environment consists of three parts:</p><ol><li>Your Salesforce org (production or sandbox)</li><li>Your Git branch</li><li>The environment state that OrgFlow stores to keep track of undeployable components, last known parity points, etc.</li></ol><p>For a rollback to be effective and actually roll back your environment to a consistent state, all three of these parts must be rolled back together (though if you know what you’re doing, you can roll back only certain parts if needed in order to get out a jam — more on that later).</p><p>You can think of a snapshot as a point in an environment’s Git history where OrgFlow knew the Git branch and the Salesforce org to have <em>parity</em>, i.e. where all the metadata was identical except for any undeployable components at that point.</p><p>Technically a snapshot consists of a number, a descriptive title, a created date, the entire environment state as it was at that point in time, including the HEAD commit hash, any undeployable or temporarily excluded components, and so on. OrgFlow stores these snapshots and all their contents in our hosted state store in the cloud.</p><p>You can see the snapshots for a given environment by running the env:snapshot:list command like so:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e55fbb67668c7e5ec42ba7e45244b98b/href">https://medium.com/media/e55fbb67668c7e5ec42ba7e45244b98b/href</a></iframe><p>Each snapshot is automatically assigned a <em>snapshot number</em> when created. The snapshot number is continuously incrementing and unique only within a given environment (i.e. the same number may be used on a different snapshot in a different environment). This number is how you refer to the snapshot when rolling back an environment, or managing your snapshots.</p><h3>Creating snapshots</h3><p>OrgFlow automatically creates snapshots at certain times:</p><ul><li>When an environment is created</li><li>After each inbound flow</li><li>After each outbound flow</li><li>After each merge flow (for each inbound or outbound flow that happened during the merge flow)</li><li>After a rollback (more on that later)</li></ul><p>The title of the snapshot will reflect which of the above events caused the snapshot to be created.</p><p>We only create snapshots at these specific times, because these are the points where we know the environment to have parity. At any other point in time, the environment’s Git branch or Salesforce org may each be ahead of or behind the other, and creating a snapshot at such a time would not be useful because a rollback would reset your Salesforce org to a state it wasn’t actually in at the time.</p><p>For that reason, you also cannot create your own snapshot at will — there is no env:snapshot:create command or similar.</p><p>Since version 1.5.0 of OrgFlow, these snapshots have been silently created in the background. Now in version 1.6.0 we are exposing this functionality and adding commands to let you interact with snapshots in meaningful ways.</p><h3>Managing snapshots</h3><p>To let you see and manage your snapshots, we have added two new commands in the env:snapshot namespace:</p><ul><li>env:snapshot:list (<a href="https://docs.orgflow.io/reference/commands/env-snapshot-list.html">docs</a>) shows you a list of available snapshots for a given environment.</li><li>env:snapshot:delete (<a href="https://docs.orgflow.io/reference/commands/env-snapshot-delete.html">docs</a>) lets you delete one or more numbered ranges of snapshots to keep things tidy over time.</li></ul><h3>Rolling back an environment</h3><p>So far we have not seen how to actually use the snapshots for anything meaningful, so let’s get to that finally. We’ve added the env:rollback command (<a href="https://docs.orgflow.io/reference/commands/env-rollback.html">docs</a>) to let you roll back an environment to a snapshot of your choosing.</p><p>You run the env:rollback command like this:</p><pre><strong>$</strong> orgflow env:rollback --environment=UAT --toSnapshot=13</pre><p>The overall process goes something like:</p><ol><li>Run the env:snapshot:list for the environment, to see which snapshots are available.</li><li>Choose your snapshot very carefully, keeping in mind that anything that happened in your Salesforce org <strong>and</strong> its backing Git branch will be wiped out forever.</li><li>For some added safety, consider creating a copy of the environment’s backing Git branch in your repository as a backup, so you have some way of recovering the metadata that was rolled back.</li><li>Run the env:rollback command and watch the magic</li></ol><p>OrgFlow will do the following:</p><ul><li>Revert the Git branch to the commit hash of the chosen snapshot</li><li>Revert the environment state</li><li>Perform an outbound flow to also revert the Salesforce org accordingly</li><li>Record any deployment failures as new undeployable components</li><li>Create a new snapshot (because the environment state may now be a bit different from the snapshot you’re rolling back to as external factors could cause a different set of deployment failures)</li></ul><h3>Advanced options (don’t try at home, kids)</h3><p>The env:rollback command also has a couple of advanced options that can help get you out of the kinds of trouble we’ve not even been able to anticipate while building out this feature.</p><ul><li>--noGitRollback skips reverting the Git branch</li><li>--noSalesforceRollback skips doing the outbound flow (i.e. leaves the Salesforce org untouched by the rollback)</li></ul><p>Specifying both of these options will revert only the state store, but make no change to either Git or Salesforce.</p><p><strong>These options should only be needed in very rare circumstances</strong>, either in situations where you’re manually altered the environment state or your Git repository in ways that OrgFlow cannot handle (e.g. force push is always a sure-fire way to get in trouble), or possibly in cases where the OrgFlow process was forcibly terminated at some inopportune moment to leave an environment in an inconsistent state.</p><p>That was a quick introduction to the recently added snapshots and rollback functionality in OrgFlow. We hope you’ll find this functionality useful and that it may some day help get you out of a tough spot. :)</p><p>Don’t take our word for it — try it out for yourself and see OrgFlow’s snapshots and rollback feature in action. Find out more about OrgFlow on <a href="https://www.orgflow.io/">our website</a>, or jump straight in and <a href="https://www.orgflow.io/download">download it today</a>. OrgFlow is free to try for 2 months — no usage limits, no strings attached, no credit card or billing information required.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b883ae4b7af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/orgflow/introducing-the-new-snapshots-and-rollback-functionality-in-orgflow-2b883ae4b7af">Introducing OrgFlow’s New Snapshots and Rollback Feature</a> was originally published in <a href="https://medium.com/orgflow">OrgFlow</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 Things I Learned About Salesforce DevOps at DevOps Dreamin’ 2022]]></title>
            <link>https://medium.com/orgflow/3-things-i-learned-about-salesforce-devops-at-devops-dreamin-2022-ed103673c0a6?source=rss----d41bd1dc72bc---4</link>
            <guid isPermaLink="false">https://medium.com/p/ed103673c0a6</guid>
            <category><![CDATA[orgflow]]></category>
            <category><![CDATA[salesforce-devops]]></category>
            <category><![CDATA[devops-dreamin]]></category>
            <dc:creator><![CDATA[Chris Payne]]></dc:creator>
            <pubDate>Wed, 06 Apr 2022 14:49:05 GMT</pubDate>
            <atom:updated>2022-04-06T14:58:23.089Z</atom:updated>
            <content:encoded><![CDATA[<p>We launched <a href="https://www.orgflow.io/?utm_source=medium&amp;utm_medium=blog-post&amp;utm_content=DevOps+Dreamin+2022">OrgFlow</a> to the general public at the end of 2021. We’ve been working on the product since 2019, using it internally since 2020, and were running private/closed betas for a few months too.</p><p>Before launch, we were tracking the Salesforce DevOps landscape as ‘outsiders’; keeping our hands close to our chest. We knew we had some fresh and original ideas, but we couldn’t tell anybody about them just yet.</p><p>That’s why it was so good to finally be able to attend a conference in person, be able to speak about our product and ideas in an open forum, and hear from a wide range of people at varying stages in their Salesforce DevOps processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b9SSi0303CDfsy1czx1Q2Q.jpeg" /><figcaption>Representing OrgFlow at DevOps Dreamin’ 2022</figcaption></figure><p>So without further ado, here’s my top three takeaways from DevOps Dreamin’ 2022:</p><h4>1. DevOps seems to be accepted by a wide range of people and companies</h4><p>The first thing that stood out to me after speaking to a few people was the variety of companies and roles that these people were in.</p><p>There were admins, architects, developers, managers, business analysts and everything in-between. They were also employed in a variety of different industries and a variety of different company sizes — from single person consultancy firms all the way up to multi-national household names.</p><p>But they all had one thing in common — a strong understanding of what Salesforce DevOps entails, and a strong desire to get their company to that point.</p><h4>2. Salesforce DevOps still has a long way to go</h4><p>I personally come from a more traditional software development background. I had been doing that for almost ten years before I dived into the Salesforce world, and the thing that stood out to me at the time was that Salesforce DevOps was pretty much non existent.</p><p>Traditional software development DevOps was lightyears ahead of anything that you could do with Salesforce, thanks in part to popular tools such as Team Foundation Server, Jenkins and TeamCity.</p><p>Salesforce DevOps has of course come on a long way since then, but so too have traditional DevOps platforms (including a whole host of new DevOps tools and platforms such as Azure DevOps and GitHub Actions).</p><p>I am of the opinion that Salesforce DevOps tools such as Gearset, Copado, Flosum, and even Salesforce’s very own DevOps Center will fail to be able to reach feature parity with these well established traditional DevOps platforms.</p><h4>3. People want to make changes in production</h4><p>A recurring claim that I heard from a number of speakers was along the lines of:</p><blockquote>You shouldn’t make any changes in production, all changes in production are bad</blockquote><p>I don’t agree. And a lot of attendees that I spoke to don’t agree either. We all have business cases where it just makes more sense to make small changes in production.</p><p>Now, I’m not saying that <em>all </em>changes can be made in production, but I am saying that as a company, you should be able to <em>decide </em>what you <em>allow to be changed in production</em>, and what you don’t allow to be changed in production.</p><p>To get to the point where you can allow changes to be made to production, I think you need three things in place:</p><ol><li>A well defined policy that sets out when it is acceptable to make a change in production, and what metadata types it is acceptable to change in production. (If you can enforce this with profiles and permissions then even better.)</li><li>The ability to frequently test your production org. Depending on the size of your org you might need a series of automated tests that can run on a schedule or trigger (but you’d have this already as part of your DevOps workflow, right?).</li><li>The ability to commit these changes to your Git repository and <strong><em>merge</em></strong> them with any other changes that might have been made elsewhere.</li></ol><h4>Bonus thing that I learned: Chicago is a great city!</h4><p>Seriously, if you ever get the chance to go, you should take it. We were there for a full week and there was so much to see and do that we weren’t able to fit it all in in the time that we had.</p><h3>Where does OrgFlow fit in with all of this?</h3><p>As I said earlier: Salesforce DevOps has a long way to go compared to traditional DevOps. That’s why OrgFlow acts as the glue between your Salesforce org and traditional DevOps platforms such as GitHub Actions, Azure DevOps, TeamCity, and more. This bridges the feature gap and allows you to take advantage of well accepted, well tested, and well documented platforms in order to run your Salesforce DevOps process.</p><p>We support (and even encourage) making changes in production, and our smart merging algorithm is able to merge these changes back into your Git repository and sandboxes.</p><p>You can try OrgFlow for free by <a href="https://www.orgflow.io/trial?utm_source=medium&amp;utm_medium=blog-post&amp;utm_content=DevOps+Dreamin+2022">getting a trial license</a>. We also have a <a href="https://www.orgflow.io/slack?utm_source=medium&amp;utm_medium=blog-post&amp;utm_content=DevOps+Dreamin+2022">Slack workspace</a> where we encourage any questions that you might have. If you’re interested in using GitHub Actions for your Salesforce DevOps, then be sure to check out our <a href="https://github.com/OrgFlow-Actions/demo">template repository</a> that can get you up and running in as little ad 5 minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*URZxgTgXJ4UW6dnArPhCew.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed103673c0a6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/orgflow/3-things-i-learned-about-salesforce-devops-at-devops-dreamin-2022-ed103673c0a6">3 Things I Learned About Salesforce DevOps at DevOps Dreamin’ 2022</a> was originally published in <a href="https://medium.com/orgflow">OrgFlow</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Your Existing CI/CD Platform to Automate Your Salesforce Apex Test Execution]]></title>
            <link>https://medium.com/orgflow/how-to-use-your-existing-ci-cd-platform-to-automate-your-salesforce-apex-test-execution-8f4d4ca50fa3?source=rss----d41bd1dc72bc---4</link>
            <guid isPermaLink="false">https://medium.com/p/8f4d4ca50fa3</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[apex]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <dc:creator><![CDATA[Chris Payne]]></dc:creator>
            <pubDate>Tue, 18 Jan 2022 12:16:17 GMT</pubDate>
            <atom:updated>2022-01-18T12:16:17.122Z</atom:updated>
            <content:encoded><![CDATA[<p>We’ve all been there before — your urgent Salesforce deployment is failing because an Apex test is not passing. And what’s worse — the test was not even passing before your deployment, meaning that someone else’s change is causing the test to fail.</p><p>But why has no one yet noticed that this test is failing?</p><p>The reason is because Apex test execution in Salesforce is almost always a manual task. You can either manually run Apex tests, or you can wait until someone is manually deploying changes to run them.</p><p>To make matters worse, even changes made by no-code users can cause Apex tests to start failing. Imagine a test that creates an account — what happens if a no-code user user updates a validation rule on the account object? The test can no longer create the account due to a validation rule failure, so the test can now no longer pass.</p><p>OK, so what’s the best way to handle this?</p><p>To answer this question, we have to take a step back and ask “Why is this a problem with Salesforce, and not a problem with other development platforms and languages?”.</p><p>And the answer to that question is simple — most other software development platforms and languages allow you to set up checks and gates that can catch failures early and prevent them from entering the code base. In the case of tests — it would be common for a software development team to use a CI/CD platform such as GitHub Actions, Jenkins, Azure DevOps or TeamCity to automatically run all of your tests on a nightly basis and catch failing tests early. The earlier you can catch a failing test, the more time you have to fix it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bpXV5N6ogSxt6ecVl9eUzA.png" /><figcaption>Azure DevOps’s test results page. Most CI/CD platforms are really good at visualising test results — including reporting on failures, showing when tests started failing, and integrating with ticketing systems to allow you to create bugs or issues off the back of test failures.</figcaption></figure><p>OK, so back to the original question — what’s the best way to handle this?</p><p>The answer should be obvious — run your tests frequently, catch failures early, and fix them quickly.</p><p>In this guide, I’m going to show you how to use <a href="https://www.orgflow.io/?utm_source=medium&amp;utm_medium=blog-post&amp;utm_content=How+to+use+your+existing+CI%2FCD+platform+to+automate+your+Salesforce+Apex+test+execution">OrgFlow</a> to do exactly that.</p><p>There’s a load of CI/CD platforms out there, and your company probably already utilizes at least one of them. OrgFlow is a true CI/CD tool for Salesforce that acts as the glue between Salesforce and your CI/CD platform of choice.</p><p>Sure, we could use another Salesforce DevOps tool such as Gearset, Copado, or Click Deploy to schedule test execution, but none of them give us the deep integration into your CI/CD platform of choice that OrgFlow does.</p><p>We’ll be using GitHub Actions in this guide, but the same patterns and techniques will work for any popular CI/CD platform. So long as it allows you to schedule script-based jobs, you can probably use it to run OrgFlow.</p><p>What you’ll need:</p><ul><li>A username and password for a Salesforce org (plus a <a href="https://help.salesforce.com/s/articleView?id=sf.user_security_token.htm&amp;type=5">Security Token</a> if your org requires them)</li><li>A GitHub account</li><li>A license key for OrgFlow. If you don’t already have one, <a href="https://www.orgflow.io/trial?utm_source=medium&amp;utm_medium=blog-post&amp;utm_content=How+to+use+your+existing+CI%2FCD+platform+to+automate+your+Salesforce+Apex+test+execution">we offer a free trial to help you get started</a>.</li></ul><h4>Step 1 — Configure your repository</h4><p>GitHub actions run within a repository. Usually this would be the same repository that contains your code, but for the purposes of this article, let’s just create a new repository. (It’s worth pointing out that OrgFlow can commit your metadata to a repository and also deploy it from your repository to your Salesforce org, but that’s outside the scope of this article.)</p><p>Once you’ve created your new repository, we’ll add some secrets to it to store your Salesforce credentials and OrgFlow license key.</p><p>Add the following secrets:</p><ul><li>ORGFLOW_LICENSEKEY — Your OrgFlow license key</li><li>SALESFORCE_USERNAME — The username that OrgFlow should use to authenticate with your Salesforce org</li><li>SALESFORCE_PASSWORD — The password that OrgFlow should use to authenticate with your Salesforce org. If your org also requires a <a href="https://help.salesforce.com/s/articleView?id=sf.user_security_token.htm&amp;type=5">Security Token</a>, then you should append this to the end of your password (e.g. &lt;password&gt;&lt;security-token&gt;)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJhso-6FyfEBkWp2B-A5BA.png" /></figure><h4>Step 2 — Add a workflow</h4><p>Next, click the Actions tab and click to create a “simple” or “blank” workflow. This will open the workflow editor to allow you to create a new workflow file in your repository.</p><p>Paste in the following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/79fcf98ba390fa7bc49397011c9b6cda/href">https://medium.com/media/79fcf98ba390fa7bc49397011c9b6cda/href</a></iframe><p>Let’s go through that line by line to make sure we understand what it all does:</p><ul><li>Line 1: Set a name for the workflow.</li><li>Lines 3–6: Define the triggers for the workflow. There’s a schedule which will automatically start the workflow at 2:30 a.m. UTC every day, and there’s a workflow_dispatch which allows you to manually start the workflow.</li><li>Lines 8 &amp; 9: Sets the permissions that allows the workflow to write the test results to the output.</li><li>Line 11 &amp; onwards: Defines the jobs to be executed as part of the workflow (in this case, there’s only a single job):</li><li>Line 12: Defines a job called run-tests.</li><li>Lines 13–18: Defines the agent that will run this job. In this case we’re asking for a Ubuntu agent that is running the orgflow/cli Docker image. We’re also accepting the OrgFlow EULA and setting our license key here.</li><li>Line 20 &amp; onwards: Defines the steps that this job will execute. In this case there are two:</li><li>Lines 21–23: Defines a step called Run Salesforce Tests. This step uses OrgFlow to run the tool:test command, passing your Salesforce username and password, and also setting a location for the test results to be outputted to.</li><li>Lines 24–28: Defines a step called Publish test results. This step utilizes a third party action from the GitHub Actions Marketplace to take the test results file that the previous step created and then publish the contents of it in a human readable format to GitHub.</li></ul><p>Now that we understand what the workflow will do, let’s commit and run it. Click the Start commit button to commit the workflow file to your repository.</p><h4>Step 3 — Run the workflow</h4><p>Go back to the Actions tab, select the Runs Salesforce Tests workflow from the list on the left, open the Run workflow drop down and then click the Run workflow button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DtmD_2sprIukwGSB2_5DbA.png" /></figure><p>This will start your workflow. If all is well, OrgFlow will run your Salesforce tests, and then the third party action that we added will publish the test results to GitHub.</p><p>It’s worth noting that by default, OrgFlow will fail your workflow if any tests fail to pass. This behavior is configurable, but that’s out of the scope of this article. If this happens, it might look like your workflow has failed, but rest assured that it has ran all the tests and published the results as expected.</p><p>The third party action that we are using to publish the test results to GitHub will add a section to the workflow’s output with the test results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rb42DkU1P6L3fdkWJtwxzw.png" /></figure><p>Of course, there are a few different third party actions that can publish test results. So if you do not like the way that this action publishes them, you are free to find another and swap it out.</p><h3>Troubleshooting</h3><p>The most common error message you might encounter is <strong><em>LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, password, security token; or user locked out. Are you at a new location?</em></strong>. This is a message from Salesforce that means that OrgFlow is not able to authenticate to Salesforce with the credentials provided. The most common cause of this is forgetting to append your <a href="https://help.salesforce.com/s/articleView?id=sf.user_security_token.htm&amp;type=5">Security Token</a> to the end of your password when setting the SALESFORCE_PASSWORD secret.</p><h3>Key takeaways</h3><p>OrgFlow allows you to automate your Salesforce DevOps using standard CI/CD platforms that your team is probably already using and familiar with.</p><p>In this article, we looked at automating test execution, but OrgFlow can also manage your metadata backups, deployments, and even merge metadata from one Salesforce org to another.</p><p>One of the major advantages of using standard CI/CD platforms for your Salesforce DevOps are the deep integrations and large ecosystems already available. OrgFlow doesn’t box you in to a particular web-based UI — you are free to use the best tool for your team. And using standard CI/CD tasks that are not specific to Salesforce gives you much more choice and freedom. If you don’t like the way that tests results are rendered then you can simply swap that part out for another third party action.</p><p>OrgFlow is a true git-based DevOps tool for Salesforce. We offer deep integration into almost all CI/CD platforms, and we’re currently offering a <a href="https://www.orgflow.io/trial?utm_source=medium&amp;utm_medium=blog-post&amp;utm_content=How+to+use+your+existing+CI%2FCD+platform+to+automate+your+Salesforce+Apex+test+execution">two month free trial</a> so that you can get to grips and explore all the features that we offer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f4d4ca50fa3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/orgflow/how-to-use-your-existing-ci-cd-platform-to-automate-your-salesforce-apex-test-execution-8f4d4ca50fa3">How to Use Your Existing CI/CD Platform to Automate Your Salesforce Apex Test Execution</a> was originally published in <a href="https://medium.com/orgflow">OrgFlow</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Applying the Eventual Consistency Model to Salesforce DevOps]]></title>
            <link>https://medium.com/orgflow/applying-the-eventual-consistency-model-to-salesforce-devops-6a329daf6e5e?source=rss----d41bd1dc72bc---4</link>
            <guid isPermaLink="false">https://medium.com/p/6a329daf6e5e</guid>
            <category><![CDATA[branching-strategy]]></category>
            <category><![CDATA[salesforce-deployment]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[eventual-consistency]]></category>
            <category><![CDATA[salesforce-devops]]></category>
            <dc:creator><![CDATA[Daniel Rosenberg]]></dc:creator>
            <pubDate>Wed, 22 Dec 2021 14:54:45 GMT</pubDate>
            <atom:updated>2021-12-22T14:54:45.270Z</atom:updated>
            <content:encoded><![CDATA[<p>When we talk and write about <a href="https://www.orgflow.io/">OrgFlow</a>, we often refer to our <em>eventual consistency </em>based approach<em> </em>to Salesforce DevOps. While this term neatly sums up a big part of what makes OrgFlow unique, it’s not exactly self-explanatory.</p><p>I mentioned this term in <a href="https://blog.orgflow.io/introducing-orgflow-true-git-based-devops-for-salesforce-c5b169a94a71">our previous article</a>, and promised a more detailed explanation on the topic.</p><p>So as promised, in this article we will do a deep dive into the ideas behind OrgFlow’s innovative eventual consistency based approach to Salesforce DevOps, and explore how it enables a simpler and more automatic, self-healing deployment process that makes Salesforce DevOps easier, faster and safer.</p><h3>Comparing Salesforce orgs to Git branches</h3><p>In any non-trivial software development context, <em>development in isolation</em> is a critical component. Isolation in this context means the production environment remains unaffected by developers’ changes until they have been completed, properly tested and are ready to go live. Isolation also means that multiple developers on multiple teams can simultaneously work on multiple features, without affecting or disturbing each others’ efforts.</p><p>For org-based development, Salesforce uses <em>sandboxes</em> to facilitate development in isolation. Most other development platforms use <em>branches</em> — in Git or in a similar version control system — to facilitate this. Let’s talk a bit about the similarities and differences between sandboxes and branches.</p><p>Consider the lifecycle of a Salesforce sandbox. From a metadata standpoint, every sandbox is created as a clone of your production org — either directly from production, or indirectly from another sandbox which was itself created as a clone of your production org.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CAsJ6Rzlz9-UQEdN_cBLng.png" /><figcaption>Lifecycle of a Salesforce sandbox</figcaption></figure><p>Once created, the sandbox naturally starts to <strong>diverge</strong> from the production org, either because changes are made in production, or because changes are made in the sandbox, or both.</p><p>Each org in your Salesforce account (production as well as sandboxes) is a representation of the same metadata code base. At any point in time, each org may contain a different <strong>version</strong> of the same metadata code base, but they are still conceptually the same code base. The divergence is temporary; there is an implicit expectation that the orgs will, at some point in the future, once again <strong>converge</strong>, either through deployments or sandbox refresh operations.</p><p>This is very similar to Git works. A <em>repository</em> is a container for a single code base, in some programming language. The repository can have multiple <em>branches</em> which are temporarily diverging versions of that single code base. Each branch is created as an alternate version of your main branch, either directly or indirectly. Branches are typically not expected to exist forever. There is an expectation that they eventually converge, by means of <em>merge</em> operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uaUBdOjBK55ho8Dz7HiHFA.png" /><figcaption>Lifecycle of a Git branch</figcaption></figure><p>As you can see, Salesforce sandboxes and Git branches are quite similar at a conceptual level. But Git branches have some important features that Salesforce sandboxes lack:</p><ul><li>For every branch, Git has a full detailed historical record of changes, to every line of every source file.</li><li>Using this history, Git knows the exact point in time when any given file started diverging, and exactly what that file contained at that point.</li><li>Using this knowledge, Git can perform a three-way merge operation to understand what changed where.</li><li>Using this understanding, when merging one branch into another, Git can automatically merge any changes that are not in conflict with one another (for example because they happened on different lines). And just as important, Git can detect when changes <strong>do</strong> conflict, such as when the same line in the same file was changed in two different ways.</li></ul><p>This translates to some big differences in functionality.</p><p>In Git, a merge from one branch into another is completely safe. No change is forgotten because Git has a record of every change, so all changes to all files are always merged. And nothing gets overwritten by mistake because Git detects any conflicts and prompts the user to resolve them.</p><p>In Salesforce, by contrast, a deployment from one org to another using a change set is basically a blind partial copy-paste operation. The user has to know which components were changed, and must remember to include them in the change set. And if one of those components was also changed in the target org, that other change will be lost, overwritten by the change set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8JkPFHfHuWLVYtwxWpzzfQ.png" /><figcaption>Git merge vs. Salesforce deployment comparison</figcaption></figure><p>OrgFlow brings all the advantages of Git branches described above, to Salesforce sandboxes, by acting as the “glue” that integrates Salesforce with Git. Your Salesforce metadata is mirrored in a Git repository. Each Salesforce org (production or sandbox) mirrored in a branch in that repository, and OrgFlow keeps each org and its Git branch in sync as an <em>environment</em>. Metadata changes flow through Git and are merged between branches, instead of deployed directly between Salesforce orgs.</p><h3>Eventual consistency</h3><p>Eventual consistency is a general computer science concept, used to describe an architectural principle for propagating data changes throughout a distributed system. It’s not typically used in the context of Salesforce metadata deployments, but nevertheless, it is a very appropriate term to describe how OrgFlow approaches the propagation of metadata changes between Salseforce orgs.</p><p>To paraphrase from <a href="https://en.wikipedia.org/wiki/Eventual_consistency">Wikipedia</a>:</p><blockquote><strong>Eventual consistency</strong> is a consistency model used in distributed computing that informally guarantees that, if no new updates are made to a given data item, <strong>eventually</strong> all accesses to that item will return the last updated value. Eventual consistency is widely deployed in distributed systems, and has origins in early mobile computing projects. A system that has achieved eventual consistency is often said to have <strong>converged</strong>.</blockquote><p>The term, such as it is, describes pretty accurately how OrgFlow functions.</p><p>But besides that, the two words also highlight two contrasts between OrgFlow and other tools. “Eventual” because unlike other tools, OrgFlow does not required that the desired result be 100% achieved immediately. “Consistency” because whereas other tools focus on pick-and-choose deployments, OrgFlow actually strives for full consistency across environments.</p><p>Let’s look at each aspect in a bit more detail, starting with the latter.</p><h4>The “consistency” part</h4><p>As we discussed in the previous section, Git strives for full consistency across a repository. A merge operation in Git takes <strong>all</strong> the changes (technically all <em>commits</em>) from one branch and integrates them into another. There is no way in Git to merge just <strong>some</strong> of the commits, or just <strong>some</strong> of the files, because that would break the linked chain of commits and likely yield an inconsistent result with uncompilable code. (There is a feature called <em>cherry-picking</em> in Git, but it‘s only used in very advanced cases where you intend to discard the source branch.)</p><p>In most development platforms outside the realm of Salesforce, where Git is standard practice, this “all-or-nothing” notion of consistency is accepted almost as an axiom.</p><p>Developers who use Git typically always strive to keep the branches from diverging too much (by continuously integrating them using forward merge operations) and to keep the lifetime of branches short (by merging changes downstream as soon as they are ready to be integrated). By integrating early and often, developers avoid big complicated merge operations with lots of difficult-to-resolve conflicts.</p><p>Yet in the Salesforce ecosystem — even among teams who do use Git-based version control and practice DevOps — pick-and-choose deployments, resulting in <strong>partial consistency</strong> at best, are more often the norm:</p><blockquote>“We need tight control over what goes into a deployment”</blockquote><p>Traditionally, Salesforce teams either manually record the changes they want to keep so they can be included in a deployment later, or they base their deployments and Git commits on some form of visual compare from which they pick what to deploy.</p><p>But trying to be selective about what you deploy is a source of failures, because things depend on other things. Some tools, such as Gearset, try to compensate for this by using elaborate dependency tracing, deployment validation warnings and tweaks — and they do a good job at it. However, changing a deployment payload “in transit” means that, after deployment, the environments are out of sync, which leads to more work and other potential issues down the road.</p><p>We believe Salesforce development should be no different in this regard from Git-based development on other platforms — after all, it all comes down to (metadata) source code in branches in Git repository. We believe the Salesforce DevOps workflow functions much better if it’s designed like a standard Git workflow and embraces the notion of consistency.</p><p>OrgFlow enables this type of workflow for Salesforce. By default, when you ask OrgFlow to flow metadata changes between Salesforce and Git, or between different environments, OrgFlow uses standard Git functionality to do it, which means all detected changes are flowed and full consistency is the goal. As an example: if you merge from sandbox A into production, and then from production into sandbox A, then the metadata in the two environments will be identical (except for any <em>undeployable components; </em>more on those later on).</p><p>The workflow is not quite as rigid as it sounds, however:</p><p>Firstly, not all changes made in a sandbox need to be kept and merged downstream. Some changes are made unintentionally, others as part of experimentation. OrgFlow does in fact support a visual comparison view when flowing changes from an org into its Git branch, where you can selectively exclude such changes and have OrgFlow revert them to reestablish consistency between environments:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hP-_4UemjJBTyQC0L4fmKg.png" /><figcaption>OrgFlow lets you selectively exclude changes detected in an a Salesforce org</figcaption></figure><p>Secondly, you choose which subset of your metadata OrgFlow manages in the first place, by configuring the contents of the .orgflowinclude file in the root of your Git repository. This configuration is very powerful and flexible, and allows you to include/exclude metadata at package, namespace, type or component name levels, with full support for glob patterns and wildcards on all levels. Any metadata ultimately covered by your include file will be included in change detection and flow; all other metadata is ignored and untouched by OrgFlow.</p><h4>The “eventual” part</h4><p>In the Salesforce deployment engine and metadata API, deployments are essentially a transactional operation, in the sense that a deployment is either completely successful, or completely unsuccessful (rolled back). There is actually a flag in the API meant to allow partially successful deployments, but for the vast majority of deployment payloads, this flag does not work as intended. And even if you could do a partial deployment, what would you then do with the changes that could not be deployed?</p><p>This all-or-nothing restriction is naturally reflected in change sets, as well as in all third-party Salesforce deployment and DevOps tools, which all utilize the metadata API. As a result, Salesforce professionals have learned for years to think of a deployment as an operation that must be very tightly controlled and validated to ensure it will succeed in its entirety:</p><blockquote>“Every deployment needs to be 100% successful”</blockquote><p>This is probably the main reason why Salesforce teams try to limit deployments to contain as few components as possible, and why existing tools encourage them to do so. It’s also the reason why some tools (most notably Gearset) go out of their way to validate the deployment payloads and ensure maximum chance of success for every component.</p><p>When we first started sketching out OrgFlow on a whiteboard, we had already been pondering the idea for a while, for a different and much more efficient approach:</p><p>Couldn’t we build a deployment tool that tries to deploy everything, records any failures reported by the API, and then retries the deployment again without the failing components, and keeps retrying until it reaches a successful deployment? And couldn’t such a tool keep track of the failed components and use the Git commit graph to keep the changes inside them safe while still allowing them to be updated and fixed, and while keeping them up-to-date with changes from elsewhere?</p><p>Such an approach would remove the need for Salesforce teams to be so “surgical” when choosing deployment contents, and instead allow a more automated workflow that strives to <strong>eventually</strong> achieve full consistency between environments.</p><p>We designed and built OrgFlow around this approach. The result: A simpler and more automatic, self-healing deployment process that makes Salesforce DevOps easier, faster and safer, and lets teams spend less time thinking about deployment concerns.</p><p>Armed with this new approach, we can begin to challenge some of the conventional wisdom. Deployment errors happen — they are a fact of Salesforce life. The following may sound a bit radical: they don’t always have to be painstakingly avoided at all cost.</p><p>In OrgFlow, a deployment is not a one-time all-or-nothing operation. Instead, OrgFlow continuously strives to achieve consistency between your environments <strong>over time</strong>. OrgFlow keeps track of undeployable components as a first-class concept in a state store, and knows how to keep them safe and up-to-date using clever branching techniques behind the scenes. If one or more components fail in one deployment, it’s not the end of the world: they can either be fixed later and included in the next sync, or you can choose to ignore them. It’s ok.</p><p>And in case you’re wondering: You don’t have to wait until after a deployment to find out how much of the changes could be deployed. OrgFlow fully supports a “check only” mode where the same repeat algorithm is used, but where each deployment is a validation deployment only and the merged metadata is not pushed back into your repository. If you decide that enough of your changes were successfully deployed, and whatever components failed can either be deployed later or safely ignored, then you can proceed to perform a real deployment.</p><h3>Summary</h3><ul><li>Deployments in Salesforce and other third-party tools are traditionally an all-or-nothing operation</li><li>Teams have therefore had to be very selective about deployment contents, which has made it impractical to strive for full consistency</li><li>OrgFlow introduces a new workflow based on <strong>eventual consistency</strong></li><li>Using this approach, deployments no longer need to be 100% successful every time; failed components are automatically excluded and can be fixed and retried in a later deployment (or ignored if desired)</li><li>As a result, Salesforce teams can adopt a workflow more similar to standard Git-based workflows common in other development platforms, and spend less time on deployment concerns</li></ul><p>Don’t take our word for it — try it out for yourself and see OrgFlow’s eventual consistency approach in action. Find out more about OrgFlow on <a href="https://www.orgflow.io/">our website</a>, or jump straight in and <a href="https://www.orgflow.io/download">download it today</a>. OrgFlow is free to try for 2 months — no usage limits, no strings attached, no credit card or billing information required.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a329daf6e5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/orgflow/applying-the-eventual-consistency-model-to-salesforce-devops-6a329daf6e5e">Applying the Eventual Consistency Model to Salesforce DevOps</a> was originally published in <a href="https://medium.com/orgflow">OrgFlow</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing OrgFlow — True Git-based DevOps for Salesforce]]></title>
            <link>https://medium.com/orgflow/introducing-orgflow-true-git-based-devops-for-salesforce-c5b169a94a71?source=rss----d41bd1dc72bc---4</link>
            <guid isPermaLink="false">https://medium.com/p/c5b169a94a71</guid>
            <category><![CDATA[salesforce-deployment]]></category>
            <category><![CDATA[salesforce-devops]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[salesforce-ci-cd]]></category>
            <dc:creator><![CDATA[Daniel Rosenberg]]></dc:creator>
            <pubDate>Sun, 12 Dec 2021 18:30:41 GMT</pubDate>
            <atom:updated>2022-06-10T16:30:03.451Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introducing OrgFlow — True Git-based DevOps for Salesforce</h3><p>Welcome to the very first article in our brand new publication about Salesforce DevOps in general, and our new product <a href="https://www.orgflow.io/">OrgFlow</a> in particular. My name is Daniel Rosenberg and I’m the managing director of OrgFlow, which is a relatively new company that I co-founded together with my partner Chris Payne in early 2020.</p><p>Our mission as a company is to try and change the way Salesforce teams think about DevOps and deployments, into something that more resembles the practices and techniques that are commonplace in the rest of the software engineering industry today.</p><p>Salesforce professionals have learned over the last 5–10 years to think of deployment and DevOps a bit differently from those working with other platforms, mainly because of limitations in available tooling. We want to challenge some of those conceptions by introducing new tooling that enables a new type of workflow.</p><p>In this article we will explain why the Salesforce ecosystem needs an entirely new DevOps tool, and why we decided to build it.</p><h3>Deployments in Salesforce</h3><p>It’s not a secret, so I’ll just say it: although Salesforce is a very powerful and customizable platform, when it comes to <strong>versioning and deploying</strong> those customizations, Salesforce leaves a lot to be desired. For traditional org-based development (i.e. not package-based development) Salesforce gives customers a few things out of the box:</p><ol><li>The SOAP-based <strong>metadata API</strong>, through which metadata customizations can be retrieved and deployed.</li><li><strong>Change sets</strong> (built on top of the metadata API) which allow you to pick a set of components in one Salesforce org and essentially copy-paste them into another Salesforce org.</li><li>The <strong>Salesforce CLI</strong> which is capable of retrieving and deploying metadata to and from a local directory using the metadata API, as long as you tell it exactly which components to retrieve and deploy.</li><li>Recently, a <strong>source tracking API</strong> has been added to the mix, which allows you to query a sandbox for a list of metadata components that have been changed during a given timeframe.</li></ol><p>And that’s pretty much it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bohGlOI0ItM8owu6VSwiJw.png" /></figure><p>Now, if you are a developer or DevOps engineer with any amount of experience from other modern development platforms, languages and tools, you will quickly notice that some things are mysteriously missing. Unlike most other platforms, the built-in development and deployment story in Salesforce has no concepts of:</p><ul><li>change detection</li><li>branching</li><li>merging</li><li>pull requests or similar review functionality</li><li>conflict detection and resolution</li><li>version history</li></ul><p>As a result, if you’re using the built-in functionality of the platform, not only do you need to <strong>remember and manually identify every component</strong> your developers and admins changed in order to include it in a deployment; more importantly, if you develop in more than a single environment, every deployment also <strong>risks overwriting one set of changes with another</strong>. Not to mention how tedious and error-prone the process is, or how quirky and unpredictable the metadata retrieval and deployment engine can be.</p><p>When our team first got into the area of Salesforce DevOps, we came at it from two different backgrounds:</p><p>On the one hand, we had many years of experience doing contract work around DevOps, software development and architecture on other platforms. Industry-standard version control, automation and deployment techniques had been second-nature to us for a long time.</p><p>On the other hand, we had just spent a year-long project doing Apex, VisualForce and Lightning development on a large Salesforce implementation for a client, and had been shocked to learn there was an entire ecosystem around Salesforce where the benefits of Git version control and open standards-based CI/CD process automation, that we have relied on in the rest of the software industry for the past 10+ years, were just not commonly used.</p><h3>Building a Salesforce DevOps solution</h3><p>About three years ago, as a follow-up to the Salesforce development project we had worked on, we were asked by the same long-time client to help them design a Salesforce DevOps solution.</p><p>As a team with several seasoned DevOps engineers and developers with experience from both Salesforce and other platforms, we soon had a clear vision for what we wanted our DevOps pipeline to look like. We knew that changesets would be useless, and we knew that Salesforce DX was not the solution for us (more on that below). So the team spent months together with our customer, carefully evaluating other third-party deployment tools like Copado, AutoRABIT, Gearset, ClickDeploy, Flosum and others.</p><p>Many of these offerings are good tools in many ways, but for our purposes, we found that they were lacking in some important ways:</p><ul><li>Some are too all-inclusive, trying to be closed-off one-stop-shops for Salesforce Deployments by providing everything to everyone, and in doing so, end up reinventing functionality that’s already done much better by existing CI/CD tools, and forcing teams to use a single compromise for every part of their DevOps workflows.</li><li>Some are quite rigid in the types of workflows they can support. One example of this is not allowing changes to be made directly in the customer’s production org.</li><li>Most are very web UI-oriented, which means they are optimized for humans clicking buttons, but not so great for automation, scripting and integration.</li><li>Most treat Git version control either as completely external to the tools’ workflows (for example, as just one type of source or target for a deployment) or as a completely embedded store behind the scenes that customers can only interact with through the tool itself.</li></ul><p>The first point above is perhaps the most profound. Teams with experience from other development platforms are accustomed to using popular industry-standard tools and CI/CD platforms to drive their DevOps pipelines — tools such as GitHub, Azure DevOps, Jenkins, TeamCity and many others. And they typically already have them set up in their companies and are already using them for a bunch of scenarios where other, more domain-specific components are typically expected to hook into these CI/CD platforms in one way or another (either by providing a CLI that can be scripted against, or by providing a REST API).</p><p>Yet, in the Salesforce universe, that has not been practically attainable until now, neither with the built-in functionality of the platform, nor with any of the third-party products. We wanted our client to be able to take the investments and skillsets they already used to do DevOps on other platforms, and employ them the same way to build their Salesforce DevOps pipelines. It soon became clear to us that the existing offerings were not designed for that.</p><p>We simply needed something different.</p><p>Something that’s <strong>easy to use hands-on</strong> for a deployment manager, but that can also be <strong>scripted, automated and integrated </strong>into the CI/CD platforms DevOps teams already love and use. Something <strong>unopinionated</strong> that doesn’t impose restrictions on the kinds of workflows teams can build. Something that puts all the goodness of <strong>Git at the core</strong> of the process, not just in the periphery as an after-thought. Something that <strong>makes sense to seasoned developers</strong> and DevOps engineers.</p><p>So we built OrgFlow.</p><h3>True Git-based DevOps for Salesforce</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K8TGc4xovOvnSCs_8IdSxw.png" /></figure><p>OrgFlow is a tool that opens the Salesforce platform up to modern software development, version control, deployment and automation techniques. It is essentially the glue that integrates any industry-standard Git and CI/CD tooling with Salesforce, and helps teams build DevOps workflows that make Salesforce deployments easier, faster and safer.</p><p>Let’s talk about some of the things that make OrgFlow different:</p><p>In OrgFlow, each sandbox is a Git branch, so <strong>customizations always flow through Git</strong> instead of directly between Salesforce orgs. This fixes many of the platform’s deployment shortcomings. No change is forgotten, no change gets lost, no change gets overwritten. Conflicts are either automatically resolved, or clearly surfaced for the deployment manager to handle, using their favorite merge tool. And because we normalize all metadata, deployment managers only have to bother with <strong>real</strong> conflicts — not the ones caused by formatting differences or arbitrary reshuffling of XML elements.</p><p>We built OrgFlow as a <strong>user-friendly and automation-friendly CLI</strong> so that <strong>you</strong> can choose how you use it. <a href="https://www.orgflow.io/download">Download</a> and use it on your Windows, macOS or Linux machine. Integrate it into your favorite CI/CD platform. Run it in a Docker container. Or do all of the above — your engineering creativity is the only limit.</p><p>Unlike other solutions, OrgFlow embraces principles of <strong>eventual consistency</strong>. Deployment errors happen — they are a fact of Salesforce life. The following may sound radical: they actually don’t always have to be painstakingly avoided at all cost. If the tooling is clever about it, they don’t always have to block a deployment. OrgFlow keeps track of failed components as a first-class concept, and knows how to continuously retry and safely deploy the rest. If one or more components fail in your deployment, it’s not the end of the world: they can either be fixed later and included in the next sync, or you can choose to ignore them. It’s ok.</p><p>We plan to go into more detail about OrgFlow’s eventual consistency approach to deployments, as well as other unique features of OrgFlow, in upcoming articles.</p><h3>What about Salesforce DX?</h3><p>Because OrgFlow is delivered as a CLI and makes a big point of being scriptable, automatable and integratable, many people wonder how it relates to Salesforce DX, which seems to check those same boxes.</p><p>The answer is that OrgFlow and Salesforce DX are meant for two completely different development scenarios. Generally, customizations in Salesforce can be done using two very different models:</p><h4>Org-based development</h4><p>Org-based development is when you simply customize your org’s metadata to fit your needs, whether that means changing existing components or adding new ones, without worrying about the dependency tree or how your changes relate to all the other metadata in your org.</p><p>You either make customizations directly in your production org, or you create a <em>sandbox</em> as a clone of your production environment, make and test your customizations there, and then <em>deploy</em> them to your production org in some way.</p><p>This model is powered by the metadata API, and surfaced through the built-in change set functionality, as well as through ANT, parts of the Salesforce CLI, and several third-party tools.</p><h4>Package-based development</h4><p>Package-based development, by contrast, is when you build your customizations, usually using <em>scratch orgs</em>, into a self-contained shippable package that can be installed into any org.</p><p>This approach is mostly used when your customizations consist mainly of new metadata components, and can be grouped into cohesive units (packages) where everything in a package depends only on things inside the same package, or on other packages. A package can be developed in a scratch org and then <em>installed</em> into your production org, or it can published on <a href="https://appexchange.salesforce.com/">AppExchange</a> so it can be found and installed by other companies.</p><p>The package-based model is mostly used for greenfield development. If your team has the luxury of doing only package-based development, then Salesforce DX and the Salesforce CLI will most likely satisfy your DevOps needs and address most of the shortcomings of the platform’s built-in deployment story.</p><p>Package-based development brings many advantages, but for many organizations, fully transitioning to package-based development is unrealistic. In particular, for orgs that have been around for a long time (maybe even since before the concept of package-based development was introduced) and orgs with a significant amount of customization, it can be very difficult to break apart metadata customizations into cohesive sets that can form self-contained packages.</p><h4>Best of both worlds</h4><p>As mentioned above, the reality is that many teams — large and small — are doing org-based development for good reason, and we don’t think they should be forced to change this just because they don’t have adequate tooling to support them. The Salesforce CLI does provide some rudimentary support for working with sandboxes and the metadata API, but not nearly enough to really support true Git-based DevOps.</p><p><strong>That’s where OrgFlow comes in, providing the missing piece of the puzzle for those teams.</strong></p><p>OrgFlow is designed for org-based development. In essense, OrgFlow provides similar capabilities for org-based development, to what Salesforce DX provides for package-based development. Additionally, OrgFlow goes much further and provides several benefits not achievable with Salesforce DX.</p><h3>So what now?</h3><p>After a year of intensive production use and continuous refinement, we were delighted to see how well our vision and the tooling we built actually worked in real life — and so were our customers.</p><p>And we figured, if it was useful for our team and our existing customers, it would probably be useful for others, too. After all, our Salesforce team can’t be that unique; there must be other teams out there who share the same sets of priorities when it comes to building their Salesforce DevOps solutions. So we spent another couple of years turning our solution into a high-quality, enterprise grade software product.</p><p>That product is OrgFlow, and it is now available for you to try.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-9spl4JA3IUsp_FziqKAVQ.png" /></figure><p><strong>OrgFlow is free to try for 2 months</strong> — there are no usage limits, no strings attached, no credit card or billing information required. If you or your team would like to give it a try, just head over to our website at <a href="https://www.orgflow.io/">www.orgflow.io</a> where you can download OrgFlow and get started.</p><p>We also encourage you to <a href="https://www.orgflow.io/slack">get in touch with us by joining us on Slack</a>. Our Slack community is the best place to connect with our team, and with other OrgFlow users. Join us to discuss OrgFlow-related topics, exchange ideas or get help with specific issues. Our team hangs out in these channels on a daily basis, and someone from us will always engage with anyone who needs help.</p><p>We look forward to helping Salesforce teams use OrgFlow to make their deployments easier safer and faster, and we are excited to see what kinds of DevOps workflows teams can build using OrgFlow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5b169a94a71" width="1" height="1" alt=""><hr><p><a href="https://medium.com/orgflow/introducing-orgflow-true-git-based-devops-for-salesforce-c5b169a94a71">Introducing OrgFlow — True Git-based DevOps for Salesforce</a> was originally published in <a href="https://medium.com/orgflow">OrgFlow</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>