Wevo iPaaS tools: Switch
The Switch tool allows you to set conditions for data validation more dynamically. If you need to conduct a more simple data validation (typically with two conditions), the If/Else tool is recommended; however, if there are several different conditions you need to set, the Switch tool is more suitable.
Use the Switch tool
From the Tools menu, drag the Switch tool to the flow's grid.
In the scope titled Case 0
, define the process that should run if the validation returns True
. Note that you can add or delete new cases for validation; therefore, if the previous case is determined to be False
, the following ones will be executed.
Note
Don't forget to add a process in the section titled Default
. If all the other cases defined are determined to be False
, the flow will still have a procedure to follow.
Validation code
Click on the tool on the grid to access the configurations. Note that the Configurations tab shows a code block where you can define the conditional validation that will determine whether Case 0
should run. Write in the JavaScript language. If you need to add more cases, click the Add New Case button.
Map inputs
Click the Input tab in the configurations of the Switch tool and map the outputs of the preceding action according to what you need.
Remember to map inputs for all the cases you've configured, including the Default
.
Use the Mapping tab to set up inputs for actions that do not require any additional JavaScript code.