Setting a Required or Optional Input to ‘user given’ indicates that this parameter is a required input from the user who executes this workflow. This parameter must be supplied for the workflow to run, regardless of whether the step where it is introduced is ever executed.
When the ‘user given’ option is selected the form changes to show an additional field where this variable can be named. These variable names are global in scope, and the same name used multiple times will refer to the same variable, and will be requested from the user only once. For example if your variable is ‘customer_name’ and it is used in three separate steps, the workflow will only request ‘customer_name’ once and use it in all three instances.
The ‘Conditions & Routes’ section examines the data returned as the result of a workflow step and decides which step is next. The workflow creator can define an unlimited number of separate conditions leading to different next steps, and each condition can consist of an unlimited number of individual comparisons.
The “add condition” button in the upper-left is used to create a new condition. Each Conditions & Routes section can have an unlimited number of routes defined. Individual routes can be removed by clicking the trashcan icon at the right, and the route can be renamed by clicking on the existing name in the header.
At the bottom of every Conditions & Routes section is a “Route” section which dictates which step the workflow will be directed to if these conditions are met.
Each routing section is evaluated in order, from top to bottom, until a match is found. Once a match is found the system proceeds to the indicated step without evaluating further conditions. Multiple matches are not checked for. If no next-route is found, the workflow errors, possiblly triggering a rollback.
Initially each condition consists of a single comparison clause. All comparison clauses consist of a ‘left value,’ which indicates source data, an ‘operator,’ which defines the nature of the comparison, and a ‘right value,’ which denotes the comparison data.
Both the ‘left value’ and the ‘right value’ areas can accept data from a variety of sources. The options are:
The ‘operators’ are largely self-explanatory boolean comparators, but a few require special syntax:
The add-clause button (the plus symbol) and the remove-clause button (the minus symbol) on the far right allow you to join individual clauses into a compound clause, like “if A or B” or “if A and B and C”. Once clicked, the add clause button creates a new clause below the last existing clause.
At the far right of each comparison clause is a drop down that dictates how this and the next clause are to be joined. The drop-down contains two operators, AND and OR, which join the two conditions as advertised.
The Output area is always the final section in every workflow and determines what data is returned to the user when the workflow is invoked. The workflow can be configured to return individual fields, entire arrays, individual members of arrays, and the entire body return from the executed steps.
The “add parameter” button allows you to populate the Output area with individual return parameters. There is no limit on how many parameters can be returned by a single workflow.
Each Output parameter consists of a number of parts: the parameter name, the parameter type, and the type details. Each parameter requires a distinct name. This is the name used in the return payload.
The parameter types field is similar to those in the Optional and Required Parameters section. You can define a parameter to draw its data either from a workflow link, a function, user given data, or a javascript function. These functions are more fully described in the Optional and Required Parameters section.
Parameters can be removed by clicking the trashcan on the right.