# Workflow Action - If/Else

> Learn how to use the If/Else action in workflows to automate decision-making based on tags, appointments, and custom contact conditions.

- Source: https://docs.ghlcustomercare.com/docs/workflows/internal-tools-workflow-actions/workflow-action-if-else
- Section: Workflows / Internal Tools Workflow Actions
- Reading time: 6 min
- Images: 5, each explained below

---
The **If/Else** workflow action allows you to route contacts through different paths based on defined conditions. With the latest enhancement, you can now use **Dynamic Custom Values** in If/Else conditions to compare live values from earlier workflow steps or stored fields—eliminating the need to hard-type values and reducing duplicate logic.

---

**TABLE OF CONTENTS**

-   [What Is the If/Else Workflow Action?](#what-is-the-if-else-workflow-action)
-   [Key Benefits of the If/Else Action](#key-benefits-of-the-if-else-action)
-   [How to Use the If/Else Action](#how-to-use-the-if-else-action)
-   [Step 1: Add the If/Else Action](#step-1-add-the-if-else-action)
-   [Step 2: Choose a Logic Setup Method](#step-2-choose-a-logic-setup-method)
-   [Step 3: Configure the First Branch](#step-3-configure-the-first-branch)
-   [Step 4: Add Additional Branches (Optional)](#step-4-add-additional-branches-optional)
-   [Step 5: Configure the “None” (Else) Branch](#step-5-configure-the-none-else-branch)[](#using-dynamic-values-in-if-else-conditions)
-   [Using Dynamic Values in If/Else Conditions](#using-dynamic-values-in-if-else-conditions) [](#supported-field-types)
-   [Supported Field Types](#supported-field-types)
-   [How to Use Dynamic Values](#how-to-use-dynamic-values)
-   [Important Note for Select / Dropdown Fields](#important-note-for-select-dropdown-fields)[](#example-use-case)
-   [Example Use Case](#example-use-case)[](#action-details)
-   [Action Details](#action-details)[](#example-follow-up-based-on-email-engagement)
-   [Example: Follow-Up Based on Email Engagement](#example-follow-up-based-on-email-engagement)[](#frequently-asked-questions)
-   [Frequently Asked Questions](#frequently-asked-questions)[](#related-articles)
-   [Related Articles](#related-articles)

---

# **What Is the If/Else Workflow Action?**

The If/Else action evaluates contact-specific data and splits a workflow into multiple branches based on whether conditions are met. Each branch represents a logical path that a contact follows depending on the outcome of the condition check.

This makes it possible to create personalized, data-driven workflows that adapt dynamically to a contact’s behavior, attributes, or calculated values.

---

## **Key Benefits of the If/Else Action**

-   **Conditional Logic:** Route contacts down different paths based on real-time data
    
-   **Automation Efficiency:** Reduce manual sorting and duplicate workflow steps
    
-   **Scalable Segmentation:** Handle complex branching logic as workflows grow
    
-   **Visual Clarity:** Clearly see and manage decision points in the workflow builder
    

---

## **How to Use the If/Else Action**

### **Step 1:** Add the If/Else Action

1.  Open your workflow.
    
2.  Click the **+** icon to add a new action.
    
3.  Select **If / Else** from the action list.
    

![Step 1: Add the If/Else Action (image 1 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155064138111/original/QHWzWp0cVu8mQcNsqQ1TRvlxEjAvSdSZVA.png)

**Step 1: Add the If/Else Action (image 1 of 5)**

This screenshot appears in the "Step 1: Add the If/Else Action" section of "Workflow Action - If/Else". The text alongside this image reads: Open your workflow. Click the + icon to add a new action. Select If / Else from the action list. Immediately after, the guide continues: Build logic manually using Build My Own, or Start from a prebuilt recipe with common conditions.
- Where to go: Open your workflow. Click the + icon to add a new action. Select If / Else from the action list.
- Controls: +, If / Else
- Next: Build logic manually using Build My Own, or Start from a prebuilt recipe with common conditions.

Full procedure:

1. Open your workflow.
2. Click the + icon to add a new action.
3. Select If / Else from the action list.

### **Step 2:** Choose a Logic Setup Method

You can either:

-   Build logic manually using **Build My Own**, or
    
-   Start from a prebuilt recipe with common conditions.
    

### **Step 3:** Configure the First Branch

1.  Select the field you want to evaluate.
    
2.  Choose the appropriate operator.
    
3.  Set the comparison value.
    
4.  Click **Add Segment** to add additional conditions.
    
5.  Use **AND / OR** to control how conditions are grouped.
    

#### **Find Fields in If/Else Conditions**

Use the field picker to search for the field you want to use in an If/Else condition. Search results can include matching fields stored inside available folders and subfolders, so you do not need to open each folder before searching.

You can also browse the available field groups and use the breadcrumb path to move between folders and subfolders.

If a long field name is truncated, hover over it to view the full name in a tooltip.

**Note:** Search only displays fields and folders that are available and enabled for the current context.

![Find Fields in If/Else Conditions (image 2 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155064138158/original/uBsuEu4NYpnkmlNxnWjDMlDv-IJU3EEDwg.png)

**Find Fields in If/Else Conditions (image 2 of 5)**

This screenshot appears in the "Find Fields in If/Else Conditions" section of "Workflow Action - If/Else". The text alongside this image reads: Note: Search only displays fields and folders that are available and enabled for the current context. Immediately after, the guide continues: Click Add Branch to define more condition groups. Each branch represents a separate path in the workflow.
- What this covers: Note: Search only displays fields and folders that are available and enabled for the current context.
- Next: Click Add Branch to define more condition groups. Each branch represents a separate path in the workflow.

### **Step 4:** Add Additional Branches (Optional)

-   Click **Add Branch** to define more condition groups.
    
-   Each branch represents a separate path in the workflow.
    

![Step 4: Add Additional Branches (Optional) (image 3 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155064138205/original/VkxzPJfxHTDdkMNNRo9GLZ8bEIE7fBW4-g.png)

**Step 4: Add Additional Branches (Optional) (image 3 of 5)**

This screenshot appears in the "Step 4: Add Additional Branches (Optional)" section of "Workflow Action - If/Else". The text alongside this image reads: Click Add Branch to define more condition groups. Each branch represents a separate path in the workflow. Immediately after, the guide continues: The None branch is created automatically. It runs when no defined conditions are met. This branch does not support conditions and cannot be removed. You can rename it and add fallback actions.
- What to click: Click Add Branch to define more condition groups. Each branch represents a separate path in the workflow.
- Controls: Add Branch
- Next: The None branch is created automatically. It runs when no defined conditions are met. This branch does not support conditions and cannot be removed. You can rename it and add fallback actions.

Full procedure:

1. Click Add Branch to define more condition groups.
2. Each branch represents a separate path in the workflow.

### **Step 5:** Configure the “None” (Else) Branch

-   The **None** branch is created automatically.
    
-   It runs when no defined conditions are met.
    
-   This branch does not support conditions and cannot be removed.
    
-   You can rename it and add fallback actions.
    

![Step 5: Configure the “None” (Else) Branch (image 4 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155064138232/original/npnbPACEOdDdptOOZHUT5SqhUnQ1wOtwXw.png)

**Step 5: Configure the “None” (Else) Branch (image 4 of 5)**

This screenshot appears in the "Step 5: Configure the “None” (Else) Branch" section of "Workflow Action - If/Else". The text alongside this image reads: The None branch is created automatically. It runs when no defined conditions are met. This branch does not support conditions and cannot be removed. You can rename it and add fallback actions. Immediately after, the guide continues: You can now use Dynamic Values on the right-hand side of If/Else conditions. This allows you to compare live values—such as outputs from earlier workflow steps or stored fields—without hard-coding numbers or text.
- What this covers: The None branch is created automatically. It runs when no defined conditions are met. This branch does not support conditions and cannot be removed. You can rename it and add fallback actions.
- Controls: None
- Next: You can now use Dynamic Values on the right-hand side of If/Else conditions. This allows you to compare live values—such as outputs from earlier workflow steps or stored fields—without hard-coding numbers or text.

Full procedure:

1. The None branch is created automatically.
2. It runs when no defined conditions are met.
3. This branch does not support conditions and cannot be removed.
4. You can rename it and add fallback actions.

---

## **Using Dynamic Values in If/Else Conditions** 

You can now use **Dynamic Values** on the right-hand side of If/Else conditions. This allows you to compare live values—such as outputs from earlier workflow steps or stored fields—without hard-coding numbers or text.

This enhancement lets you branch directly on values that were calculated or captured upstream.

You can select **Company fields** in If/Else conditions when building a contact-based workflow. 

Company fields appear alongside contact fields in the field/variable picker.

Important: Company fields resolve only when the contact is associated with a company. If the contact has no associated company, the value is blank.

**Example Use Cases**

Route contacts based on Company Address (for example, by state or region).

Branch based on Company Name to apply different logic for specific accounts.

---

## **Supported Field Types**

Dynamic Values are supported for the following condition types in If/Else actions:

-   **Numeric** – scores, counts, totals
    
-   **Date** – appointment dates, renewal dates
    
-   **Select / Dropdown** _(advanced – requires option IDs)_
    
-   **Monetary** – invoice totals or amounts
    

---

## **How to Use Dynamic Values**

1.  Add an **If/Else** action to your workflow.
    
2.  Configure the left-hand field as usual.
    
3.  In the right-hand input, switch the value type to **Dynamic Value**.
    
4.  Select a value from:
    
    -   An earlier workflow step output, or
        
    -   A stored field.
        
5.  Choose the appropriate operator (number, date, or value).
    
6.  Save and publish the workflow.
    

### **Important Note for Select / Dropdown Fields**

> **Select / Dropdown fields require option IDs**, not display names, when used with Dynamic Values in If/Else conditions.

>   

> In many cases, these IDs can be found in settings (for example, Pipeline IDs or Stage IDs).

### **New workflow fields available in If/Else**

If/Else conditions support more workflow fields, which gives you more precise branching without adding extra lookup steps. These fields appear in the field picker like other supported values, but some only appear when the workflow has the right context.

**Newly available fields include:**

-   [Contact Engagement Score](https://docs.ghlcustomercare.com/docs/conversations/conversations/contact-engagement-score)
-   Contact → Attribution Medium ID
-   Note created by (Name)
-   Task ID

Use these fields in If/Else when you want to branch based on attribution, engagement, note ownership, or task-specific workflow data.

**Field availability notes:**

1.  **Contact Engagement Score** appears when Engagement Scoring is set up in the sub-account.
2.  **Contact → Attribution Medium ID** can be used to branch based on first or latest attribution details.
3.  **Note created by (Name)** appears in note-related workflow contexts.
4.  **Task ID** appears in task-related workflows, such as task triggers or after an **Add Task** step.

**Examples:**

1.  If **Contact Engagement Score** is greater than or equal to **20**, send the contact down a high-priority follow-up path.
2.  If **Attribution Medium ID** matches your paid social source, route the contact to the correct reporting branch.
3.  If **Note created by (Name)** includes **Success**, notify the Success team.
4.  If **Task ID** is present, send it to an external tracking system for reference.

Note: If a value is unavailable for the current contact or workflow context, the field may be empty and the workflow will still continue to run.

---

## **Example Use Case**

When a proposal value is captured earlier in the workflow, you can compare that value dynamically.

If the amount is **$25,000 or more**, route the contact to a priority path; otherwise, continue with the standard process.

![Example Use Case (image 5 of 5)](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/155064138289/original/62n-GtQVJ-ot77skqfvb9KV8KVkYWqodmQ.png)

**Example Use Case (image 5 of 5)**

This screenshot appears in the "Example Use Case" section of "Workflow Action - If/Else". The text alongside this image reads: If the amount is $25,000 or more, route the contact to a priority path; otherwise, continue with the standard process. Immediately after, the guide continues: Field Description Required Action Name Label used to identify the action in the workflow Yes Condition The rule evaluated to determine the branch Yes Branches Workflow paths created by the If/Else action Yes Segments Groups of conditions….
- What this covers: If the amount is $25,000 or more, route the contact to a priority path; otherwise, continue with the standard process.
- Controls: $25,000 or more
- Next: Field Description Required Action Name Label used to identify the action in the workflow Yes Condition The rule evaluated to determine the branch Yes Branches Workflow paths created by the If/Else action Yes Segments Groups of conditions combined using AND / OR logic No

---

## **Action Details**

| 
**Field**

 | 

**Description**

 | 

**Required**

 |
| --- | --- | --- |
| 

Action Name

 | 

Label used to identify the action in the workflow

 | 

Yes

 |
| 

Condition

 | 

The rule evaluated to determine the branch

 | 

Yes

 |
| 

Branches

 | 

Workflow paths created by the If/Else action

 | 

Yes

 |
| 

Segments

 | 

Groups of conditions combined using AND / OR logic

 | 

No

 |

---

## **Example: Follow-Up Based on Email Engagement**

**Scenario:**

You want to follow up differently based on whether a contact opened an email.

**Workflow Logic:**

-   Trigger: Promotional email sent
    
-   If/Else Condition: Email Event → Is Opened
    
-   Yes Branch: Send thank-you email with an offer
    
-   No Branch: Resend the email with a different subject line
    

This ensures follow-ups are relevant to each contact’s engagement.

---

## **Frequently Asked Questions**

**Q: How can I control when the If/Else condition is evaluated?**

Insert a **Wait** action before the If/Else step. You can wait for an event or a timeout (for example, “Wait until email is opened OR 1 day passes”) before evaluating the condition.

**Q: Can I edit a branch after it’s created?**

Yes. You can update fields, operators, and values before or after publishing the workflow.

**Q: Is the None branch required?**

Yes. It is created automatically and cannot be removed.

---

## **Related Articles**

-   [Workflow Action – Update Contact Field](https://docs.ghlcustomercare.com/docs/workflows/contact-workflow-actions/workflow-action-update-contact-field)
    
-   [If/Else Workflow Action – Appointment Filter Options](https://docs.ghlcustomercare.com/docs/workflows/getting-started-w-workflows/if-else-workflow-action-appointment-filter-options)

---

Documentation for GHL Customer Care. Support: support@ghlcustomercare.com