Flow Inputs

This guide will cover how to utilize flow inputs within your application using Descope flows. Passing inputs into your flow allows you to change certain behaviors within your flow.

Using Flow Inputs

Types of Flow Inputs

  • form: Used to pass flow inputs, such as email addresses, names, etc., from the app's frontend to the flow. These form inputs can be used within flow screens, actions, and conditionals.
  • client: The client input contains metadata related to the user environment, such as the browser version. Provide client inputs if you would like to override or add input.
  • tenant: Used for associating a user to a tenant. This input does not assign the tenant to a user, but rather used as a hint and will populate the dct claim.

Example:

// to get the browser name and version
import { browserName, browserVersion } from "react-device-detect";
 
<Descope
  flowId="sign-up-or-in"
  form={{ 'email': 'predefinedname@domain.com', 'customAttribute.test': '12' }}
  client={{ 'browserName': browserName, 'browserVersion': browserVersion }}
  tenant="<tenantId>"
/>

Display Form Data in screens

Once the form is populated, the data passed to the flow under the form field will populate within the screens for the items you display on the screen. Below is an example of a configured screen and how it appears within the application with the form inputs.

Note

These items can also be utilized within actions and conditions within Descope flow.

Descope flow inputs example

Was this helpful?

On this page