# How to do if else condition using switch node
In this tutorial we will implement a flow which does the condition check on the input message payload and route the flow to the appropriate target node.
TBD We will be sending a simple number as input for this use case. Lets set it as 400.
Drag and drop the switch node from the routing section in pallette to the canvas. Double click the switch node to open the editor. By default there will be one empty rule entry available.
Click on the
addbutton to add to more entries .
In the first row entry set the condition as
>and value as number
1000. In the second row entry set the condition as
<and value as number
500. For the thrid row set the condition as
Drop three debug nodes from the pallette to the canvas. Name the first debug node as
Route1 - Success. Name the second node as
Route2 - Success. Name the third node as
Route3 - Success.
Click the TBD to test the flow.
As the input is set as 400 the second condition in the switch node is matched and hence the second debug node i.e
Route2 - Success will be printed on the debug panel on the editor.