This guide applies to all device platforms
About Conditional Logic in Assignment Maps
Conditional logic in Assignment Maps is a feature that allows you to create deployment strategies using if/else statements and conditional blocks. This enables you to deploy different configurations, apps, and settings based on device attributes, user information, or other organizational criteria.How It Works
Assignment Maps provide a flexible way to manage your device fleet through conditional logic. This guide will help you understand how to effectively use if/else statements and conditional blocks to create deployment strategies tailored to your organization’s specific requirements.Understanding Conditional Logic in Assignment Maps
If/else logic in Assignment Maps allows administrators to create conditional pathways that determine which configurations, apps, and settings get deployed to specific devices or users. This conditional logic works on a simple premise: “If a condition is true, then apply these settings; otherwise (else), apply different settings.” This functionality enables you to make deployment decisions based on device attributes, user information, or other organizational criteria. The fundamental structure of if/else logic in Assignment Maps mirrors programming concepts but is presented through an intuitive visual interface. When a condition is evaluated, the system checks if it’s true. If it is, the associated actions are performed, and no further conditions in that block are checked. If it’s false, the system moves to the next condition (“else if”) or to the default action (“else”) if all conditions are false.Conditional Blocks: Structure and Function
What Are Conditional Blocks?
Conditional blocks are the building blocks of logical decision-making in Assignment Maps. They contain sets of if/else conditions that determine which configurations to apply based on device or user attributes. These blocks are organized on an infinite canvas, giving you complete flexibility to create detailed deployment strategies for your entire organization. Each conditional block follows a specific evaluation flow. When a device checks in, the system evaluates the conditions in the order they appear. Once a condition evaluates to true, the system applies the associated configuration and moves to the next conditional block without checking any further conditions in the current block. This ensures that only the most relevant configuration is applied based on the first matching condition.Components of Conditional Blocks
-
If/Else Conditions: The foundation of conditional blocks, these conditions group similar criteria together to create cleaner, more organized maps. Each condition is evaluated in order, with the first matching condition being applied.
- The example below demonstrates what happens when there is a match to the User department. The highlighted condition will be applied, and the condition below it will not apply, even though it may also match. The other condition would need to be moved into its own conditional block to be evaluated separately.
- Assignment Nodes: These are the logical conditions using Assignment Rules contained within Conditional Blocks. Assignment nodes define the specific criteria that must be met for a condition to evaluate as true. They can reference device attributes (such as model, OS version, serial number) or user attributes (department, location, role). Multiple conditions can be combined using AND/OR operators to create complex logic.
- Root Line: The Root Line ensures that all Conditional Blocks connect back to the main flow, avoiding dead ends in your Assignment Map. This visual element helps you maintain a clear understanding of how devices will navigate through your conditional logic.
Supported Inputs, Operators, and Values
Assignment Map conditional logic supports the following inputs, operators, and values:| Input | Operators | Example Values |
|---|---|---|
| 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 |
| Tags | are exactly are not exactly contain one of does not contain one of | Test Pilot Production |
| 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 | 12 13.1 16.2.2 |
| User Email | 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 Group | is one of is not one of | database-admins |
| 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 Department | is is not is one of is not one of contains does not contain contains one of does not contain one of | Product |
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 an infinite amount 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
Examples of Common Assignment Map Conditions
Department-Based Software Deployment
Location and Role-Based Security Configurations
OS Version-Based 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.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.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.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 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.