From form submission to workflow completion

Gravity Flow can be used to manage all kinds of business processes, such as approvals, sales, school enrolments, vacation requests, and other bespoke automations that save time and cut costs. It provides multiple approaches for how users will access entries after initial form submission that you can mix usage of to suite whatever is appropriate for the use cases you have:

Users access via the WordPress dashboard

Useful when your staff are already interacting with WordPress on a regular basis and/or the branded experience is not a primary concern. In our example workflow, this would be where our designer staff access their steps to complete.

Users access via a single Inbox page for all forms/workflows

These pages will, optionally, be set up when you first activate Gravity Flow. This provides a single front-end page on your website. You can manage what page Gravity Flow will route to via the Workflow > Settings panel.

Users access via any page with a Gravity Flow block or shortcode

By placing either a block or shortcode on a specific page, you can customize settings unique to a particular form/workflow. The tailored URL, branding or support materials can allow one website to serve multiple very different use cases and look completely bespoke but be driven by the same flexible back end.

In our example workflow, where we are assigning some steps to email fields that do not have a WordPress user account associated, only the latter two approaches would fit. Let’s design a unique page to get a better understanding of the setup process end-to-end. Follow whichever instruction set pertaining to shortcode or block is appropriate for your WordPress environment. 

Creating an Inbox page via Block

  • Ensure that you have installed and activated the Gravity Flow 2.8+ which includes the Blocks that will eventually replace the shortcode. For the moment the supported block settings are the same as the shortcode attributes. This means that the blocks can do the same as the shortcode.
  • Add a new page to your site with the title ‘Logo Design Request
  • Use the Block selector to find the Workflow Inbox block and add it to your page.
  • In the Block attributes panels adjust the following settings
    • Deactivate the Submitter column
    • Activate the Last updated column
    • Filter Forms – Specify the Logo Design Form
    • Select Fields – Add the ‘Your Company Name’
  • Save the block settings and publish the page.
  • Take note of the page ID WordPress generated which you can see in a few locations including the URL bar. Example: /wp-admin/post.php?post=16&action=edit

Creating an Inbox page via Shortcode

  • Verify or update settings under the Workflow > Settings page under the Advanced > Shortcode Security section that the setting for ‘Allow the Inbox and Status shortcodes to display field values’ is active. This allows field attributes to be used in the shortcode.
  • Add a new page to your site with the title ‘Logo Design Request
  • Add the following shortcode – potentially modifying the form/field ID values (in bold) that may be different in your environment.
    [gravityflow page=”inbox” form=”4” submitter_column=”false” last_updated=”true” fields=”2“]
  • Save and publish the page.
  • Take note of the page ID WordPress generated which you can see in a few locations including the URL bar. Example: /wp-admin/post.php?post=16&action=edit

For more details about the shortcode parameters – including many others available to customize – please refer to Gravity Flow Shortcode documentation.

Whether using shortcode or block, the combination of restricting settings to a specific form and including the field specific column to the list view brings the inbox from a broad/generic use case to a very tailored/specific one:

The shortcode with a default configuration

The shortcode with column/form specific settings

Revise step assignee notifications

Go back to edit any step assignee notifications which included the workflow_entry_link merge tag to include the new page_id so that generated links for our potential logo customer go to it instead. Your page ID will likely be different, but the format should now be {workflow_entry_link: page_id=”16″} for each of the following steps if you’ve followed every part of this series:

  • Review Brief – Revert Notification
  • Clarify Brief
  • Confirm Concept
  • Final Sign-Off

When the workflow gets to one of these steps and sends the assignee notification email it includes a unique URL with a secure access token which authenticates the user using a cookie stored on their computer for as long as their browser is open. Once the browser is closed, the user will need to click on their unique URL again in order to access the entry.

Some helpful tips regarding notifications:

  • The unique URLs are valid for a duration of 30 days by default
  • If the user happens to delete their notification message they will not be able to access the step.
    This is why the reminder for assignee notifications is something we recommend setting.
  • When a Gravity Flow page is accessed via these links, it doesn’t look up a user account with that email address, which means that you have to be careful testing. If you’re logged in you’ll see the tasks assigned to your user account.

Testing the workflow from end-to-end

We have now built our form and workflow to support a logo design process involving client, manager and designers. Each will be able to access and update the data they need to complete their tasks. Even with just 3 role(s) and 7 potential steps for this workflow to follow, testing every piece of that process can involve a lot of browser tabs and/or switching logins.

Helpful testing features in the Gravity Flow demo environment

There are two features built into the Gravity Flow demo environments which will reduce the time/effort it takes for you to test a workflow end-to-end.

Accessing Test Emails

Gravity SMTP is installed in this environment. In addition to providing a dashboard to view all attempted notifications it is configured with Test Mode activated so that it will not send out any emails.

  1. Login to your demo environment with your primary administrator account you would have received during sign-up.
  2. Click on the SMTP > Email Log link on left side menu
  3. Click any notification to verify recipient(s).
  4. Right click any link in the notification & copy to your clipboard.
  5. Open the link in a new browser window\isolated mode to ensures that you are accessing the token/link independent of your current logged in user/role.
    • Firefox Private Window (Ctrl + Shift + P)
    • Chrome Incognito Mode (Ctrl + Shift + N)
    • Microsoft Edge InProviate Window (Ctrl + Shift + N)
    • Safari Private Window (Command + Shift + N)

Accessing Test Users

Even in a non-production system, having unique and secure passwords per user is a good security practice to maintain. The demo environment provides the primary administrator account a one-click switch between test users via the Users menu when hovering over their user account.

When you want to return to your original account to edit forms/workflows/etc you have two options:

  • Click the Switch back link that is in the notice bar at the top left of each page.
  • Mouse over the username drop down in the top admin bar top right and select the Switch back option.