Lead Automation Conditions – If/Else
1. Feature Overview
The If/Else condition sets up Yes/No criteria in an automation. When a record reaches the card, LeadSquared checks the criteria and sends the record down one of two paths, so you can run a different set of actions for each outcome. You can set If/Else criteria on lead, opportunity, activity, task and account fields.
When a record has more than two possible outcomes, use the Multi If/Else condition instead. It holds multiple branches on the same horizontal level, which is faster to configure and faster to execute than a chain of single If/Else cards.
Note:
- The Multi If/Else condition is not available in account automations.
- For If/Else criteria on user fields, see User Automation Conditions – If/Else.
1.1 Example Use Cases
Leads
- If a lead is from Bangalore, add the lead to the Bangalore Leads If not, add the lead to the Other Leads list.
- If a lead is from an online source, send a welcome email. If not, create a follow-up call task.
- If a lead is interested in Product A, send Email A. If not, send Email B.
Opportunities
- If the monthly income on an opportunity is 50,000 or more, set the opportunity status to Relevant. If not, set it to Not Relevant.
- If a lead clicks a link in an email sent against the opportunity, set the opportunity stage to Open. If not, set it to Lost.
Activities
- If an Email Link Clicked activity is posted, send a follow-up email to the lead.
- If an Unsubscribed activity is posted, add the lead to the Not Interested
Tasks
- After a Meeting task is created, wait four hours. If the task status is still pending, notify the task owner. If not, post a Meeting Completed
Accounts
- After an account is updated, if the account stage is Customer, send a welcome email. If the account stage is Opportunity, send a nurture email instead.
2. Prerequisites
- You must select an automation trigger before you add a condition. The If/Else card can be placed at any point after the trigger.
- To set criteria on a triggered activity, the automation must use the New Activity on a Lead or Activity Update on a Lead
- To set criteria on a triggered task, the automation must use the Task Create, Task Reminder or Task Complete
3. How It Works
Neither card runs on its own. Each runs as one step inside an automation. The trigger starts the automation for a record, such as a lead, an opportunity, an activity or a task, and the record moves through the cards on the canvas in the order you placed them.
3.1 How the If/Else Card Works
- The record reaches the If/Else card.
- LeadSquared checks the record against the criteria set on the card.
- If the criteria are met, the record takes the Yes path, marked green on the canvas. If the criteria are not met, the record takes the No path, marked red.
- The record runs only the actions on the path it took. The actions on the other path do not run for that record.
In the example below, a Wait condition of one day is followed by an If/Else card that checks whether the lead visited a web page. Leads that visited the page take the Yes path and receive an email. Leads that did not take the No path, and the lead owner receives a notification email to follow up.

3.2 How the Multi If/Else Card Works
A Multi If/Else card holds one If branch, any number of Else If branches, and a final Else branch. All branches sit at the same horizontal level on the canvas, and each branch has its own set of criteria and its own actions.
- The record reaches the Multi If/Else card.
- LeadSquared checks the record against the criteria on each branch, from left to right.
- The first branch whose criteria are met runs its actions. The remaining branches are ignored, even if their criteria are also met.
- If no branch is met, the record takes the Else
- The record runs only the actions on the branch it took.
In the example below, leads are routed by city. Leads from Mumbai, Bangalore and Delhi each receive a different email campaign, and a follow-up task is created for leads from every other city.

3.3 Criteria Evaluation
- When you add more than one condition to a card or a branch, select Any Criteria to treat the criteria as met when at least one condition is true, or All Criteria to treat them as met only when every condition is true.
- An If/Else card is always evaluated against the latest data in your account, not against the data captured when the automation was triggered. If a field value changes while the record is inside the automation, the card uses the changed value.
- A Multi If/Else card is evaluated against the data captured when the automation was triggered. The card subtitle reads Evaluating on trigger data. To evaluate against the current data in your account instead, enable Evaluate on latest data.
- Extra whitespace in a field value is treated as part of the value, and can cause a condition to evaluate as false.
4. Set Up the If/Else Condition
- On your main menu, navigate to Workflow>Automation, then open the automation you want to edit or create a new one.
- On the canvas, click the add icon below the card you want the condition to follow.
- Under Conditions, click If/Else.
- On the Select Condition pop-up window, select a field, select an operator, enter a value, then click Add Condition. Repeat this step for each condition you want to add.
- Alongside Check for Leads that Match, select Any Criteria or All Criteria.
- Click Set Condition.
- Add the actions you want under the Yes path and the No path, then click Publish.

5. Set Conditions on Activities and Tasks
When the automation runs on an activity or task trigger, the If/Else card lets you choose what the criteria apply to.
5.1 Conditions on Activities
- Select Triggered Activity to apply the criteria only to the activity that started the automation.
- Select Lead Activity to apply the criteria to all matching activities on the lead, including activities posted in the past.

5.2 Conditions on Tasks
- On automations that use the Task Create, Task Reminder or Task Complete trigger, set the criteria on the Triggered Task.
- If you add a task inside the automation using the Create Task action, set the criteria on the Added Task in any If/Else card placed after the Create Task.

6. Set Up the Multi If/Else Condition
Use this condition when a record has more than two outcomes. For example, to send a different email campaign to leads in Mumbai, Bangalore and Delhi, and create a follow-up task for leads in every other city.
- On the canvas, click the add icon below the card you want the condition to follow.
- Scroll down under Conditions, then click Multi If/Else.
- On the Select Condition pop-up window, set the conditions for the first branch, then click Set Condition.
- Click the add icon to add an Else If branch, then set its conditions.
- Repeat step 4 for each outcome you want to cover. Place the highest priority branch on the left.
- Add the actions you want under each If and Else If branch, and under the Else
- Click Publish.

7. Points to Remember
- Branches on a Multi If/Else card are evaluated from left to right, and only the first true branch runs. Place the branch you want evaluated first on the left.
- Where the criteria apply to every record in the automation, add them to the trigger’s advanced search instead of adding an If/Else card. The automation then runs only for records that match, which reduces the execution count.
- Use one Multi If/Else card in place of several stacked If/Else cards. The stacked configuration takes longer to set up and runs slower, because each record passes through more levels.
- To compare the values of two fields against each other, or to compare a field against a saved webhook or Lapp response, use the Compare For more information, see Lead Automation Conditions – Compare.
- If you delete a field that is used in a published automation, edit the If/Else card in that automation to remove or replace the field.
8. FAQs
1. Does the Between operator include the boundary values?
Yes. If the condition is set as Between 6 and 10, the condition evaluates to true when the value is 6, 7, 8, 9 or 10.

2. I have set up multiple branches on a Multi If/Else card. Why does only one of them run, even though more than one condition is true?
Branches are evaluated from left to right. When a branch evaluates as true, its actions run and the remaining branches are ignored. Place high priority conditions on the left.
3. Why is my If/Else condition evaluating as false when the record appears to match?
- The card is evaluated against the latest data in your account. Check whether the field value changed after the automation was triggered. To track the change, contact support@leadsquared.com to enable the automation audit log.
- Check for extra whitespace in the field value and in the value entered on the card.
4. Why does the Automation Failure Report show “Error in Evaluating multi If/Else due to datatype mismatch”?
A field used in the Multi If/Else card has been deleted from Activity Fields in settings, but the automation still refers to it. Edit the card to update or remove the field.
5. Can I use the Multi If/Else condition in an account automation?
No. Account automations support the single If/Else condition only.
Any Questions?
Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!

If you ADD a condition and then later decide to delete it, how do you do that?
Hi, Doreen. Hover your cursor on the If/Else condition, and you’ll see the “x” option. Click this, and the condition will be deleted.