Last updated

Flows configuration

Before you begin

  • To get the most out of Flows, review the overview section to understand their impact on user journeys.
  • Prehooks and webhooks can be created either in the backoffice (Prehook/Integrations tabs) or directly within flows. If created in a flow, they’ll also appear in the backoffice.
  • Extend flow capabilities by creating sub-flows, reusable across multiple flows.

Getting started

To customize your first flow, go to the Frontegg portal and select the desired environment from the dropdown at the top of the screen. Then navigate to Flows. The dashboard will display available user flows with ready-made templates. Choose a template to begin customization. You can either modify the flow manually or use the AI prompt (e.g., "Create a login flow that enrolls users in MFA only during their initial login") to auto-generate the required steps.

Flow builder

Building a flow involves three main steps:

  1. Choose a flow
  2. Customize it with hooks and sub-flows
  3. Test and publish

Step 1: Choose a flow

First, from the dropdown, select the desired environment. Then naviagte to Build → Flows.

Frontegg offers pre-built flows for common actions, such as:

  • User sign-up
  • User updates
  • User deletion
  • User invite
  • User login (password, OIDC/SAML, social)

flows-configuration-1

Step 2: Customize with hooks and sub-flows

Once a flow is selected, you’ll see branches with + icons at strategic points.

  • Dotted lines indicate where you can add a webhook.
  • Solid lines indicate that you can add a prehook or a sub-flow.

flows-configuration-2

Options for customization:

  • Add steps manually, or
  • Use the AI prompt to describe your requirements.

When you click a +, a side panel will open with available options.

Re-using hooks

Hooks created in one flow (e.g., a JWT token prehook) will remain identical if reused in other flows. Ensure compatibility across all flows using shared hooks.

Provide the necessary information for your webhook, prehook, or sub-flow. When done, click Save.

flows-configuration-3

Creating sub-flows

Sub-flows extend flow functionality, allowing for reusable, independent mini-flows.

  • Sub-flows execute based on specific conditions within the parent flow.
  • You can add logic (true/false), web requests (synchronous/asynchronous), or custom code.

flows-configuration-4

Adding sub-flows:

  1. Click +, then choose Create new sub-flow or select an existing one from the Sub-flows tab.
  2. Customize the sub-flow and save it for reuse.

flows-configuration-5

Testing sub-flows:

After designing your sub-flow:

  • Use Run test to validate its logic.
  • Review test results and refine as needed.

flows-configuration-6

Step 3: Test and publish

After customizing your flow, use Run test to ensure logic accuracy.

  • Review results displayed on the left panel.
  • Once satisfied, click Publish to activate the flow.

Sub-flows testing

Sub-flows are tested separately. See previous section to learn more.

Prehooks, webhooks, and published changes

Hooks created within flows are synced with the Prehooks/Integrations tabs. Changes in one location will reflect in the other:

  • Disabling a hook in the backoffice will tag the flow with "unpublished changes".
  • Hooks in published flows will automatically appear as Enabled in Integrations.

flows-configuration-7


Audit logs

All user activity within flows is logged for review in your audit logs.