Subroutine basically is a smaller flow for a particular task that is available for repeated use in the large flow.It allows users to create general actions that are reusable in different flows under their accounts.
Similar to Action, subroutine also has Inputs and Outputs which must be declared in advance.
A subroutine flow has the following properties:
- Predetermined input data structure.
- Optional predetermined output data structure.
- All branches of the subroutine flow must end with Subroutine Return action, returning output data with a structure that matches the predefined one.
In order to create a subroutine, please follow the steps below.
- Input: Input needs to be passed into this subroutine when triggered.
- Output: Output of this subroutine that can be used as an input of later actions.
- Data type:
- String: can take both numbers and characters.
- Number: can take numbers only.
- Boolean: can only take the values
- Select Subroutine Return > Click (+) icon at a bottom of your branch
- Key in output values of each branch > Add
– If the output of the previous subroutine is Indonesian, trigger branch: Caller chose Indonesian