Routing Steps
In order to do more complex routing of a transaction, the following step types are available:
Get Current Record
In some of the more complex steps, including the If/Else below, you will need to use data from the current record. In order to do so, you must use a 'Get Current Record' step. This takes a snapshot of the data in each field as it currently stands and stores it for future use. The Module ID and Record ID are used by the system, so the only area you need to complete is the 'Name', which can be something generic like 'CurrentRecord'.
This stores the data in a variable with the name given, in this case 'CurrentRecord'.
Don't use spaces or special characters in the name (e.g. / , > etc.).
If/Else
Use this step if the transaction needs to have different routes depending on whether a condition is true or false. For example, it may be that if an item is over 5,000 in value it needs additional approval. In this case you would build in an If/Else step like that below:
To refer to data in the current record, you must have previously done a 'get current record' step.
The format of the above formulas is JSON.parse(Current Record Name.Result).field_id so in the above example the current record is called CurrentRecord and the field ID we are interested in is total_transaction_value. Note that this is actually a Javascript formula, so the dropdown on the right of this box should be changed from 'Literal' to 'Javascript'.
Javascript is case-sensitive, so make sure you use capitals and lower case correctly with this type of formula.
After the step is saved, the box on the main process grid will have two outcomes so you can drag these as required. The final process might look something like this:
Fork
A fork allows a process to go off in two or more separate branches. Each branch happens simultaneously meaning full completion can happen quicker than if each person has to wait for the previous one in a chain requiring multiple approvals. This is used in conjunction with a 'join' process step below, which brings the forks back together.
Enter in the 'branches' box as many forks as you need, separating each one with a comma. When you click OK, the box on the main screen will have each one available to be linked to the relevant next step.
Join
This joins the separate forks back up again.
The mode can be WaitAll, if all approvals must be completed or WaitAny if the process can continue after any one of the steps joining the fork back up has been completed. The process screen including a fork and join will look something like this: