Lesson Guide: Streamlining Logic with the Switch Node
In this lesson, you will learn how to use the Switch Node in Noca Flow. While Condition Nodes are great for complex inequalities or chaining multiple criteria together, the Switch Node is your ultimate tool when you want to evaluate one specific field and split your workflow into different paths based entirely on its exact value.
Condition Node vs. Switch Node: When to Use What?
💡 Pro-Tip: > * Use a Condition Node when you need expressions like “If employees are greater than 100 AND locations equal 2”.
Use a Switch Node when you are looking at a single picklist or text field and saying “If this field is X, go here; if it’s Y, go there”. It keeps your canvas incredibly clean and organized.
Step 1: Add and Map the Switch Node
Let’s set up Noca to listen to a specific field on your incoming data.
-
Open your Noca Flow workspace. Ensure you have your base Manual Trigger and Read Account Node ready.
-
Click the + icon immediately following your Read Node and select Switch Node.
-
Look at the properties panel on the right side of the screen. Under the Value input field, map the Salesforce
Company Sizepicklist field from your Read Node. -
Now, define your routing values. Add your target field options exactly as they appear in Salesforce:
-
large -
small -
single location
-
Step 2: Configure Path A (Large Accounts)
Now that our Switch Node has generated dedicated output pins for each value, let’s build the action for the “large” path.
-
Add a Salesforce Update Node to your canvas and connect it directly to the large output pin of your Switch Node.
-
Select the Account object.
-
Set the node’s required condition to ensure it targets the correct record:
Account ID$=$ your incoming Account ID. -
Under mapping, find the
Account Namefield. -
Select the original account name from your data kit, and right next to it, type
(large)in parentheses. Noca will dynamically combine the original name with your text string.
Step 3: Configure Path B (Small Accounts)
Next, let’s replicate the action for our “small” account value.
-
Add another Salesforce Update Node to the canvas and connect it to the small output pin of your Switch Node.
-
Configure the object type as Account and set your matching
Account IDcondition. -
Under mapping, select the original
Account Namefield from your data kit and append(small)right after it.
Step 4: Save and Run Your Tests
Test 1: Evaluating a “Large” Picklist Value
-
Ensure your test account in Salesforce (e.g.,
Edge Communications) has its Company Size picklist set to large. -
Set your Read Node condition to fetch this account.
-
Click Save and Run.
-
Result: Watch the visual execution trail. Noca will read the account, detect the value “large” inside the Switch Node, and automatically route down your first update path. Check Salesforce to see your new updated account name!
Test 2: Evaluating a “Small” Picklist Value
-
Change your test account’s Salesforce picklist value to small.
-
Run your flow again.
-
Result: Noca reads the field, matches the string directly, and smoothly routes down the second path, appending
(small)to your account name.
Key Takeaways
-
Clean Canvas Architecture: The Switch Node replaces multiple messy nested IF/THEN conditions with a single neat array of text-matching targets.
-
String Concatenation: Noca easily allows you to map dynamic values (like an Account Name) and append static text directly beside it inside field mappings.
Great job! Now that you have mastered basic and advanced routing, what workflow are you going to optimize next? Let us know in the community forum!