We talked about how the ‘Decision‘ shape could easily help in flowing a document through to a true or false path in our previous blog. However, the ‘Decision’ step may not be the component to consider if it is more than just true/false logic to handle the document flow.
In this case, ‘Route‘ component would be a better choice whereby it allows the developer to define multiple conditions and decide which part the document should flow depending on the condition met.
Using the same scenario as per our <link to previous blog>, additional requirement has been added:
- If customer’s status is active, create Salesforce Account
- If customer’s status is expired, send email to notify Sales team.
- If customer’s status is none of the above, do not proceed
In this case, utilising the ‘Decision’ shape to achieve the above is still possible. However, multiple ‘Decision’ shape is required.
You can simplify the design by utilising the ‘Route’ shape instead:
Note that it provides a ‘Default’ path which caters to other conditions that do not meet the defined ones. In this case, it saves a developer time to consider implementing additional condition that may not be required as well.