Decision Element

In this blog you will learn how to use decision element in flow. Let's understand what is that first.
In simple terms decision element is same as IF ELSE Statement that we use in Apex or in any other coding language.
With decision element you can add If Else Statements in flow and work according to that. But without writing any line of code.

Use Case : 
Create a Screen Flow and ask the user for their feedback. After the user will click on next then send a Thank You Email to the user.
But where is the decision part here? 
After the feedback form we need to check if the user have filled the email id or not because if the email field is blank then the Email Action Element should not work.

For this example I have created a Screen Flow in which I have added the screen element.
Have a look :

After this we will add the decision element to check if the Email on this screen is not empty.
for this we will add a condition in decision element that Email.value is not equal to {!$GlobalConstant.EmptyString}

Have a look at the decision element and condition below :

Here it will check if the email is not empty then it will go to the email action.
Here is how the action looks :

If you want to learn about the email action in detail then click here or checkout the previous blogs.

Here is how our final flow will look like :

At the end we have added a success screen to Thank the user.
Have a look at the detail video/tutorial here :

If you have any question please leave a comment below.

If you would like to add something to this post please leave a comment below.
Share this blog with your friends if you find it helpful somehow !

Let's learn and grow together.
Love and Peace! 🧡

Post a Comment