Restoring a Flow

REST API Equivalent:You can use the /config/{app}/flows/{flow}/versions/{version} endpoint to restore a particular flow version to the latest version.

When using the JavaScript SDK for login and registration, you may have some implementations using the flow version of HEAD, which loads the most recently published version of the flow. If a change is published that causes unexpected problems in your implementation, you may need to revert the HEAD version back to a previous version of the flow.

To restore a prior version of a flow, complete the following procedure:

  1. From the Registration Flows page, click the Actions icon next to the latest version of your flow, and then click Edit:
  2. On the Edit page, click Show History to view the last 100 versions of the flow:
  3. In the Version History – Previous 100 Versions pane, click the Restore flow icon next to the flow version you want to revert to:
  4. In the confirmation dialog box, click Restore:

That’s all you have to do.

That said, it might be a good idea to spell out exactly what happens when you restore a flow. When you restore a flow you actually create a new version of the selected flow. Because this new version is the latest version of the flow, it becomes the HEAD version. The flow that used to be the HEAD version is still there; restoring a flow doesn’t delete anything. Instead, restoring a flow just creates a new version that, based on its creation date, takes over as the HEAD flow.

For example, suppose we have the following set of flows, with the HEAD version set to 201902004171536938312:

Note.That’s a god question: how did we know that 201902004171536938312 is the HEAD version? That’s easy: in your version history, you’ll see HEAD following by the latest version of the flow. Because the HEAD is the latest version of the flow, the Console is basically listing the latest version twice: once as HEAD, and once as version 201902004171536938312.

Suppose we now want to make version number 201901302344330771351 (the flow second from the bottom in our list of flows) the HEAD version. When we restore that previous version, our list of flows will look like this:

As you can see, the HEAD version (and the latest flow version) have a new version number: 20190208230059201181; the previous HEAD version (201902004171536938312) is now third on the list of flows. Oh, and notice that the flow we restored – 201901302344330771351 – is still listed and is still second from the bottom. Why? Well, like we said, when you restore a flow, you create a brand-new version of that flow with a brand-new version number, and the original version of the flow remains as-is. Restoring a flow does not involve assigning a new version number to an existing flow nor does it involve deleting any existing flows. Instead, we’ve simply added another version to our flow.