Checkboxes
Creating checkboxes within Descope flows is greatly important when you may display a terms and conditions checkbox or an "opt-in" checkbox for marketing messages. Descope allows you to create these checkboxes and track the answer on the user's details using custom attributes. This guide will cover how to implement a checkbox within your flow.
Create the Custom Attribute
The first step to configure checkboxes within your flow, you must create a boolean custom attribute. To do this, navigate to the
custom attributes screen within the Descope console. Click the + Create Attribute
button
at the top right, and configure the attribute as you wish. For this example, we will create an email marketing opt-in checkbox.
Utilize Checkbox within Descope Flow
Add a Checkbox to the Flow
Now that you have created the custom attribute, navigate to the flows screen within the Descope console, select your desired flow, then select the screen within the flow you want to add the checkbox to.
Once on the screen you'd like to add the checkbox to, scroll down on the left and find your custom attribute, then drag the attribute where you'd like it on the flow screen. Once you've added it to your flow screen, you can change the text of the checkbox by editing the label as shown below.
Additional thing to be noted, there is also a generic boolean input component on the screen builder that you could use to build into your screen. This component is similar to the one created above for a custom attribute. You can change its configuration including the label, its type (checkbox or a switch button), direction, size, fill container, mandatory. This component also allows defining the context key in which the value will be stored.
Update the User within the Flow
After you've added your checkbox to the flow, you will need to add a Update User/Properties
action to the flow
by clicking the blue +
sign at the top left and searching for the action. You can then configure the action
to store the data captured from the user during the flow per the below configuration. Once the action is configured
connect it to the flow after the screen with the checkbox.
User Details Post-Flow
Once the user has ran through the flow, if they select the checkbox, it will be stored on the user as the flag being selected. In the user table, custom claims (if configured), and user details returned from the API or SDK it will be shown as true.