Skip to main content

Versioning flows

Overview

Flows are versioned to provide robustness to flows by allowing them to be updated without breaking code integration.

Committing changes

The default view of the flow builder is of the Uncommitted version. This is a sandbox version which allows you to edit the flow without breaking the deployed version of the flow. When you are done editing a flow you can press the Commit changes button to save the flow into a new version.

This prompts you for a commit message and asks you how to transition users between flow versions. You can either set the transition as Restart flow which restarts users who have started but not completed the flow to the beginning of the new flow version. Or set the transition as Exit flow which exits users who have started but not completed the flow so they will not see the new version.

Setting a flow version for an environment

The flow version and environment your users experience are set in code via SDK. The flow version configuration determines which version of the flow is requested by the SDK and the API key determines the environment.

A flow version configuration is an object consisting of flow identifiers and version tags which looks like this:

const flowVersions = {
'onboarding-tour': 2,
'feature-hotspot': 4,
'welcome-modal': 0,
};

This translates to the SDK requesting version 1 of the onboarding-tour flow, version 4 of the feature-hotspot flow, and the uncommitted version of the welcome-modal flow.

The 0 version tag is special in that it allows you to point the SDK to your current uncommitted changes. This is useful when you are still actively developing your flow so you don’t have to commit to see the changes while developing.

Viewing a flow version

Any flow version can be viewed from the Version history tab. In this view, you can inspect the flow’s blocks and paths as well as update field values. You will not be able to make any changes to the flow itself.

Restoring a flow version

With the restore feature, you can restore the uncommitted state to any prior version. Restoring modifies your uncommitted state to have the same blocks and paths as a prior version.

caution

Restoring a version will also wipe out any existing uncommitted changes.