As we are aware Salesforce planning to retire Workflow Rules and Process Builder by the end of 2023. For these changes to the CRM, they have introduced a tool Migrate To Flow. The tool was introduced in Spring’22 with Release notes in the BETA version.
Between Spring’22 and Summer’22, Salesforce released the general version of Migrate To Flow tool. In this blog, I will let you know What benefit we can pull out from this tool and the considerations we should keep in mind. This tool for now only supports workflow migration. As per Salesforce, they will be releasing a tool for Process Builder Migration soon. With respect to the Summer'23 update Migrate to flow tool being generally available, You can now convert Process Builder to flows as well.
Before we start if you are wondering Why Flow? Let me answer it precisely.
Simply fact, Salesforce Flow includes a multitude of functionality that Workflow Rules and even Process Builder can’t do. It shares a lot of the same concepts, technical language, and even functionality. It was the first declarative tool that Salesforce offered that could be triggered by the deletion of a record. It is also the only declarative tool that offers the ability to handle multiple records at once in a Collection and looping.
Let's start with learning how to migrate workflow rules to flows. For a better perspective, I will take an example for a workflow “Filter out Other”
From Setup, in Quick Find Search for Migrate to Flow
Go to Migrate to Flow, and you will see a window similar to the image below.
Choose the Workflow Rule, you want to migrate and click on Migrate to Flow
A pop-up window will be shown with a message and Migration details. If you click Switch Activations, it will deactivate the workflow rule and activate the respective flow created. Note: This pop-up is visible only after you first migrate workflow to flow
After closing the pop-up window, you can see the newly created Flow in the Resulting Flow column
If you click on the drop-down to the right of each workflow. You will get the following options as shown in the image below: You can activate Flow by clicking on it.
You will get a pop-up with the following message as shown in the image below:
If you directly click on the name of the flow in the Resulting Flow Column. It will redirect you to flow.
Consideration and Analysis of Migrate To Flow Tool
As the tool is comparatively new and still in review there are few bugs. The Analysis here is presented based on my project where we had 59 workflows from which 35 got migrated successfully, 18 received an error pop-up, 2 got migrated but the flow was not opening, and 4 were not working as expected.
One should look into the list before migrating workflows. Salesforce has provided us with a list of supported and not supported items. Refer to the list.
The Summer’22 version of the tool supports the Equal to null, Not equal to null, Rule criteria formula which was missing in Spring ‘22 release.
The flows migrated are of type Auto-launched Record triggered Flow.
The flows have doesn’t follow a naming convention as per your workflows. So the elements created will have a generalized common name that needs to be changed manually.
The flow which is migrated successfully doesn’t confirm its functionality to work as it is. A migrated flow needs regression testing.
If your workflow has multiple field updates, the migrated flow will merge it into one Update Element. It will not be the same for Email Alerts.
If your workflow contains any item that is not supported while migrating to flow. You will receive a pop-up similar to the image given below: The Error message will be respective to the reason why the migration is unsuccessful.
In some scenarios, the flow is created even when the error message I have talked about above appears. Upon trying to open the created flow it will redirect you to flow but will throw this message.
The tool will create new flows every time you select and click on Migrate to Flow, not new versions. The resulting flow column will show you the latest flow created irrespective of whether it is active or not. It will append _number at the end of the Flow name. In this case, it's _2.
The tool has all the direct approaches and clicks without warning pop-ups. So the tool should only be used by the members familiar with it in Production. It's better to test in Sandbox and move it to Production.
If Workflow contains Record Type in Rule Criteria, then Flow migrated will not work properly. The record type ID needs to fetch in the flow in real-time to work as expected.
Limitations as of now(January 2024)
Processes with recursion aren’t fully supported.
Processes are migrated as Actions and Related Record-optimized (after-save) flows.
The invoke flow action is migrated as a subflow element instead of an invocable flow action.
You can migrate scheduled actions only if you select the single criteria associated with the scheduled action.
You can’t migrate a Post to Chatter action. Before migrating, remove the Post to Chatter action and then add it back to the migrated flow.
You can’t migrate a cross-object reference in a formula.
You can migrate a process that uses a custom metadata reference in a formula. After the migration, the custom metadata reference is used in flow formulas but you can’t configure it using the resource picker.
The Migrate to Flow tool supports only record-triggered processes.
Happy!! To help you add to your knowledge. You can leave a comment to help me understand how the blog helped you. If you need further assistance, please leave a comment or contact us. You can click on "Reach us" on the website and share the issue with me.
Reference
Blog Credit:
D. Khare
Salesforce Developer
Avenoir Innovations Pvt. Ltd.
Reach us: team@avenoir.ai
Comments