Skip to main content
This guide applies to all device platforms

About Conditional Logic in Assignment Maps

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.

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.
  • 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:
InputPlatformsOperatorsExample Values
Device criteria
Device family is one of is not one ofMac, iPhone, iPad, Apple TV, Vision, Windows, Android
Enrollment type is is notAutomated Device Enrollment, Manual Device Enrollment
Chip typeisApple Silicon, Intel
FileVaultisOn, Off
Supervision statusisSupervised, Not Supervised
Mac familyis one of is not one ofiMac, iMac Pro, Mac Pro, MacBook, MacBook Pro, MacBook Air, Mac mini, Mac Studio
Asset tag is is not is one of is not one of contains does not contain contains one of does not contain one ofHonolulu, 123987, DEN-123845-MBP
Serial number is is not is one of is not one of contains does not contain contains one of does not contain one ofQCM2XXXXXX
OS version is is not is greater than is less than is greater than or equal to is less than or equal to is between14, 14.1, 16.2.2
Tags are exactly are not exactly contain one of does not contain one ofTest, Pilot, Production
User directory criteria
User department is is not is one of is not one of contains does not contain contains one of does not contain one ofProduct
User e-mail is is not is one of is not one of contains does not contain contains one of does not contain one ofadmin@accuhive.io
User username is is not is one of is not one of contains does not contain contains one of does not contain one ofjsmith
User job title is is not is one of is not one of contains does not contain contains one of does not contain one ofProduct Engineer
User group is one of is not one ofdatabase-admins

Platform-Specific and Universal Attributes

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.
Assignment Maps work across all device platforms (Apple, Windows, and Android). Universal attributes that work on all platforms include: Enrollment Type, Device family, Tags, Asset Tag, Serial Number, OS version, User e-mail, 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

Editing an Assignment Map in a Blueprint triggers an immediate reevaluation of all rules.

Adding Conditional Logic to Assignment Maps

1

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.
2

Add Additional Conditional Blocks

For Assignment Maps with existing conditional logic, click the + button to add a new Conditional Block within your canvas.
3

Configure Assignment Rules

Once you’ve added a conditional block, you’ll need to configure the Assignment Rules that should apply to each condition.
4

Edit If Condition

Click the pencil icon within the conditional block to configure the Assignment Rules that should apply to the If condition.
5

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.
6

Add More Conditional Blocks

You can continue adding and configuring any number of conditional blocks using the + buttons on each Assignment Node.

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

Software Deployment
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

Security Configurations
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

OS-Specific Configurations
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.
1

Select Library Item

While editing your Assignment Map, select the Library Item you would like to exclude for a device.
2

Expand Manual Exclusions

Expand the Manual device exclusions section.
3

Add Device

Click + Add device.
4

Search for Device

Search by device name, serial number, asset tag, user name, or e-mail.
5

Select Device

Select the device to exclude for the Library Item.
6

Add Additional Devices

Click + Add device button if you’d like to exclude additional devices.
7

Remove Devices

Click the X beside a specific device to remove it from the exclusion list.
8

Clear All Exclusions

Click Clear all to remove all devices from the device exclusion list.
9

Save Changes

Once all changes are complete, click Save.

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. 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.
1

Enter Search Term

Enter the name of the Library Item in the search field, and click Jump to.
2

View Highlighted Item

The selected Library Item will be highlighted in the Assignment Map.
3

Clear Search

Clicking the x in the search field will clear the highlighted Library Item.

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.
1

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.
2

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.
3

View Device Path

Once the device has been selected, the Library Items that will be assigned to the device will be highlighted.
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.
4

Exit Device Lookup

Clicking Exit device look up will return you to the default Assignment Map view.

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.

Tags for Devices

Organize and group devices using tags

Creating a Blueprint

Create a Blueprint with Assignment Maps

Configuring Blueprints

Create and configure device Blueprints for policy management

Blueprint Routing

Configure dynamic Blueprint assignment during device enrollment using Assignment Rules