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
- Change Sets
- Eclipse/Force.com IDE
- Ant Migration Tool
In this article, I’m going to discuss how to deploy a Process using Change Sets. Change Sets allow us to deploy the Flow and Processes in the connected Salesforce organization, for example, production and so on. Let’s start with a business use case
Business Use Case: – Pamela Kline is working as System administrator in Universal Container. She has developed a process (Post Opportunity closed-won information to a Chatter group) in the Sandbox and is done with testing. She wants to migrate this process to production organization.
Solution of above business requirement
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 few possible solutions for the above business scenario, but we’ll use Change Sets to migrate the process from Sandbox to Production organization. Before proceeding ahead, you have to understand 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 into 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 into.
Follow the below instructions to migrate a process from Sandbox to Production organization
1. To create a new outbound change set, click on Setup | Deploy | Outbound Change Sets
2. Click on New, it will redirect you to the Change Set Edit page where you need to enter a few details as shown in the following screenshot.
Once you’re done, click on the Save button.
3. The next step is add components to the outbound Change Set. To do that, click on the Change Set Components section, and then click on the Add button, as shown in the following screenshot
It will redirect you to the Add to Change Set page from where you can add different components to it.
4. From the Component Type drop-down, choose the Flow Definitions option, and then select the Process you want to migrate, I’m going to select Post_Opportunity_information_to_a_Chatter_group process, as shown in the following screenshot
Once you’re done with the component selection, then click on Add To Change Set button.
5. The next task is to upload the Change Set to Production organization.Click on the Upload button and choose your target organization, as shown in the following screenshot
You get an email notification when the upload is complete, as shown in the following screenshot
6. Now log into the Production organization, where you can see the Inbound change set, as shown in the following screenshot
Click the name of the change set you want to deploy, in our case click on inbound Change Set My First Process and the click on Deploy, as shown in the following screenshot
After a deployment completes successfully, all changes are committed to your organization, and the deployment can’t be rolled back.
7. Now the final step is to activate the deployed process. To do that navigate to Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder and open the deployed process.
Active the Process by clicking on the Activate button.