> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Conditional Logic in Blueprints

> Use conditional logic in Iru Endpoint Blueprints to dynamically assign Library Items based on device attributes like OS version or model type.

<Callout icon="earth-americas" color="#B84A7A" iconType="regular">This guide applies to all device platforms</Callout>

### About Conditional Logic in Blueprints

Conditional logic lets you create deployment strategies using if/else statements and conditional blocks. You can deploy different configurations, apps, and settings based on device attributes, user information, or other criteria.

<Callout icon="triangle-exclamation" color="#EAB308" iconType="regular">As of April 1, 2026, all legacy Classic Blueprints were automatically converted to Assignment Maps, which are the default, improved version of Blueprints.</Callout>

### How It Works

Conditional logic works on a simple premise: **if a condition is true, apply these settings; otherwise (else), apply different settings.** The system evaluates conditions in order; the first match wins, and no further conditions in that block are checked. You build this using a visual interface on an infinite canvas.

### Conditional Blocks: Structure and Function

**What Are Conditional Blocks?**

Conditional blocks are the building blocks of decision-making in Assignment Maps. Each block contains a set of if/else conditions that determine which configurations to apply based on device or user attributes.

**Evaluation flow:** When a device checks in, the system evaluates conditions in the order they appear. Once one evaluates to true, that configuration is applied and the system moves to the next conditional block. Remaining conditions in the current block are skipped.

**Components of Conditional Blocks**

* **If/Else conditions:** Group similar criteria and are evaluated in order; the first matching condition is applied. If you need another condition to be evaluated separately, move it into its own conditional block. For examples (including department-based logic), see [Examples of Common Assignment Map Conditions](#examples-of-common-assignment-map-conditions).

* **Assignment nodes:** The logical conditions (Assignment Rules) inside each block. They define the criteria that must be met and can reference device attributes (model, OS version, serial number) or user attributes (department, location, role). Combine multiple conditions with AND/OR operators.

* **Root line:** Connects all conditional blocks back to the main flow so there are no dead ends in your Assignment Map.

**Supported Inputs, Operators, and Values**

Assignment Map conditional logic supports the following inputs, platforms, operators, and values:

| Input                                                                  | Platforms                                                                                             | Operators                                                                                                            | Example Values                                                                   |
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| **Device criteria**                                                    |                                                                                                       |                                                                                                                      |                                                                                  |
| Device family                                                          | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is one of` `is not one of`                                                                                          | Mac, iPhone, iPad, Apple TV, Vision, Windows, Android                            |
| Enrollment type                                                        | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is` `is not`                                                                                                        | Automated Device Enrollment, Manual Device Enrollment                            |
| Chip type                                                              | <Icon icon="apple" size={14} />                                                                       | `is`                                                                                                                 | Apple Silicon, Intel                                                             |
| FileVault                                                              | <Icon icon="apple" size={14} />                                                                       | `is`                                                                                                                 | On, Off                                                                          |
| Supervision status                                                     | <Icon icon="apple" size={14} />                                                                       | `is`                                                                                                                 | Supervised, Not Supervised                                                       |
| Mac family                                                             | <Icon icon="apple" size={14} />                                                                       | `is one of` `is not one of`                                                                                          | iMac, iMac Pro, Mac Pro, MacBook, MacBook Pro, MacBook Air, Mac mini, Mac Studio |
| Asset tag                                                              | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is` `is not` `is one of` `is not one of` `contains` `does not contain` `contains one of` `does not contain one of`  | Honolulu, 123987, DEN-123845-MBP                                                 |
| Serial number                                                          | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is` `is not` `is one of` `is not one of` `contains` `does not contain` `contains one of` `does not contain one of`  | QCM2XXXXXX                                                                       |
| OS version                                                             | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is` `is not` `is greater than` `is less than` `is greater than or equal to` `is less than or equal to` `is between` | 14, 14.1, 16.2.2                                                                 |
| Tags                                                                   | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `are exactly` `are not exactly` `contain one of` `does not contain one of`                                           | Test, Pilot, Production                                                          |
| <span style={{whiteSpace:'nowrap'}}>**User directory criteria**</span> |                                                                                                       |                                                                                                                      |                                                                                  |
| User department                                                        | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is` `is not` `is one of` `is not one of` `contains` `does not contain` `contains one of` `does not contain one of`  | Product                                                                          |
| User email                                                             | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is` `is not` `is one of` `is not one of` `contains` `does not contain` `contains one of` `does not contain one of`  | [admin@accuhive.io](mailto:admin@accuhive.io)                                    |
| User username                                                          | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is` `is not` `is one of` `is not one of` `contains` `does not contain` `contains one of` `does not contain one of`  | jsmith                                                                           |
| User job title                                                         | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is` `is not` `is one of` `is not one of` `contains` `does not contain` `contains one of` `does not contain one of`  | Product Engineer                                                                 |
| User group                                                             | <Icon icon="apple" size={14} /> <Icon icon="microsoft" size={14} /> <Icon icon="android" size={14} /> | `is one of` `is not one of`                                                                                          | database-admins                                                                  |

**Platform-Specific and Universal Attributes**

<Note>
  Some attributes in the table above are specific to Apple devices (Chip type, FileVault, Supervision status, Mac family). Device family applies to all platforms and lets you target Mac, iPhone, iPad, Apple TV, Vision, Windows, or Android.
</Note>

Assignment Maps work across all device platforms (Apple, Windows, and Android). Universal attributes that work on all platforms include: Enrollment Type, Device family, [Tags](/en/endpoint/devices/device-record-management/tags-for-devices), Asset Tag, Serial Number, OS version, User email, User Group, User Job Title, and User Department. You can use these universal attributes to create conditional logic for Windows and Android devices in Assignment Maps.

### Creating and Configuring Conditional Logic

<Note>
  Editing an Assignment Map in a Blueprint triggers an immediate reevaluation of all rules.
</Note>

**Adding Conditional Logic to Assignment Maps**

<Steps>
  <Step title="Add Initial Conditional Logic">
    For new or simple Assignment Maps without existing conditional logic, click the **+ Add conditional logic** button when editing your Assignment Map.
  </Step>

  <Step title="Add Additional Conditional Blocks">
    For Assignment Maps with existing conditional logic, click the **+** button to add a new Conditional Block within your canvas.
  </Step>

  <Step title="Configure Assignment Rules">
    Once you've added a conditional block, you'll need to configure the Assignment Rules that should apply to each condition.
  </Step>

  <Step title="Edit If Condition">
    Click the **pencil icon** within the conditional block to configure the Assignment Rules that should apply to the **If** condition.
  </Step>

  <Step title="Add Library Items">
    Continue adding Library Items that you want to apply to the conditions defined in your If, Else, and Elseif statements in your conditional blocks.
  </Step>

  <Step title="Add More Conditional Blocks">
    You can continue adding and configuring any number of conditional blocks using the + buttons on each Assignment Node.
  </Step>
</Steps>

**Configuring Assignment Rules**

Assignment Rules define the specific criteria that must be met for a condition to be evaluated as true. These rules can be based on various attributes:

* Device attributes (model, OS version, serial number)
* User attributes (department, location, role)
* Custom attributes specific to your organization

When configuring Assignment Rules, you can combine multiple criteria using AND/OR operators. For instance, you might create a rule that targets "MacBook Pro devices AND running macOS Sonoma AND in the Marketing department" for Apple devices, "OS version greater than or equal to 11.0 AND User Department contains Engineering" for Windows devices, or "User Group is one of Sales AND Tags contain Production" for Android devices.

To add additional pathways within a conditional block, click the **+** button to add an **else if** condition and configure Assignment Rules for that pathway. This allows you to create multiple branches within a single conditional block, each with its own set of configurations.

### Examples of Common Assignment Map Conditions

**Department-Based Software Deployment**

```javascript Software Deployment lines theme={null}
Conditional Block: Software Deployment

if (Department equals "Marketing")
  - Install Adobe Creative Cloud
  - Install Figma
  - Install Slack

else if (Department equals "Engineering")
  - Install Visual Studio Code
  - Install GitHub Desktop
  - Install Docker

else if (Department equals "Finance")
  - Install QuickBooks
  - Install Excel Add-ins
  - Install Financial Reporting Tools

else
  - Install Basic Office Suite
```

Devices are evaluated against the user's department. The first matching condition wins, and the appropriate software is installed.

**Location and Role-Based Security Configurations**

```javascript Security Configurations lines theme={null}
Conditional Block: Security Configurations

if (User Group equals "Remote" AND Role contains "Executive")
  - Apply Strict VPN Configuration
  - Enable Enhanced Security Monitoring
  - Require Biometric Authentication

else if (Location equals "Remote")
  - Apply Standard VPN Configuration
  - Enable Basic Security Monitoring

else if (Location equals "Office" AND Role contains "Executive")
  - Enable Enhanced Security Monitoring
  - Require Biometric Authentication

else
  - Apply Standard Security Configuration
```

This configuration applies different security settings based on whether a user is remote or in-office, with stricter requirements layered on for executive roles.

**OS Version-Based Configurations**

```javascript OS-Specific Configurations lines theme={null}
Conditional Block: OS-Specific Configurations

if (OS Version is greater than or equal to "15.0")
  - Apply macOS Sequoia Optimizations
  - Install Sequoia-Compatible Apps

else if (OS Version is greater than or equal to "14.0")
  - Apply macOS Sonoma Optimizations
  - Install Sonoma-Compatible Apps

else
  - Apply Legacy OS Configurations
  - Schedule OS Update Notification
```

Devices receive only configurations and apps compatible with their current OS version.

### Manual Device Exclusion

In cases where you'd like to exclude a device from a Library Item in an Assignment Map, you can use manual device exclusion.

<Steps>
  <Step title="Select Library Item">
    While editing your Assignment Map, select the Library Item you would like to exclude for a device.
  </Step>

  <Step title="Expand Manual Exclusions">
    Expand the **Manual device exclusions** section.
  </Step>

  <Step title="Add Device">
    Click **+ Add device**.
  </Step>

  <Step title="Search for Device">
    Search by device name, serial number, asset tag, user name, or email.
  </Step>

  <Step title="Select Device">
    Select the device to exclude for the Library Item.
  </Step>

  <Step title="Add Additional Devices">
    Click **+ Add device button** if you'd like to exclude additional devices.
  </Step>

  <Step title="Remove Devices">
    Click the **X** beside a specific device to remove it from the exclusion list.
  </Step>

  <Step title="Clear All Exclusions">
    Click **Clear all** to remove all devices from the device exclusion list.
  </Step>

  <Step title="Save Changes">
    Once all changes are complete, click **Save**.
  </Step>
</Steps>

### Using Search and Device Lookup

The search field near the top left of the Assignment Map allows you to search by Library Items, rules, or look up a device or user.

**Search**

Entering a specific Library Item, or a rule, will locate and highlight the item on the Assignment Map. This can be useful when there are many items on the map, making it difficult to locate.

<Steps>
  <Step title="Enter Search Term">
    Enter the name of the Library Item in the search field, and click **Jump to**.
  </Step>

  <Step title="View Highlighted Item">
    The selected Library Item will be highlighted in the Assignment Map.
  </Step>

  <Step title="Clear Search">
    Clicking the **x** in the search field will clear the highlighted Library Item.
  </Step>
</Steps>

**Device and User Lookup**

Looking up a device will allow you to see the device's path through the map's logic. This is a useful way to troubleshoot the logic and ensure that the device has all of the expected Library Items in its path. When searching by user, you can select any of the devices assigned to that user.

<Steps>
  <Step title="Access from Device Record">
    When viewing a Device Record, you can click the magnifying glass next to the Blueprint name to look up the device on the Assignment Map.
  </Step>

  <Step title="Search from Assignment Map">
    When viewing an Assignment Map, you can enter any device detail, such as serial number, device name, or the user that is assigned to the device.
  </Step>

  <Step title="View Device Path">
    Once the device has been selected, the Library Items that will be assigned to the device will be highlighted.

    <Note>
      It is expected behavior that the Automated Device Enrollment Library Item will always be greyed out, as it is not evaluated for conditional logic, and always applies for eligible devices. You can view the status of Automated Device Enrollment assignments in the **Enrollment** section from the left-hand navigation.
    </Note>
  </Step>

  <Step title="Exit Device Lookup">
    Clicking **Exit device lookup** will return you to the default Assignment Map view.
  </Step>
</Steps>

### Best Practices for Using Conditional Logic

**Keep Your Logic Organized**

* Group conditional blocks by purpose (e.g., department-based conditions together, location-based together).
* Use meaningful names for blocks and position them logically on the canvas so the flow is easy to follow.

**Test Your Conditional Logic**

* Before deploying to production, use the device or user lookup feature to see the path a device takes through the map. This helps you catch issues before they affect users.
* Editing an Assignment Map triggers an immediate reevaluation of all rules. That's good for testing, but be careful when changing production maps.

**Use the Simplest Logic That Works**

* Prefer the simplest solution that meets your needs; complex logic is harder to maintain and troubleshoot.
* For very complex logic, consider splitting into multiple Assignment Maps to keep each one clearer.

**Document your Assignment Maps**

* Document the purpose and logic of your maps, especially when they have many conditional blocks. This helps your whole IT team understand the deployment strategy.

### Considerations

In **Advanced View**, how you enter criteria on Assignment Rules affects whether a device or user matches. Keep the following in mind when you configure **User group**, **Mac family**, **User job title**, and **User department**.

<CardGroup cols={2}>
  <Card title="Multiple values use OR" icon="code-branch">
    For **User group**, **Mac family**, **User job title**, and **User department**, each extra value you add to a criterion is combined with **OR** logic. The device or user needs to match only one of those values for that criterion to evaluate as true.

    For example, if **User group** is **is one of** with **Finance users** and **Engineer users**, a user in either group satisfies the rule.
  </Card>

  <Card title="User group autocomplete" icon="users">
    **User group** offers autocomplete for groups Iru already knows. Select a suggested group as you type to keep names aligned with your directory and avoid typos.
  </Card>

  <Card title="Job title and department" icon="briefcase">
    **User job title** and **User department** do not offer autocomplete. Type each value in full so it matches how the attribute appears in your directory or HR records.
  </Card>

  <Card title="Chips and pasted lists" icon="paste">
    To add several **user job titles**, **user departments**, **serial numbers**, or **asset tags**, press **Enter** after each value. The current entry becomes a chip so you can add more.

    You can also paste a newline-separated list into the field. Each line becomes its own chip.
  </Card>
</CardGroup>

### Related Articles

<CardGroup cols={3}>
  <Card title="Tags for Devices" icon="tag" href="/en/endpoint/devices/device-record-management/tags-for-devices">
    Organize and group devices using tags
  </Card>

  <Card title="Creating a Blueprint" icon="box" href="/en/endpoint/blueprints/assignment-maps/creating-a-blueprint">
    Create a Blueprint with Assignment Maps
  </Card>

  <Card title="Configuring Blueprints" icon="cog" href="/en/endpoint/getting-started/blueprints-and-library/configuring-blueprints">
    Create and configure device Blueprints for policy management
  </Card>

  <Card title="Blueprint Routing" icon="route" href="/en/endpoint/enrollment/blueprint-routing">
    Configure dynamic Blueprint assignment during device enrollment using Assignment Rules
  </Card>
</CardGroup>
