{"id":30,"date":"2023-06-05T03:09:36","date_gmt":"2023-06-05T02:09:36","guid":{"rendered":"http:\/\/salesforcerahul.com\/?p=30"},"modified":"2023-06-18T00:59:27","modified_gmt":"2023-06-17T23:59:27","slug":"workflow-process-builder-to-flow-conversion","status":"publish","type":"post","link":"https:\/\/salesforcerahul.com\/?p=30","title":{"rendered":"Workflow\/Process Builder to flow conversion"},"content":{"rendered":"\n<p>Salesforce have shared a plan to retire Workflows\/Process builder in future. Salesforce has built a tool to convert PB and Workflows to flows but it can not convert all type of logic present in Workflows\/Process builders. If your org is old and complex ,then by no mean you can rely completely on the salesforce conversion tools . Don\u2019t Jump the gun for this activity as this can be as complex as it gets. Treat this work as a tech debt project and do a detailed analysis of the existing WF\/PBs , it is worth to analyze and then slowly convert these to the flows.<\/p>\n\n\n\n<p>Why it is important to take time to do analysis of the existing WF\/PB?<\/p>\n\n\n\n<p>Don\u2019t waste this valuable opportunity to do a \u201cLift and Shift\u201d of logic from WF\/PB to flows. Make sure you get rid of any unused logic\/action , consolidate redundant\/related logic. Make sure you make the logic simpler.<\/p>\n\n\n\n<p>Things to keep in mind<\/p>\n\n\n\n<ul>\n<li>Sequence of execution of different automation tools in a transaction. This will help you to find out what type of automation tool will be the new place for the logic from WF\/PB.  you can find the sequence of execution here https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_triggers_order_of_execution.htm<\/li>\n\n\n\n<li>There will be certain situation where you have to move the logic from PB\/WF to &#8216;before triggers&#8217; instead of flows. Dependency of an action present in WF\/PB on other actions in the same transaction. eg: If there is field update in the &#8216;before triggers&#8217; and then the value of the field is used to do an action in a workflow.<\/li>\n\n\n\n<li>Dependency of workflow action on a workflow field update by the use of \u201cRe-evaluate Workflow Rules after Field Change\u201c<\/li>\n\n\n\n<li>Determine the correct type of flow for a use case. Don\u2019t put a field update in an &#8216;after save&#8217; flow , &#8216;before save&#8217; flow is optimized for field updates.<\/li>\n\n\n\n<li>Number of flows per object. Ideally, you should create only one before save(create or update) flow , one after save(create or update) flow &amp; one delete flow per object but this is not realistic if you have lot of logic to be built for the object. Start with these 3 flows and then add new flows if required. Define some guidelines for your org , on when to go for a new flow instead of modifying the existing one for a use case. eg: if a flow becomes huge then it make sense to create a new one or split the existing one as it is hard to manage a huge flow. If an object is heavily used across different business function , then you can create a flow per business function.<\/li>\n\n\n\n<li>The workflows\/triggers may have redundancy\/related codes , consider consolidation of the logic.<\/li>\n\n\n\n<li>Flow best practices to achieve maximum performance gain.<\/li>\n\n\n\n<li>Dependency on recursion caused by Process builder field updates.<\/li>\n\n\n\n<li>Here is the retirement plan for Workflows\/Process Builders&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.salesforceben.com\/salesforce-to-retire-workflow-rules-and-process-builder\/\" target=\"_blank\">https:\/\/www.salesforceben.com\/salesforce-to-retire-workflow-rules-and-process-builder\/<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Salesforce have shared a plan to retire Workflows\/Process builder in future. Salesforce has built a tool to convert PB and Workflows to flows but it can not convert all type of logic present in Workflows\/Process builders. If your org is old and complex ,then by no mean you can rely completely on the salesforce conversion &#8230; <a title=\"Workflow\/Process Builder to flow conversion\" class=\"read-more\" href=\"https:\/\/salesforcerahul.com\/?p=30\" aria-label=\"More on Workflow\/Process Builder to flow conversion\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=\/wp\/v2\/posts\/30"}],"collection":[{"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=30"}],"version-history":[{"count":3,"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions\/33"}],"wp:attachment":[{"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salesforcerahul.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}