How to Deploy Flows from v44What'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:
- 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.
- 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
- You only need to select the flow you want to move. The latest version (active or inactive) will be retrieved and deployed.
- There is a new 'status' tag that specifies the activation status of the flow. Valid values are:
- 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.
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
- From Setup, enter Automation in the Quick Find box.
- Select Process Automation Settings.
- Scroll down to the bottom of the page and enable the Deploy processes and flows as active checkbox.
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.