Actions

This guide provides an in-depth overview of flow actions within Descope flows. Actions are not just a feature but a cornerstone of Descope's no-code approach to creating and customizing user journeys. You can combine actions with other flow components like conditions and screens to create complex authentication workflows.

An action step in a flow can perform various tasks, such as initiation and completing authentication methods (e.g., social login or magic link verification), updating user information, creating tenants, associating roles, etc.

Below, you will find generalized information on how to add and configure actions within your flow and how to handle action errors within your flow.

Adding Actions to Flows

To add an action within your flow, navigate to the flow you want to customize within the Flows page, click the blue + at the top left, and select Action.

Add an action to your Descope flow

You can then select the action you want to add or search for the action you're looking for. Once selected, the action will be added to your flow; you can move it around, configure it, and connect it to other actions, screens, and conditions.

Selecting an action to add to your Descope flow

Configuring Flow Actions

The configuration of flow actions varies based on the action type. Below are a few examples of the various configurations for flow actions.

Messaging Actions

Messaging actions such as OTP, Magic Link, Enchanted Link, etc have options as detailed below.

  • Step Name: The display name within your flow builder for the action step.
  • Connector: Which messaging connector you want to utilize to send the message.
  • Template: Which messaging template you want to utilize for the message sent to the user. For more information on messaging templates, see this guide.
  • Template Dynamic Keys: The dynamic keys you want to be used within the template. For more information on template options, see this guide.
  • Error Handling: How you would like to handle errors from this action. For more information on flow error handling, see this guide.

Authentication Update Actions

Authentication update actions OTP, Magic Link, Enchanted Link, OAuth, etc have options as detailed below.

  • Step Name: The display name within your flow builder for the action step.
  • Connector (Applicable for only messaging update actions such as OTP, Magic Link, etc): Which messaging connector you want to utilize to send the message.
  • Template (Applicable for only messaging update actions such as OTP, Magic Link, etc): Which messaging template you want to utilize for the message sent to the user. For more information on messaging templates, see this guide.
  • Template Dynamic Keys (Applicable for only messaging update actions such as OTP, Magic Link, etc): The dynamic keys you want to be used within the template. For more information on template options, see this guide.
  • Add to login IDs: Checking this box adds the updated login ID, such as email or phone, to the login IDs array.
    • Upon merge use existing user's value: Maintains the current if using email or phone for example.
    • Upon merge use new user's value: Overrides the current if using email or phone for example.
  • Error Handling: How you would like to handle errors from this action. For more information on flow error handling, see this guide.

Handling Action Errors in Flows

Descope allows you to configure what to do in the event of an action error during flow execution. You can select any action within your flow, expand the error handling area, and configure the handling to be Automatic, Ignore, or Custom.

Descope Error handling within flow action configuration

When you select custom, you can change the flow behavior based on the error of that action. You can then choose how you want to handle the error. A couple of examples would be to show a screen that the error occurred and suggest other auth methods, or you can direct it back to the beginning of the flow, or in the event of an error with a connector, you can add a condition for the error and then do other actions. This guide provides an example of handling connector errors and specific status codes.

Error handling within Descope flows example

Was this helpful?

On this page