Getting Started with Salesforce Flow – Part 72 (Deploy Flow(s) or Process(es) Using Change Sets)

Getting Started with Salesforce Flow – Part 72 (Deploy Flow(s) or Process(es) Using Change Sets)

Last Updated on October 16, 2021 by Rakesh Gupta

Big Idea or Enduring Question:

How do you deploy Flows or Processes using the Change Sets?  

Objectives:

After reading this blog post, the reader will be able to:

  • Understand how to use change sets to deploy flows
  • Understand how to use change sets to deploy processes
  • Deploy change sets from sandbox to production

Business Use Case

Pamela Kline is working as a System administrator at Universal Containers (UC). She has developed Auto Sync Accepted Quote with Opportunity flow in the Sandbox. She got the green signal from the testing team. Now she wants to deploy this flow to production. 

Automation Champion Approach (I-do):

Once we are done with Flow or Process development, the next step is to deploy it. There are many ways through which we can deploy or distribute it. They are as follows

When both the Salesforce organizations are connected, for example, Sandbox and Production, then its best practice using Change Sets to deploy the components. There are a few possible solutions for the above business scenario, but we will use Change Sets to deploy the flow from Sandbox to the Production organization. Before proceeding ahead, you have to understand the Outbound and Inbound Change Sets in Salesforce. 

  • Outbound Change Sets: – An outbound Change Set is a change you want to send from the organization you are logged in, to another organization.
  • Inbound Change Sets: – An inbound Change Set is a Change Set that has been sent from another organization to the organization you are logged in.

Let’s begin the deployment of flow.

Guided Practice (We-do):

There are 4 steps to solve Pamela’s business requirement using Change Set. We must: 

  1. Create an outbound change set
  2. Add components to change set 
  3. Upload an outbound change set
  4. Deploy the inbound change set

Step 1: Create an Outbound Change Set 

  1. First login to Sandbox Org with your account.
  2. Click Setup.
  3. In the Quick Find box, type Outbound Change Sets.
  4. Select Outbound Change Sets, then click New.
  5. Name the outbound change set. 
  6. As a best practice, always input a description
  7. Click Save.

 

Step 2: Add Components to Outbound Change Set 

The next step is to add components to the outbound Change Set. 

  1. In the Change Sets list, click the name (Blog 6) of a change set.
  2. Adding components to change set
    1. Click Add to add components.
    2. Choose the type of component, in this scenario, choose the Flow Definitions. 
    3. Select the components Sync_Quotes_Automation.
    4.  In the end, click Add to Change Set.
  3. Optionally, click View/Add Dependencies to add dependent components.

Step 3: Upload an Outbound Change Set 

The next step is to upload the outbound Change Set to production. 

  1. In the Change Sets list, click Upload next to the Blog 6 change set to upload.
  2. Select the Target Organization i.e Production to send the change set.
  3. Click Upload.

After your upload has completed, you’ll receive an email to confirm the completion of your Change Set upload. 

Step 4: Deploy Inbound Change Set 

The next step is to add components to the outbound Change Set. 

  1. First login to Production Org with your account.
  2. Click Setup.
  3. In the Quick Find box, type Inbound Change Sets, then select Inbound Change Sets.
  4. In the Change Sets list, click Deploy next to the Blog 6 change set to deploy.
  5. Choose the right Test Option for your organization.
  6. Click Deploy.

Things to Remember:

  1. You can include only one version of a flow in a change set.
  2. An active flow in a change set is deployed to its destination as inactive. Activate the flow manually after deployment.
  3. If the flow has no active version when you upload the outbound change set, the latest inactive version is used.
  4. Deploying or redeploying a flow with change sets creates a version of the flow in the destination org.
  5. Outbound change sets expire six months after upload. Change Sets are permanently deleted when they expire.
  6. A change set is deployed in a single transaction. If the deployment is unable to complete for any reason, the entire transaction is rolled back. After deployment completes successfully, all changes are committed to your org and the deployment can’t be rolled back.
  7. If a component is referenced by the following flow elements, the Component Dependencies page doesn’t display that component. To deploy the flow successfully, manually add those referenced components to the change set.
    • Post to Chatter
    • Send Email
    • Submit for Approval

Proof of Concept

Formative Assessment:

I want to hear from you!  

What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? 

Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.

Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

 

10 thoughts on “Getting Started with Salesforce Flow – Part 72 (Deploy Flow(s) or Process(es) Using Change Sets)

  1. Rakesh – Thank you for this great blog! Do you know if deployment of process builder and flows trigger unit test classes in production?

    1. No, at least not by default. The deployment of process builders or flows does not execute test classes unless you specify it when deploying the change set. Only apex classes and triggers will execute test classes during a deployment to Production.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.