Using Decisions

Using Decisions

Decisions Defined

Admins use Decisions in Flows to create branching logic within a Flow and route users to the next step based on conditional logic. Decisions look at the data in an individual record to determine how to route the user. For this reason, Decisions cannot be based on criteria in a View task. Decisions must be used after at least one Add or Edit task with an assigned form in the Flow, and conditions for the Decision will be established based on data within specific fields on the assigned form or forms.

Example: Use a Decision to allow users to complete different forms based on whether an initial entry passes certain conditions.

Example: Use a Decision to ask users whether they would like to add additional line items to a purchase order.

Decisions are represented as a diamond in Flows, and must lead to at least two other elements, one of which may be the End element. Decisions represent a branch--or split--in the Flow. If there is only one path for continuing the workflow process, a Decision is not required. If there are two or more options which depend on a condition, a Decision is required.

A Flow may have multiple Decisions, such as the example below. A Decision may also have more than two branches.

Editing Overview

For a quick summary of the Decision elements on the Flow Builder, reference the screenshot below and read the descriptions, or watch this quick video showing how to configure a new Decision.

When adding or editing a Decision, an Admin can:

  • Label the Decision in the Flow Builder (item 1 in screenshot above). The Decision label is to provide clarity for the Admin building the flow and will not be visible to the user.

  • Name each “Result”, or branch coming out of the Decision (items 2 and 3 above).

    • For Item 2, the result is labeled “No”. This is the direction users will take if they do not have materials to add to the production report created in the first two Tasks of the Flow above. This label is defined in the Result Settings section of the Edit panel and is only visible to the Admin in the Flow Builder. The Result Name will not be displayed for end users during the Flow.

    • Item 3 highlights the second branch in this Decision, “Yes”, where the user selects to add material to the production report. To access the Result Settings panel for “Yes”, the Admin will click the purple RES label next to “Yes”.

  • Provide a custom label for the Save button (item 4 above) for this specific result.

    • When you provide a custom label, the Save or Next button will correspondingly change in the flow for the end user, indicating a different next step based on their selection. You can see an example of this in either the Flows on Web or Flows on Mobile end user videos.

  • Add or Edit Conditions (item 5 above) for each result. This is where you select the field or fields and conditions that will determine which path the user will take next.

Conditions in Detail

Setting conditions for a Decision element is similar to setting conditions in other areas of TrackVia, such as using the show hide condition builder on a custom form. You will see the same AND/OR options, have the ability to choose a field and set the appropriate filter condition, and add multiple conditions and condition groups as needed.

The fields available for selection in the first dropdown of the condition builder will be all of the fields available on the form(s) used in the Add or Edit task(s) preceding the Decision in the Flow.

Example: (See below) The fields available in the condition builder are those on the Material Entry form used for the Create New Material step immediately preceding the Approval Needed Decision. Even if multiple forms are used in the flow before a Decision, only the fields on the form for the Add or Edit task immediately before the Decision will be available in the condition builder.

Note: If there aren’t any options in the condition builder, you either haven’t connected the Decision to a preceding step, or the preceding steps do not contain an Add or Edit task with an assigned form.

Cannot Proceed Error in a Flow

It is important to carefully think through all scenarios when creating conditions for Decisions.

In the example above, the "Approval Needed?" Decision has 2 branches based on a Cost Per Unit of $100.

  • The "No" branch is set for a Cost Per Unit of "less than $100" and does not require approval.

  • The "Yes" branch is set for a Cost per Unit of "greater than or equal to $100" and does require approval.

If the condition for the "Yes" branch were set to "greater than $100" there would be a gap in the logic for exactly $100. If a user then added a new material for $100, the Flow would generate the error below:

For other common errors in Flows, see Limited User Errors in Flows.

Feedback and Knowledge Base