If your website only has Gravity Forms and Gravity Flow active there are 5 default step types available.
These break down into two categories:
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, making it possible to break a very large form down 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 what assignee(s) are next 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 is a big opportunity for time savings by your staff and ensuring 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
Each of these 5 step types has a support page dedicated to configuring them. But that barely scratches the surface of the step types Gravity Flow provides.
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).
The highlighted step types are all non-interactive and their setup typically involves 2 activities:
- Create a Feed
Connection details for Gravity Forms to talk to the 3rd party system. - Add a Step
Identify where in your workflow the feed should be executed. Without this, the default Gravity Forms behaviour is to process the feed when the initial form entry is submitted.
Gravity Forms also provides a number of add-ons related to payments that require user interaction to complete:
- 2Checkout Add-On
- Authorize.net Add-On
- PayPal Commerce Platform Add-On
- PayPal Standard Add-On
- PayPal Payments Pro Add-On
- Stripe Add-On
- Square Add-On
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. Most do not have their own step types, but do work together to create as seamless a user experience as possible. Some examples include:
- GravityView provides columns that identify the step an entry is on in a workflow or direct link to the workflow inbox/status page for it.
- GravityPDF enables you to send complex layout PDFs as a part of notification steps.
- The many GravityPerks from Gravity Wiz operate on user interactive step types or Nested Forms triggering dedicated workflows.
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 own support team, our developer documentation will help you guide you on building more bespoke business logic/applications with the strong foundation 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 which 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 provides you with that flexibility. 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 create 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 select the step to route an entry workflow to it directly from the admin actions box.