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:| Input | Platforms | Operators | Example Values |
|---|---|---|---|
| Device criteria | |||
| Device family | is one of is not one of | Mac, iPhone, iPad, Apple TV, Vision, Windows, Android | |
| Enrollment type | is is not | Automated Device Enrollment, Manual Device Enrollment | |
| Chip type | is | Apple Silicon, Intel | |
| FileVault | is | On, Off | |
| Supervision status | is | Supervised, Not Supervised | |
| Mac family | is one of is not one of | iMac, 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 of | Honolulu, 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 of | QCM2XXXXXX | |
| OS version | 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 | are exactly are not exactly contain one of does not contain one of | Test, 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 of | Product | |
| User e-mail | 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 | |
| User username | 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 | 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 | is one of is not one of | database-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.
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
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.
Add Additional Conditional Blocks
For Assignment Maps with existing conditional logic, click the + button to add a new Conditional Block within your canvas.
Configure Assignment Rules
Once you’ve added a conditional block, you’ll need to configure the Assignment Rules that should apply to each condition.
Edit If Condition
Click the pencil icon within the conditional block to configure the Assignment Rules that should apply to the If condition.
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.
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
Examples of Common Assignment Map Conditions
Department-Based Software Deployment
Software Deployment
Location and Role-Based Security Configurations
Security Configurations
OS Version-Based Configurations
OS-Specific Configurations
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.Select Library Item
While editing your Assignment Map, select the Library Item you would like to exclude for a device.
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.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.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.
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.
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.
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.
Related articles
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