User Workflow

07/22/2015 Posted by Brandon

User logins are one of Knack’s most powerful features. They let you build applications where users can log in and have permissions to access specific records.

We recently converted two user attributes into database fields:

  • User Status: this controls whether the user has active access to log in. Options include “pending approval” and “inactive”.
  • User Roles: this controls which roles the user is assigned to. Each role can have access to different pages of the app and be connected to different records.
These two attributes used to be private settings that couldn’t be exposed in your app. By making them fields you can now use these in your apps just like any other field — including filters, form rules, and the API.

This opens up some powerful user workflow features:

User Paywalls

Form rules, tasks, and the API can be used to update the user status to “approved” or “inactive” when a certain transaction happens. If you start a user as “pending approval” then they won’t be able to login until the status is updated. You can even use Zapier to update this status when a payment is made from Stripe or Paypal.

Role Promotions

Likewise you can assign a user role with form rules or tasks. Conditions can be used to determine which user role to assign. For example, a user can be assigned a role when a certain amount of points are scored.

User Management

Because these attributes are now easily controlled from your app, you can create a specific page for “Admin” users to login and manage user rights and statuses without needing to access the builder.

We’re really excited about the possiblilties this opens up to add user workflow features to your online database. Let us know how you’re using these so we can share other great examples.