How to Deploy Flows from v44

What's New 

From Salesforce's API version v44.0 (Winter '19 Release), flows are handled in a slightly different way by the Metadata API. These are the main points to consider when moving flows:
  1. Flows no longer include the version number. You will not see any version when selecting the flow in the metadata grid. Only the flow name will be displayed. 
  2. As part of the above mentioned upgrade, flow definitions are no longer necessary when deploying. If you deploy with flow definitions, the active version number in the flow definitions override the status field in the flows
  3. You only need to select the flow you want to move. The latest version (active or inactive) will be retrieved and deployed. 
  4. There is a new 'status' tag in the Flow.xml file that specifies the activation status of the flow. Valid values are:
  • Active.
  • Draft - In the UI, this status appears as Inactive.
  • Obsolete - In the UI, this status appears as Inactive. 
  • InvalidDraft - In the UI, this status appears as Draft. 
The flow will be deployed as active or inactive depending on the value of that tag in the xml file of the flow. 

Considerations When Deploying to Production

In your production org, you can enable the option to deploy processes and flows as active. This option applies to processes and autolaunched flows that are deployed to production orgs via change sets and Metadata API. 

Before enabling this option and deploying a process or autolaunched flow as active, please bear in mind that your production org must meed flow test coverage requirements. 75% of the active processes and autolaunched flows in your org must be covered by at least one Apex test. The required percentage is the same as the code coverage requirement for Apex code. Also keep in mind that flow test coverage requirements  don't apply to flows that have screens. For more information about flow test coverage, please refer to Salesforce's documentation

Enabling Deployment Processes and Flows as Active
  1. From Setup, enter Automation in the Quick Find box.
  2. Select Process Automation Settings
  3. Scroll down to the bottom of the page and enable the Deploy processes and flows as active checkbox. 

User-added image

Please note that you can deploy any pending deployment or user story that contain flow after the upgrade to API version 44 without having to perform any further actions from your side.


How did we do?