Provisioning template conditionals

Provisioning supports conditional If/Else statements that can help you control template flow. The result of an action determines whether the template branches or not. You can use any action with a conditional. Branch nesting isn't allowed. Else conditionals require an If, but you don't have to use an Else. You can add multiple actions to If and Else conditionals.

The Compare variable action is useful for conditionals. The example below shows a template that uses conditionals to support both laptops and desktops. The variable comparison to check the device type is system.chassisType=Laptop.

For more information on creating conditionals, see this Ivanti Community article.

To add a conditional to a template
  1. With a template view open, right-click the template section you want configure and click Add condition > If. The If condition will be added and selected.
  2. With the If condition selected, click Add and select the action you want. The result of that action determines if child actions will be executed.
  3. If you want an Else, you can add and configure it the same way by right-clicking the template section and clicking Add condition > Else.