Types of steps and where they come from

Overview

If your website only has Gravity Forms and Gravity Flow active, five default step types are available.

Image showing default step types

Steps involving user interaction

In these cases, you define what type of assignee (user, WordPress role, email field) can interact with all, or a subset of the fields of data for that specific entry.

This can include fields that were not visible on the original form, allowing for the breaking down of a substantial form into more discrete step tasks. Standardizing these interactions ensures that your customer/employee has the information they need and a user interface focused on accomplishing the specific task.

The workflow engine, your website, will always keep track of where the entry is within its workflow and who the next assignee(s) are required to complete their steps to move the entry towards completion.

There are two user interaction step types available by default:

  • Approval – Allow assignee(s) to approve/reject an entry
  • User Input – Allow assignee(s) to update field values of an entry

Non-Interactive steps

When a step does not require any user interaction, your website can process these step types instantaneously when called for. Automating these steps in a workflow presents a significant opportunity for time savings by your staff and ensures that the results produced are in a consistent format.

There are three non-interactive step types available by default:

  • Notification – Send notifications to one (or more) users, roles or email fields.
  • Update User – Update the profile of any user in your WordPress site.
  • Outgoing Webhook – Send entry or custom data to any 3rd party system with a Rest API

Steps from Gravity Forms Add-Ons

If you were to have every Gravity Forms add-on active in your site, you would see that a lot of them give you additional step types options when creating a new step in a workflow. Gravity Flow detects when the add-on plugin is active and displays the new corresponding step type(s).

Refer to this article for more information about Gravity Forms Integrations. Support for these in Gravity Flow either requires their own accompanying Gravity Flow extension or offers a user-interactive step through the Form Connector Extension.

Gravity Forms Certified Add-Ons

Gravity Flow also supports Gravity Forms’ 3rd party certified add-ons (plus other popular plugins in the larger Gravity ecosystem). How they integrate with Gravity Flow or vice versa will be covered in a future course.

Refer to the Certified Developer Plugins article for more information.

Customizations via code

If you happen to have a business requirement that isn’t addressed out of the box by any of these potential step types, fear not! it is highly likely that a small amount of code could allow you to tailor one (or more) of them to your exact needs.

Whether you are a developer, have one in-house, or are interested in getting help with your initial efforts from our support team, our developer documentation will help guide you in building more bespoke business logic/applications with the strong foundation that Gravity Flow provides.

Actions / Filters

Every page view in WordPress executes hundreds if not thousands of actions (discrete opportunities to execute custom code) or filters (opportunities to modify the value of a variable before it is used in other code) and Gravity Flow is no exception. Each action and filter Gravity Flow provides (as well as those for all its’ extensions) is documented with some of the more common examples of their usage.

Picking two of the more popular hooks to demonstrate the flexibility that they provide:

  • gravityflow_step_complete
    This is an action that allows you to execute specific logic at the end of one or more steps. An example where this might be useful would be when you want to update the total donations or type of participants on the header of your website following a specific approval step. During the hooked function you could use the WP core update_option to increase a value which your theme’s header.php file reads on every page view.
  • gravityflow_step_assignees
    This is a filter that allows you to customize which assignee(s) can complete a step when the default select/routing options don’t quite fit. An example might be a sales funnel workflow where a combination of field values need to be combined to determine who should approve the project start.

Custom Step Types

If you need to create a step type that is unique to your environment, the Gravity Flow Step Framework offers the flexibility to do so. It allows you to extend an existing step type or start from a generic base class to define what happens at each phase of the steps execution during a workflow.

For example, if your form had several upload fields and you wanted to create a .zip of the files for archive purposes, that could either be done via the gravityflow_step_complete action off an existing step in the workflow or by creating a separate custom step type to do it. Three benefits to building something as a custom step type are that:

  • They get a dedicated note in the timeline when the step is complete
  • Their completion status can be selected within conditional logic for other steps.
  • Administrators can choose the step to route an entry workflow to it directly from the admin actions box.