How do I create routing via rules / logic flows in a Workflow?
When creating a Workflow (you might prefer to call it a form or a user journey) you may want to vary what is presented to the user based on their earlier inputs. For example if you sell different types of product and want to build a returns form the information you ask for might vary from product to product. So you'd ideally ask the user to choose the type of product they want to return, then show them further relevant questions that related to that type of product only.
Rules and routing in Malcolm! Workflows let you do just this - you can create complex and adaptive multi-step user journeys / forms easily via this feature.
Below is a simple example of how rules and routing work. In this example we create a simple form that asks a user for some basic details (their name, email address and "further details"). If they select "yes" to the question "Do you have documents or files to upload?" we'll include a screen for them to upload those files before they complete the form. If the user selects "no" we won't show them this screen and they will go direct to the Thank You screen.
Here is the setup in the Workflow builder in MyMalcolm:
Conceptually it is important to understand that rules and routing works at a page level (not at a question level). So where you have questions that will only be shown to the user in certain scenarios you should put those questions on their own page. You then use rules to show or hide those pages.
In our example we have set the "Include page by default" setting on page 2 to be off. By doing this page 2 is "hidden" and can only be seen by routing to it via a rule.
You configure rules at a question/element level.
So in our example we now need to set up a rule on the "Do you have files or documents to upload?" question/element. To do this click on that question/element.
In the overlay that appears select "rules". Then add the rule that if the value is equal to yes to include page 2.
The available options in values will vary according to the type of question/element you are editing. In "Then...." you have the option of including a page, hiding a page or moving to it. If you move to a page the Workflow will then continue from that page and jump over any pages before.
You can see the full range of options for this element type below.